Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run VM scripts in the CI #60

Merged
merged 9 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]
podhrmic marked this conversation as resolved.
Show resolved Hide resolved
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