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

Refactor MPS Makefile to support separate build directories #62

Merged
merged 18 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a242e0b
mps: makefile: remove unused vars
spernsteiner Jun 7, 2024
9fb4800
mps: makefile: remove $(comma)
spernsteiner Jun 7, 2024
840a4c2
mps: makefile: remove unused rule
spernsteiner Jun 7, 2024
91203b1
mps: makefile: explicitly declare lists of objs
spernsteiner Jun 7, 2024
40f8faa
mps: makefile: add build rule for verilated.cpp support lib
spernsteiner Jun 7, 2024
6d02802
mps: makefile: run cryptol codegen only when REGENERATE_SOURCES is set
spernsteiner Jun 7, 2024
ee51c9d
mps: makefile: put verilator outputs in $(BUILD_DIR)
spernsteiner Jun 10, 2024
bfddea4
mps: makefile: move c objects into $(BUILD_DIR)
spernsteiner Jun 10, 2024
b8884e9
mps: makefile: build C files with $(CC), not $(CXX)
spernsteiner Jun 10, 2024
0a6da55
mps: makefile: configure build with $(TARGET) and $(CONFIG) vars
spernsteiner Jun 10, 2024
05e0973
mps: makefile: rename binary based on $(CONFIG) and $(TARGET)
spernsteiner Jun 10, 2024
e06bdf3
mps: update .gitignore for build system changes
spernsteiner Jun 10, 2024
92c561f
mps: makefile: allow `make rts` regardless of TARGET/CONFIG
spernsteiner Jun 10, 2024
8a4e03c
mps CI: update for build system changes
spernsteiner Jun 10, 2024
89ab653
mps: makefile: update clean target to remove build/ dir
spernsteiner Jun 10, 2024
86ff521
mps: remove build_aarch64.sh and update tests/README.md
spernsteiner Jun 10, 2024
6cf5615
mps CI: build aarch64 binaries
spernsteiner Jun 10, 2024
b2066fd
mps CI: don't use HARDENS docker image for mps-test
spernsteiner Jun 10, 2024
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
45 changes: 24 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,25 @@ jobs:
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
- name: Install aarch64 toolchain
run: sudo apt-get install -y {gcc,g++}-aarch64-linux-gnu
- name: Install verilator
run: sudo apt-get install -y verilator
- 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_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
run: |
cd components/mission_protection_system/src
make clean
# Build, then check it created the correct output file.
make rts_bottom CONFIG=self_test
[ -f rts_bottom.self_test ]
make rts CONFIG=self_test
[ -f rts.self_test ]
make rts CONFIG=no_self_test
[ -f rts.no_self_test ]
make rts CONFIG=self_test TARGET=aarch64
[ -f rts.self_test.aarch64 ]
make rts CONFIG=no_self_test TARGET=aarch64
[ -f rts.no_self_test.aarch64 ]
- name: Upload MPS binaries
uses: actions/upload-artifact@v4
with:
Expand All @@ -51,15 +56,13 @@ jobs:
run: |
chmod +x rts.*
mv rts.* components/mission_protection_system/src/.
- name: Install pip3
run: sudo apt-get install -y python3-pip
- 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
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
Expand Down
7 changes: 2 additions & 5 deletions components/mission_protection_system/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ src/self_test_data/tests.inc.c
# src/generated/SystemVerilog/actuator_impl.sv
# src/generated/SystemVerilog/instrumentation_impl.sv

# Ignore verilator files
src/generated/SystemVerilog/verilator/
src/handwritten/SystemVerilog/verilator/

# Ignore the compiled binary
# Ignore the build directories and compiled binaries
src/rts*
src/build*/
10 changes: 0 additions & 10 deletions components/mission_protection_system/build_aarch64.sh

This file was deleted.

Loading