Merge pull request #892 from xldenis/borroed-ghost #3047
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Rust fmt | |
run: | | |
shopt -s globstar | |
rustfmt **/*.rs --check | |
contracts-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-contracts-${{ hashFiles('creusot-contracts/Cargo.lock') }} | |
- name: Build creusot-contracts with rustc | |
run: cargo build -p creusot-contracts | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
run: cargo build | |
- name: Run tests | |
run: cargo test | |
why3: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: ${{ github.event.pull_request.commits }} | |
- name: Fetch target branch | |
if: github.base_ref | |
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}} | |
- name: Install CVC4 | |
run: sudo apt-get install -y cvc4=1.8-2 | |
- name: Install CVC5 | |
run: | | |
wget https://github.com/cvc5/cvc5/releases/download/cvc5-1.0.5/cvc5-Linux | |
sudo cp cvc5-Linux /usr/local/bin/cvc5 | |
sudo chmod +x /usr/local/bin/cvc5 | |
- name: Install Z3 | |
run: | | |
wget https://github.com/Z3Prover/z3/releases/download/z3-4.12.1/z3-4.12.1-x64-glibc-2.35.zip | |
unzip z3-4.12.1-x64-glibc-2.35.zip | |
sudo cp -rn z3-4.12.1-x64-glibc-2.35/bin /usr/local | |
sudo cp -rn z3-4.12.1-x64-glibc-2.35/include /usr/local | |
sudo chmod +x /usr/local/bin/z3 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: why3.yml | |
name: why3 | |
path: /home/runner/work/creusot/why3 | |
- run: | | |
chmod -R +x ~/work/creusot/why3/bin | |
chmod -R +x ~/work/creusot/why3/lib/why3/why3server | |
mv ~/work/creusot/why3/alt-ergo /usr/local/bin/alt-ergo | |
chmod +x /usr/local/bin/alt-ergo | |
echo $(/usr/local/bin/alt-ergo --version) | |
~/work/creusot/why3/bin/why3 config detect | |
cat ~/.why3.conf | |
- run: cargo test --test why3 "" -- --replay=none --diff-from=origin/master | |
env: | |
WHY3_CONFIG: ${{ github.workspace }}/ci/why.conf | |
WHY3_PATH: ${{ github.workspace }}/../why3/bin/why3 | |
- run: cargo test --test why3 "" -- --skip-unstable | |
env: | |
WHY3_CONFIG: ${{ github.workspace }}/ci/why.conf | |
WHY3_PATH: ${{ github.workspace }}/../why3/bin/why3 |