Skip to content
Merged
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
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