Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
giltho authored Jan 8, 2025
2 parents cd0b5a3 + 6316f8f commit 85e42bd
Show file tree
Hide file tree
Showing 455 changed files with 12,941 additions and 5,880 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci-cheri.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CHERI

on:
pull_request:
push:
branches:
- master
- cheri-tests

env:
CERBERUS_IMAGE_ID: ghcr.io/rems-project/cerberus/cn:release

# cancel in-progress job when a new push is performed
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
# version: [4.12.0, 4.14.1]
version: [4.14.1]


runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: System dependencies (ubuntu)
run: |
sudo apt-get install build-essential libgmp-dev opam
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}
fail-on-cache-miss: true

- name: Install Cerberus-CHERI
if: ${{ matrix.version == '4.14.1' }}
run: |
opam switch with_coq
eval $(opam env --switch=with_coq)
opam pin --yes --no-action add cerberus-lib .
opam pin --yes --no-action add cerberus-cheri .
opam install --yes cerberus-cheri
- name: Run Cerberus-CHERI CI tests
if: ${{ matrix.version == '4.14.1' }}
run: |
opam switch with_coq
eval $(opam env --switch=with_coq)
cd tests; USE_OPAM='' ./run-cheri.sh
cd ..
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Benchmarks
name: CN Benchmarks

on:
push:
Expand Down Expand Up @@ -35,36 +35,15 @@ jobs:

- name: System dependencies (ubuntu)
run: |
sudo apt install build-essential libgmp-dev z3 opam cmake jq
sudo apt-get install build-essential libgmp-dev z3 opam jq
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}

- name: Setup opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam install --deps-only --yes ./cerberus-lib.opam
opam switch create with_coq ${{ matrix.version }}
eval $(opam env --switch=with_coq)
opam repo add --yes --this-switch coq-released https://coq.inria.fr/opam/released
opam pin --yes -n coq-struct-tact https://github.com/uwplse/StructTact.git
opam repo add --yes --this-switch iris-dev https://gitlab.mpi-sws.org/iris/opam.git
opam pin --yes -n coq-sail-stdpp https://github.com/rems-project/coq-sail.git#f319aad
opam pin --yes -n coq-cheri-capabilities https://github.com/rems-project/coq-cheri-capabilities.git
opam install --deps-only --yes ./cerberus-lib.opam ./cerberus-cheri.opam
- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
id: cache-opam-save
uses: actions/cache/save@v4
with:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
fail-on-cache-miss: true

- name: Install Cerberus
run: |
Expand All @@ -78,14 +57,14 @@ jobs:
uses: robinraju/release-downloader@v1
with:
repository: cvc5/cvc5
tag: cvc5-1.1.2
fileName: cvc5-Linux-static.zip
tag: cvc5-1.2.0
fileName: cvc5-Linux-x86_64-static.zip

- name: Unzip and install cvc5
run: |
unzip cvc5-Linux-static.zip
chmod +x cvc5-Linux-static/bin/cvc5
sudo cp cvc5-Linux-static/bin/cvc5 /usr/local/bin/
unzip cvc5-Linux-x86_64-static.zip
chmod +x cvc5-Linux-x86_64-static/bin/cvc5
sudo cp cvc5-Linux-x86_64-static/bin/cvc5 /usr/local/bin/
- name: Install CN
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: CI (CN runtime checks)
name: CN Spec Testing

on:
pull_request:
push:
branches:
- master
- cheri-tests

env:
CERBERUS_IMAGE_ID: ghcr.io/rems-project/cerberus/cn:release
Expand All @@ -32,36 +31,15 @@ jobs:

- name: System dependencies (ubuntu)
run: |
sudo apt install build-essential libgmp-dev z3 opam cmake
sudo apt-get install build-essential libgmp-dev z3 opam cmake lcov
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}

- name: Setup opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam install --deps-only --yes ./cerberus-lib.opam
opam switch create with_coq ${{ matrix.version }}
eval $(opam env --switch=with_coq)
opam repo add --yes --this-switch coq-released https://coq.inria.fr/opam/released
opam pin --yes -n coq-struct-tact https://github.com/uwplse/StructTact.git
opam repo add --yes --this-switch iris-dev https://gitlab.mpi-sws.org/iris/opam.git
opam pin --yes -n coq-sail-stdpp https://github.com/rems-project/coq-sail.git#f319aad
opam pin --yes -n coq-cheri-capabilities https://github.com/rems-project/coq-cheri-capabilities.git
opam install --deps-only --yes ./cerberus-lib.opam ./cerberus-cheri.opam
- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
id: cache-opam-save
uses: actions/cache/save@v4
with:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
fail-on-cache-miss: true

