From 2351b6fd759a8ffb091bfe7914f0a03ea1e67068 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 28 Nov 2024 19:44:21 +0100 Subject: [PATCH] Check GitHub runner architecture Make sure that the releases are built for the expected target arch. --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 73ac86894d..4b847b3f31 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,6 +85,15 @@ jobs: build-linux-x86_64: runs-on: ubuntu-latest steps: + - name: Check architecture + run: | + arch=$(uname -m) + if [[ "$arch" != x86_64 ]] + then + echo "Unexpected architecture: $arch" >&2 + exit 1 + fi + - name: Checkout code uses: actions/checkout@v4 @@ -181,6 +190,15 @@ jobs: build-macos-aarch64: runs-on: macos-latest steps: + - name: Check architecture + run: | + arch=$(uname -m) + if [[ "$arch" != aarch64 ]] + then + echo "Unexpected architecture: $arch" >&2 + exit 1 + fi + - name: Checkout code uses: actions/checkout@v4 @@ -209,6 +227,15 @@ jobs: build-macos-x86_64: runs-on: macos-13 steps: + - name: Check architecture + run: | + arch=$(uname -m) + if [[ "$arch" != x86_64 ]] + then + echo "Unexpected architecture: $arch" >&2 + exit 1 + fi + - name: Checkout code uses: actions/checkout@v4