Skip to content

[CI] Minor fixes to CI accompanying C++17 version change #8028

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 7 commits into from
Nov 14, 2023
15 changes: 8 additions & 7 deletions .github/workflows/pull-request-check-rust-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ jobs:
# by the other jobs already present in `pull-request-checks.yaml`.
- name: Run Rust API tests
run: |
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))")
VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))")
cd src/libcprover-rust;\
cargo clean;\
CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1


check-macos-12-cmake-clang-rust:
runs-on: macos-12
check-macos-13-cmake-clang-rust:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -82,10 +82,10 @@ jobs:
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-Release-${{ github.ref }}-${{ github.sha }}-PR-Rust-API
key: ${{ runner.os }}-Release-Minisat-${{ github.ref }}-${{ github.sha }}-PR-Rust-API
restore-keys: |
${{ runner.os }}-Release-${{ github.ref }}
${{ runner.os }}-Release
${{ runner.os }}-Release-Minisat-${{ github.ref }}
${{ runner.os }}-Release-Minisat
- name: ccache environment
run: |
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
Expand All @@ -102,7 +102,8 @@ jobs:
# by the other jobs already present in `pull-request-checks.yaml`.
- name: Run Rust API tests
run: |
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))")
export MACOSX_DEPLOYMENT_TARGET=10.15
VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))")
cd src/libcprover-rust;\
cargo clean;\
CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1
2 changes: 1 addition & 1 deletion src/libcprover-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ readme = "readme.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cxx = "1.0"
cxx = { version = "1.0", default-features = false, features = ["std", "c++17"] }

[build-dependencies]
cxx-build = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/libcprover-rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn main() {
.include(cpp_api_include_path)
.include(get_current_working_dir().unwrap())
.file("src/c_api.cc")
.flag_if_supported("-std=c++11")
.flag_if_supported("-std=c++17")
.compile("cprover-rust-api");

println!("cargo:rerun-if-changed=src/c_api.cc");
Expand Down
2 changes: 1 addition & 1 deletion src/libcprover-rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ mod tests {
if let Ok(el) = results {
let_cxx_string!(non_existing_property = "main.the.jabberwocky");
let prop_status = cprover_api::get_property_status(&el, &non_existing_property);
if let Err(status) = prop_status {
if let Err(_status) = prop_status {
Ok(())
} else {
let error_msg = format!(
Expand Down