- name: Install Cerberus
run: |
Expand Down Expand Up @@ -97,3 +75,10 @@ jobs:
eval $(opam env --switch=${{ matrix.version }})
cd cn-tutorial; ./runtime-test.sh
cd ..
- name: Run CN-Test-Gen CI tests
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
cd tests; ./run-cn-test-gen.sh
98 changes: 98 additions & 0 deletions .github/workflows/ci-cn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: CN Proof

on:
pull_request:
push:
branches:
- master

env:
CERBERUS_IMAGE_ID: ghcr.io/rems-project/cerberus/cn:release

# cancel in-progress job when a new push is performed
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
# version: [4.12.0, 4.14.1]
version: [4.14.1]


runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: System dependencies (ubuntu)
run: |
sudo apt-get install build-essential libgmp-dev z3 opam
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}
fail-on-cache-miss: true

- name: Install Cerberus
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
opam pin --yes --no-action add cerberus-lib .
opam pin --yes --no-action add cerberus .
opam install --yes cerberus
- name: Download cvc5 release
uses: robinraju/release-downloader@v1
with:
repository: cvc5/cvc5
tag: cvc5-1.2.0
fileName: cvc5-Linux-x86_64-static.zip

- name: Unzip and install cvc5
run: |
unzip cvc5-Linux-x86_64-static.zip
chmod +x cvc5-Linux-x86_64-static/bin/cvc5
sudo cp cvc5-Linux-x86_64-static/bin/cvc5 /usr/local/bin/
- name: Install CN
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
opam pin --yes --no-action add cn .
opam install --yes cn ocamlformat.0.26.2
- name: Check CN code formatting
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
cd backend/cn && dune build @fmt
- name: Checkout cn-tutorial
uses: actions/checkout@v4
with:
repository: rems-project/cn-tutorial
path: cn-tutorial

- name: Run CN tests
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
./tests/diff-prog.py cn tests/cn/verify.json 2> diff.patch || (cat diff.patch; exit 1)
- name: Run CN Tutorial tests
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
tests/run-cn-tutorial-ci.sh cn-tutorial
- name: Run CN VIP tests
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
tests/run-cn-vip.sh
37 changes: 8 additions & 29 deletions .github/workflows/ci-pr-bench.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,7 @@ jobs:
with:
path: ~/.opam
key: ${{ matrix.version }}

- name: Setup opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam install --deps-only --yes ./cerberus-lib.opam
opam switch create with_coq ${{ matrix.version }}
eval $(opam env --switch=with_coq)
opam repo add --yes --this-switch coq-released https://coq.inria.fr/opam/released
opam pin --yes -n coq-struct-tact https://github.com/uwplse/StructTact.git
opam repo add --yes --this-switch iris-dev https://gitlab.mpi-sws.org/iris/opam.git
opam pin --yes -n coq-sail-stdpp https://github.com/rems-project/coq-sail.git#f319aad
opam pin --yes -n coq-cheri-capabilities https://github.com/rems-project/coq-cheri-capabilities.git
opam install --deps-only --yes ./cerberus-lib.opam ./cerberus-cheri.opam

- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
id: cache-opam-save
uses: actions/cache/save@v4
with:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
fail-on-cache-miss: true

- name: Install python dependencies
run: pip install tabulate
Expand All @@ -83,14 +62,14 @@ jobs:
uses: robinraju/release-downloader@v1
with:
repository: cvc5/cvc5
tag: cvc5-1.1.2
fileName: cvc5-Linux-static.zip
tag: cvc5-1.2.0
fileName: cvc5-Linux-x86_64-static.zip

- name: Unzip and install cvc5
run: |
unzip cvc5-Linux-static.zip
chmod +x cvc5-Linux-static/bin/cvc5
sudo cp cvc5-Linux-static/bin/cvc5 /usr/local/bin/
unzip cvc5-Linux-x86_64-static.zip
chmod +x cvc5-Linux-x86_64-static/bin/cvc5
sudo cp cvc5-Linux-x86_64-static/bin/cvc5 /usr/local/bin/

- name: Install CN
run: |
Expand All @@ -111,7 +90,7 @@ jobs:
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
cd tests; USE_OPAM='' ./run-ci-benchmarks.sh
cd tests; ./run-ci-benchmarks.sh
mv benchmark-data.json ${{ env.PR_DATA }}
cd ..

Expand All @@ -138,7 +117,7 @@ jobs:
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
cd tests; USE_OPAM='' ./run-ci-benchmarks.sh; mv benchmark-data.json ${{ env.BASE_DATA }}
cd tests; ./run-ci-benchmarks.sh; mv benchmark-data.json ${{ env.BASE_DATA }}
cd ..

- name: Compare results
Expand Down
Loading

0 comments on commit 85e42bd

Please sign in to comment.