Skip to content

Add a justfile with basic support for building CBMC and executing Rust API tests. #7486

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@

/cmake/ @diffblue/diffblue-opensource
CMakeLists.txt @diffblue/diffblue-opensource
justfile @NlightNFotis

# These files change frequently and changes are low-risk

Expand Down
24 changes: 24 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This is a `justfile`, for the program `just`, a task runner.
# Think of it as a better make for targets that are actions rather than
# files. For more information, look at https://github.com/casey/just

default_build_dir := 'build/'
default_solver := 'minisat2'

# Perform a default (debug) build on MacOS systems under folder `build/`
[macos]
build:
cmake -S. -B{{default_build_dir}} -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
cmake --build build -j4

# Perform a default (debug) build on Linux systems under folder `build/`
[linux]
build:
cmake -S. -B{{default_build_dir}}
cmake --build build -j4

# Test the Rust API (under src/libcprover-rust/)
test-rust-api: build
cd src/libcprover-rust;\
cargo clean;\
CBMC_BUILD_DIR={{justfile_directory()}}/{{default_build_dir}} SAT_IMPL={{default_solver}} cargo test -- --test-threads=1