Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into unique
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Aug 20, 2024
2 parents 2bb8317 + 24a0b16 commit f4233a2
Show file tree
Hide file tree
Showing 651 changed files with 8,574 additions and 4,948 deletions.
31 changes: 4 additions & 27 deletions .github/workflows/kani.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
paths:
- 'library/**'
- '.github/workflows/kani.yml'
- 'scripts/check_kani.sh'

defaults:
run:
Expand All @@ -30,32 +31,8 @@ jobs:
- name: Checkout Library
uses: actions/checkout@v4
with:
path: verify-rust-std
path: head
submodules: true

# We currently build Kani from a branch that tracks a rustc version compatible with this library version.
- name: Checkout `Kani`
uses: actions/checkout@v4
with:
repository: model-checking/kani
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: |
cargo build-dev --release
echo "$(pwd)/scripts" >> $GITHUB_PATH
- name: Run tests
working-directory: verify-rust-std
env:
RUST_BACKTRACE: 1
run: |
kani verify-std -Z unstable-options ./library --target-dir ${{ runner.temp }} -Z function-contracts \
-Z mem-predicates -Z ptr-to-ref-cast-checks
- name: Run Kani Script
run: bash ./head/scripts/check_kani.sh ${{github.workspace}}/head
35 changes: 3 additions & 32 deletions .github/workflows/rustc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- 'library/**'
- 'rust-toolchain.toml'
- '.github/workflows/rustc.yml'
- 'scripts/check_rustc.sh'

defaults:
run:
Expand All @@ -29,35 +30,5 @@ jobs:
with:
path: head

- name: Checkout `upstream/master`
uses: actions/checkout@v4
with:
repository: rust-lang/rust
path: upstream
fetch-depth: 0
submodules: true

# Run rustc twice in case the toolchain needs to be installed.
# Retrieve the commit id from the `rustc --version`. Output looks like:
# `rustc 1.80.0-nightly (84b40fc90 2024-05-27)`
- name: Checkout matching commit
run: |
cd head
rustc --version
COMMIT_ID=$(rustc --version | sed -e "s/.*(\(.*\) .*/\1/")
cd ../upstream
git checkout ${COMMIT_ID}
- name: Copy Library
run: |
rm -rf upstream/library
cp -r head/library upstream
- name: Run tests
working-directory: upstream
env:
# Avoid error due to unexpected `cfg`.
RUSTFLAGS: "--check-cfg cfg(kani) --check-cfg cfg(feature,values(any()))"
run: |
./configure --set=llvm.download-ci-llvm=true
./x test --stage 0 library/std
- name: Run rustc script
run: bash ./head/scripts/check_rustc.sh ${{github.workspace}}/head
Loading

0 comments on commit f4233a2

Please sign in to comment.