Skip to content
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

Build CBMC with cmake in all "CBMC latest" jobs #2965

Merged

Conversation

adpaco-aws
Copy link
Contributor

The "CBMC latest" workflow is composed of two jobs (regression and perf) which perform testing with the most recent development version of CBMC. At present, the regression jobs are not actually testing with the CBMC that we build from source, but the CBMC installed through the setup scripts, as revealed in #2954.

This PR changes the regression jobs so that they use cmake to build. This allows the runner to pick up the recently-built CBMC development version instead of the one installed through setup scripts, as it's done in the perf jobs. Unfortunately, this CI run doesn't demonstrate the fix as it should due to an unrelated breaking change in the latest CBMC version. However, #2952 provides more context in case you need it.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Copy link
Contributor

@zhassan-aws zhassan-aws left a comment

Choose a reason for hiding this comment

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

Apparently, the cmake build places all the binaries under build/bin, which is the directory that gets added to $GITHUB_PATH. On the other hand, the make build places each binary under its respective directory under src, e.g. cbmc is placed inside src/cbmc/, goto-cc is placed inside src/goto-cc/, etc.

.github/workflows/cbmc-latest.yml Outdated Show resolved Hide resolved
@adpaco-aws
Copy link
Contributor Author

Apparently, the cmake build places all the binaries under build/bin, which is the directory that gets added to $GITHUB_PATH. On the other hand, the make build places each binary under its respective directory under src, e.g. cbmc is placed inside src/cbmc/, goto-cc is placed inside src/goto-cc/, etc.

Indeed, that's why the version we build from source isn't picked up in regression jobs. There are also a bunch of improvements to be done here (e.g., not installing CBMC at all so the jobs fail when it's invoked), but it isn't the best time to do them since a lot of changes are being added to the newest CBMC version.

@adpaco-aws adpaco-aws enabled auto-merge (squash) January 2, 2024 22:31
@adpaco-aws adpaco-aws merged commit d222f9a into model-checking:main Jan 2, 2024
20 checks passed
zhassan-aws added a commit that referenced this pull request Jan 9, 2024
These are the auto-generated release notes for comparison purposes:

## What's Changed
* Automate cargo update without dependabot by @tautschnig in
#2942
* Update nightly toolchain to toolchain-2023-12-15 by @celinval in
#2948
* Automatic cargo update to 2023-12-18 by @github-actions in
#2951
* Migrate function, block and statement modules to StableMIR by
@celinval in #2947
* Update Rust toolchain to `nightly-2023-12-18` by @adpaco-aws in
#2953
* Update the rust toolchain to 2023-12-20 by @celinval in
#2961
* Migrate foreign function, compiler-interface and kani-middle modules
to use StableMIR by @celinval in
#2959
* Build CBMC with `cmake` in all "CBMC latest" jobs by @adpaco-aws in
#2965
* Automatic cargo update to 2024-01-01 by @github-actions in
#2964
* Automatic cargo update to 2024-01-08 by @github-actions in
#2968
* Upgrade to 2024-01-08 rust toolchain by @zhassan-aws in
#2969


**Full Changelog**:
kani-0.43.0...kani-0.44.0

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

---------

Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
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.

2 participants