Skip to content

Commit

Permalink
Run VM scripts in the CI (#60)
Browse files Browse the repository at this point in the history
Builds the VM runner in the CI, some small CI improvements

---------

Co-authored-by: spernsteiner <[email protected]>
  • Loading branch information
podhrmic and spernsteiner authored Jun 5, 2024
1 parent 74585e4 commit 7a531ac
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

68 changes: 47 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,8 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
mps-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
- name: Build MPS
uses: addnab/docker-run-action@v3
with:
image: galoisinc/hardens:latest
options: -v ${{ github.workspace }}:/HARDENS
run: |
cd components/mission_protection_system/src
SENSORS=NotSimulated SELF_TEST=Enabled make rts
make clean
SENSORS=NotSimulated SELF_TEST=Enabled make rts_bottom
mps-test:
runs-on: ubuntu-latest
mps-build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
Expand All @@ -40,12 +24,54 @@ jobs:
options: -v ${{ github.workspace }}:/HARDENS
run: |
cd components/mission_protection_system/src
SENSORS=NotSimulated SELF_TEST=Enabled make rts_bottom
make clean
SENSORS=NotSimulated SELF_TEST=Disabled make rts
mv rts rts.no_self_test
make clean
SENSORS=NotSimulated SELF_TEST=Enabled make rts
mv rts rts.self_test
cd ../tests
pip3 install -r requirements.txt
RTS_DEBUG=1 QUICK=1 python3 ./run_all.py
- name: Upload MPS binaries
uses: actions/upload-artifact@v4
with:
name: mps-binaries
path: components/mission_protection_system/src/rts.*

mps-test:
runs-on: ubuntu-22.04
needs: mps-build
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
- name: Download MPS binaries
uses: actions/download-artifact@v4
with:
name: mps-binaries
- name: Display structure of downloaded files
run: |
chmod +x rts.*
mv rts.* components/mission_protection_system/src/.
- name: Test MPS
uses: addnab/docker-run-action@v3
with:
image: galoisinc/hardens:latest
options: -v ${{ github.workspace }}:/HARDENS
run: |
cd components/mission_protection_system/tests
pip3 install -r requirements.txt
RTS_DEBUG=1 QUICK=1 python3 ./run_all.py
vmrunner:
runs-on: ubuntu-22.04
steps:
- name: Install aarch64 toolchain
run: sudo apt-get install -y gcc-aarch64-linux-gnu
- uses: hecrj/setup-rust-action@v2
with:
rust-version: 1.74
targets: aarch64-unknown-linux-gnu
- uses: actions/checkout@master
- name: Build VM runner
run: |
cd src/vm_runner
cargo build --release --target aarch64-unknown-linux-gnu
4 changes: 2 additions & 2 deletions .github/workflows/proofs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:

mps-verify-cn:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
Expand All @@ -32,7 +32,7 @@ jobs:
make -f cn.mk proofs
mps-verify-frama-c:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
Expand Down

0 comments on commit 7a531ac

Please sign in to comment.