From db0eab7589d8fe847fd8935318cdc19698d56772 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Sun, 23 Apr 2023 17:46:00 +0100 Subject: [PATCH] Add miri test step --- .github/workflows/build-and-test.yml | 4 ++++ justfile | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f92a6c08..12e125b0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,6 +18,10 @@ jobs: steps: - name: Install build tools run: sudo apt-get update && sudo apt-get install build-essential binutils-arm-none-eabi libelf-dev zip -y + - name: Install Miri + run: | + rustup component add miri + cargo miri setup - uses: actions/checkout@v3 - name: Cache uses: actions/cache@v3 diff --git a/justfile b/justfile index 4a0b9e7d..9c6f9c7d 100644 --- a/justfile +++ b/justfile @@ -59,7 +59,7 @@ check-linker-script-consistency: find -type f -name gba.ld -print0 | xargs -0 -n1 cmp -- agb/gba.ld find -type f -name gba_mb.ld -print0 | xargs -0 -n1 cmp -- agb/gba_mb.ld -ci: check-linker-script-consistency build-debug clippy fmt-check test build-release test-release doctest-agb build-roms build-book check-docs +ci: check-linker-script-consistency build-debug clippy fmt-check test miri build-release test-release doctest-agb build-roms build-book check-docs build-roms: just _build-rom "examples/the-purple-night" "PURPLENIGHT" @@ -85,6 +85,9 @@ publish *args: (_run-tool "publish" args) release +args: (_run-tool "release" args) +miri: + (cd agb-hashmap && cargo miri test) + _run-tool +tool: (cd tools && cargo build) "$CARGO_TARGET_DIR/debug/tools" {{tool}}