diff --git a/.github/workflows/pull-request-check-rust-api.yaml b/.github/workflows/pull-request-check-rust-api.yaml index a3faf73c8eb..710ac1e21d1 100644 --- a/.github/workflows/pull-request-check-rust-api.yaml +++ b/.github/workflows/pull-request-check-rust-api.yaml @@ -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: @@ -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 @@ -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 diff --git a/src/libcprover-rust/Cargo.toml b/src/libcprover-rust/Cargo.toml index 37a3e866325..351345b5ff3 100644 --- a/src/libcprover-rust/Cargo.toml +++ b/src/libcprover-rust/Cargo.toml @@ -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" diff --git a/src/libcprover-rust/build.rs b/src/libcprover-rust/build.rs index 338c4c77931..f5234f93d3f 100644 --- a/src/libcprover-rust/build.rs +++ b/src/libcprover-rust/build.rs @@ -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"); diff --git a/src/libcprover-rust/src/lib.rs b/src/libcprover-rust/src/lib.rs index a683a55d878..57d9e97c146 100644 --- a/src/libcprover-rust/src/lib.rs +++ b/src/libcprover-rust/src/lib.rs @@ -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!(