From bfefeffe1661131500c832674d5054941d6b3419 Mon Sep 17 00:00:00 2001 From: "Celina G. Val" Date: Tue, 11 Jun 2024 14:43:22 -0700 Subject: [PATCH] Install Kani's runtime dependencies and fix Rust CI --- .github/workflows/kani.yml | 10 ++++++++++ .github/workflows/rustc.yml | 3 +++ library/contracts/safety/src/runtime.rs | 4 +--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/kani.yml b/.github/workflows/kani.yml index 68dabd130b86f..2b950b3e097b8 100644 --- a/.github/workflows/kani.yml +++ b/.github/workflows/kani.yml @@ -26,6 +26,11 @@ jobs: matrix: # Kani does not support windows. os: [ubuntu-latest, macos-latest] + include: + - os: ubuntu-latest + base: ubuntu + - os: macos-latest + base: macos steps: - name: Checkout Library uses: actions/checkout@v4 @@ -41,6 +46,11 @@ jobs: path: kani ref: features/verify-rust-std + - name: Setup Dependencies + working-directory: kani + run: | + ./scripts/setup/${{ matrix.base }}/install_deps.sh + - name: Build `Kani` working-directory: kani run: | diff --git a/.github/workflows/rustc.yml b/.github/workflows/rustc.yml index 2b8eb1a56dec8..f0f92d542b67d 100644 --- a/.github/workflows/rustc.yml +++ b/.github/workflows/rustc.yml @@ -61,6 +61,9 @@ jobs: - name: Run tests working-directory: upstream + env: + # Avoid error due to unexpected `cfg` + RUSTFLAGS: "-A unexpected_cfgs" run: | ./configure --set=llvm.download-ci-llvm=true ./x test --stage 0 library/std diff --git a/library/contracts/safety/src/runtime.rs b/library/contracts/safety/src/runtime.rs index f3f439ce726a6..78e8b1dc354d2 100644 --- a/library/contracts/safety/src/runtime.rs +++ b/library/contracts/safety/src/runtime.rs @@ -1,6 +1,4 @@ -use proc_macro::{TokenStream}; -use quote::{quote, format_ident}; -use syn::{ItemFn, parse_macro_input}; +use proc_macro::TokenStream; /// For now, runtime requires is a no-op. ///