Skip to content

Run forc-unit-tests on CI in release and debug mode #7159

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

Merged
merged 11 commits into from
May 13, 2025

Conversation

ironcev
Copy link
Member

@ironcev ironcev commented May 6, 2025

Description

This PR:

  • changes the configuration of Forc and Forc plugins used in CI steps from debug to release.
  • changes the forc-unit-tests CI step, to run the tests both in debug and release mode.

By switching to release builds, we ensure that we test the versions that are actually released, unlike the debug version. As a consequence, execution time of CI steps gets shortened. The drawback is potentially not catching issues detectable only in the debug mode, like, e.g., overflows. We will add a separate CI workflow, running nightly or on tagged versions only, that will use debug builds as explained in #7168.

Currently, we are running forc-unit-tests only in the debug mode. Compiler panics in in_language_tests, described in #7157, that happens only in release mode, shows that it is beneficial to run the unit test both in debug and release mode. Similar is with compiler panics described in #7161.

The PR also removes the explicit forc build part from those tests and leaves only the forc test part. The reasoning behind that change is, that forc test also builds the projects, indeed with tests included, but, since we currently don't support #[cfg(test)], otherwise unchanged. Running forc build in addition effectively doubles the test execution time, and the actual benefit in testing, compared to running only forc test is, in best case, negligible.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@ironcev ironcev self-assigned this May 6, 2025
@ironcev ironcev temporarily deployed to fuel-sway-bot May 6, 2025 11:10 — with GitHub Actions Inactive
@ironcev ironcev added ci testing General testing labels May 6, 2025
@ironcev ironcev temporarily deployed to fuel-sway-bot May 6, 2025 12:38 — with GitHub Actions Inactive
@ironcev ironcev marked this pull request as ready for review May 6, 2025 13:25
@ironcev ironcev requested review from a team as code owners May 6, 2025 13:25
@ironcev ironcev temporarily deployed to fuel-sway-bot May 6, 2025 13:26 — with GitHub Actions Inactive
@ironcev ironcev requested review from a team May 6, 2025 13:26
sdankel
sdankel previously approved these changes May 6, 2025
@ironcev ironcev temporarily deployed to fuel-sway-bot May 7, 2025 12:16 — with GitHub Actions Inactive
@ironcev ironcev temporarily deployed to fuel-sway-bot May 8, 2025 07:10 — with GitHub Actions Inactive
kayagokalp
kayagokalp previously approved these changes May 9, 2025
Copy link
Member

@kayagokalp kayagokalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@ironcev ironcev requested review from sdankel and zees-dev May 9, 2025 08:27
@ironcev ironcev temporarily deployed to fuel-sway-bot May 9, 2025 08:27 — with GitHub Actions Inactive
@ironcev ironcev temporarily deployed to fuel-sway-bot May 12, 2025 15:13 — with GitHub Actions Inactive
@sdankel sdankel temporarily deployed to fuel-sway-bot May 12, 2025 19:14 — with GitHub Actions Inactive
JoshuaBatty
JoshuaBatty previously approved these changes May 12, 2025
@JoshuaBatty JoshuaBatty requested a review from a team May 12, 2025 23:28
@ironcev ironcev marked this pull request as draft May 13, 2025 06:24
@ironcev ironcev dismissed stale reviews from JoshuaBatty and kayagokalp via 2268d8c May 13, 2025 06:50
@ironcev ironcev temporarily deployed to fuel-sway-bot May 13, 2025 06:50 — with GitHub Actions Inactive
@ironcev ironcev marked this pull request as ready for review May 13, 2025 07:08
@ironcev ironcev requested review from JoshuaBatty and kayagokalp May 13, 2025 07:13
@JoshuaBatty JoshuaBatty requested review from a team May 13, 2025 07:22
@ironcev ironcev enabled auto-merge (squash) May 13, 2025 08:16
@ironcev ironcev merged commit 68e0423 into master May 13, 2025
41 checks passed
@ironcev ironcev deleted the ironcev/forc-unit-tests-in-release-mode branch May 13, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci testing General testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants