Skip to content

Commit

Permalink
fail ci job immediately if the architecture is not as expected
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Jun 12, 2024
1 parent c08b2cd commit 3732cb4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ jobs:
matrix:
system: [macos-latest, pqcp-arm64]
skipped: [false]
expect_arch: [ arm64 ]
include:
- system: ubuntu-latest
cross_prefix: aarch64-none-linux-gnu-
skipped: true
expect_arch: x86_64
name: build_kat (${{ matrix.system }})
runs-on: ${{ matrix.system }}
steps:
Expand All @@ -24,15 +26,21 @@ jobs:
uses: ./.github/actions/setup-nix
with:
script: |
ARCH=$(uname -m)
cat >> $GITHUB_STEP_SUMMARY <<-EOF
## Setup
Architecture: $(uname -m)
Architecture: $ARCH
- $(uname -a)
- $(nix --version)
- $(astyle --version)
- $(${{ matrix.cross_prefix }}gcc --version | grep -m1 "")
- $(bash --version | grep -m1 "")
EOF
if [[ "$ARCH" != ${{ matrix.expect_arch }} ]]; then
echo ":x: Expecting to run on ${{ matrix.expect_arch }}, but instead running on $ARCH" >> $GITHUB_STEP_SUMMARY
exit 1
fi
- name: Build targets
shell: nix develop .#ci -c bash -e {0}
run: |
Expand Down

0 comments on commit 3732cb4

Please sign in to comment.