From 9918467a8d8e0a40d3692bcf51d0d366115bb460 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 15 Jul 2024 11:04:02 +0100 Subject: [PATCH] Add self-hosted runner arch sanity check (#1767) --- .github/workflows/build_and_test.yaml | 3 +++ .github/workflows/build_linux.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 1100264..47ad0e4 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -94,6 +94,9 @@ jobs: - name: Install Yarn if: runner.environment == 'self-hosted' run: | + # Sanity check that the arch is arm64 as we expect + [[ $(uname -p) == "aarch64" ]] || exit 1 + sudo apt-get -qq update sudo apt-get install -y curl curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js diff --git a/.github/workflows/build_linux.yaml b/.github/workflows/build_linux.yaml index 6d91ce0..fbdd7d9 100644 --- a/.github/workflows/build_linux.yaml +++ b/.github/workflows/build_linux.yaml @@ -38,6 +38,9 @@ jobs: - name: Install missing tools if: runner.environment == 'self-hosted' run: | + # Sanity check that the arch is arm64 as we expect + [[ $(uname -p) == "aarch64" ]] || exit 1 + sudo apt-get -qq update # curl for yarn download, git for tj-actions/changed-files, zstd for actions/cache sudo apt-get install -y curl git zstd