Skip to content

Commit 28d71e4

Browse files
committed
Add an environment variable for the include folder in the CBMC directory.
The build requirements have failed, and any other changes are very *very* brittle, as they require downloading a CBMC package (so that an `include/cprover/` folder is present), knowing the version and the location of the folder, and that will also fail on the release PRs incrementing the version (as the packaged versions and the reported version are going to be divergent).
1 parent a13c4ab commit 28d71e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/pull-request-check-rust-api.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
env:
88
default_build_dir: "build/"
99
default_solver: "minisat2"
10+
default_include_dir: "src/libcprover-cpp/"
1011

1112
# For now, we support two jobs: A Linux and a MacOS based one.
1213
# Both of the jobs use CMake, as we only support building the Rust
@@ -64,7 +65,7 @@ jobs:
6465
VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))")
6566
cd src/libcprover-rust;\
6667
cargo clean;\
67-
CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1
68+
CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1
6869
6970
7071
check-macos-12-cmake-clang-rust:
@@ -104,4 +105,4 @@ jobs:
104105
VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))")
105106
cd src/libcprover-rust;\
106107
cargo clean;\
107-
CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1
108+
CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1

0 commit comments

Comments
 (0)