Skip to content

Add compile-examples job to CI - #227

Open
JulianGCalderon wants to merge 2 commits into
mainfrom
compile-examples-job
Open

Add compile-examples job to CI#227
JulianGCalderon wants to merge 2 commits into
mainfrom
compile-examples-job

Conversation

@JulianGCalderon

Copy link
Copy Markdown
Contributor

Adds a compile-examples job to the CI that compiles all examples.

This job can be set as non-required.

Questions:

  • Should the job fail when an example fails to compile? Or just print it?
  • Should we create a Github comment with the failing examples?

@github-actions

github-actions Bot commented Apr 7, 2025

Copy link
Copy Markdown

Benchmarking (Linux) factorial

Compiling factorial (factorial.con)
Finished release in 29.49342ms
Running 5000000 iterations
Using input value: 20
Concrete Result = 2432902008176640000 Time taken : 59.51 ms
Rust Result = 2432902008176640000 Time taken : 60.37 ms

Benchmarking (Linux) fib

Compiling fib (fib.con)
Finished release in 25.239685ms
Running 5000 iterations
Using input value: 20
Concrete Result = 6765 Time taken : 136.66 ms
Rust Result = 6765 Time taken : 85.77 ms

@codecov-commenter

codecov-commenter commented Apr 7, 2025

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.57%. Comparing base (fe7de7a) to head (490a381).
⚠️ Report is 8 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #227   +/-   ##
=======================================
  Coverage   59.57%   59.57%           
=======================================
  Files          24       24           
  Lines        4848     4848           
=======================================
  Hits         2888     2888           
  Misses       1960     1960           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Apr 7, 2025

Copy link
Copy Markdown

Benchmarking (macOS) factorial

Compiling factorial (factorial.con)
Finished release in 555.825458ms
Running 5000000 iterations
Using input value: 20
Concrete Result = 2432902008176640000 Time taken : 25.06 ms
Rust Result = 2432902008176640000 Time taken : 24.48 ms

Benchmarking (macOS) fib

Compiling fib (fib.con)
Finished release in 82.190292ms
Running 5000 iterations
Using input value: 20
Concrete Result = 6765 Time taken : 92.36 ms
Rust Result = 6765 Time taken : 102.13 ms

@JulianGCalderon
JulianGCalderon marked this pull request as ready for review April 7, 2025 21:42
@edg-l

edg-l commented Apr 8, 2025

Copy link
Copy Markdown
Collaborator

We test the examples under tests/cases.rs, that said maybe i missed some.

I think this is duplicating work, the cases.rs also checks the expected return value and output

@JulianGCalderon

JulianGCalderon commented Apr 8, 2025

Copy link
Copy Markdown
Contributor Author

@edg-l I noticed that some examples where not working, so I created this PR to track them. Unlike rust tests, these workflows would test (only builds) all examples in the directory, helping us see which are outdated.

Failing Examples:
- examples/check_errors.con
- examples/enum.con
- examples/factorial.con
- examples/for_loop.con
- examples/union.con

That said, the new job takes much longer than the current jobs, so maybe its not worth to merge it.

I could add it as a script to the repository instead. It may come handy. What do you think?

@edg-l

edg-l commented Apr 8, 2025

Copy link
Copy Markdown
Collaborator

we should either remove those outdated ones or fix them, imho we already test them via rust code so this isn't as useful and looks like duplicating work a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants