Skip to content

Add compile-examples job to CI #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

JulianGCalderon
Copy link
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?

Copy link

github-actions bot commented Apr 7, 2025

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
Copy link

codecov-commenter commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.57%. Comparing base (fe7de7a) to head (490a381).

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 Sentry.
📢 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.

Copy link

github-actions bot commented Apr 7, 2025

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
Copy link
Collaborator

edg-l commented Apr 8, 2025

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
Copy link
Contributor Author

JulianGCalderon commented Apr 8, 2025

@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
Copy link
Collaborator

edg-l commented Apr 8, 2025

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