Skip to content

Commit ea77c96

Browse files
authored
Merge pull request #8028 from NlightNFotis/fix_rust_ci
[CI] Minor fixes to CI accompanying C++17 version change
2 parents 3db3e49 + 5f0d5df commit ea77c96

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

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

+8-7
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ jobs:
6262
# by the other jobs already present in `pull-request-checks.yaml`.
6363
- name: Run Rust API tests
6464
run: |
65-
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))")
65+
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))")
6666
cd src/libcprover-rust;\
6767
cargo clean;\
6868
CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1
6969
7070
71-
check-macos-12-cmake-clang-rust:
72-
runs-on: macos-12
71+
check-macos-13-cmake-clang-rust:
72+
runs-on: macos-13
7373
steps:
7474
- uses: actions/checkout@v3
7575
with:
@@ -82,10 +82,10 @@ jobs:
8282
uses: actions/cache@v3
8383
with:
8484
path: .ccache
85-
key: ${{ runner.os }}-Release-${{ github.ref }}-${{ github.sha }}-PR-Rust-API
85+
key: ${{ runner.os }}-Release-Minisat-${{ github.ref }}-${{ github.sha }}-PR-Rust-API
8686
restore-keys: |
87-
${{ runner.os }}-Release-${{ github.ref }}
88-
${{ runner.os }}-Release
87+
${{ runner.os }}-Release-Minisat-${{ github.ref }}
88+
${{ runner.os }}-Release-Minisat
8989
- name: ccache environment
9090
run: |
9191
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
@@ -102,7 +102,8 @@ jobs:
102102
# by the other jobs already present in `pull-request-checks.yaml`.
103103
- name: Run Rust API tests
104104
run: |
105-
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))")
105+
export MACOSX_DEPLOYMENT_TARGET=10.15
106+
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))")
106107
cd src/libcprover-rust;\
107108
cargo clean;\
108109
CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1

src/libcprover-rust/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ readme = "readme.md"
1212
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1313

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

1717
[build-dependencies]
1818
cxx-build = "1.0"

src/libcprover-rust/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn main() {
7272
.include(cpp_api_include_path)
7373
.include(get_current_working_dir().unwrap())
7474
.file("src/c_api.cc")
75-
.flag_if_supported("-std=c++11")
75+
.flag_if_supported("-std=c++17")
7676
.compile("cprover-rust-api");
7777

7878
println!("cargo:rerun-if-changed=src/c_api.cc");

src/libcprover-rust/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ mod tests {
517517
if let Ok(el) = results {
518518
let_cxx_string!(non_existing_property = "main.the.jabberwocky");
519519
let prop_status = cprover_api::get_property_status(&el, &non_existing_property);
520-
if let Err(status) = prop_status {
520+
if let Err(_status) = prop_status {
521521
Ok(())
522522
} else {
523523
let error_msg = format!(

0 commit comments

Comments
 (0)