From 2e8bd937951afb0c26caeb2083c11ffa297bebaf Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 27 Jan 2025 13:02:58 +0000 Subject: [PATCH] Switch to arm runners instead of self-hosted dind runners (#2098) --- .github/workflows/build_and_test.yaml | 17 ++--------------- .github/workflows/build_linux.yaml | 16 +--------------- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 6527f91c..c0874163 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -73,12 +73,12 @@ jobs: executable: "/opt/Element/element-desktop" prepare_cmd: "sudo apt-get -qq update && sudo apt install ./dist/*.deb" - name: "Linux (arm64) (sqlcipher: system)" - os: dind-l-arm64 + os: ubuntu-22.04-arm artifact: linux-arm64-sqlcipher-system executable: "/opt/Element/element-desktop" prepare_cmd: "sudo apt-get -qq update && sudo apt install -y ./dist/*.deb" - name: "Linux (arm64) (sqlcipher: static)" - os: dind-l-arm64 + os: ubuntu-22.04-arm artifact: linux-arm64-sqlcipher-static executable: "/opt/Element/element-desktop" prepare_cmd: "sudo apt-get -qq update && sudo apt install -y ./dist/*.deb" @@ -93,19 +93,6 @@ jobs: name: Test ${{ matrix.name }} runs-on: ${{ matrix.os }} steps: - # Workaround for self-hosted runners lacking yarn - - 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 - chmod +x $HOME/bin/yarn - echo "$HOME/bin" >> $GITHUB_PATH - - uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/.github/workflows/build_linux.yaml b/.github/workflows/build_linux.yaml index 701c4c8e..33022b06 100644 --- a/.github/workflows/build_linux.yaml +++ b/.github/workflows/build_linux.yaml @@ -28,7 +28,7 @@ jobs: # We build the hak files on native infrastructure as matrix-seshat fails to cross-compile properly # https://github.com/matrix-org/seshat/issues/135 hak: - runs-on: ${{ inputs.arch == 'arm64' && 'dind-l-arm64' || 'ubuntu-22.04' }} + runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04' }} env: HAK_DOCKER_IMAGE: ghcr.io/element-hq/element-desktop-dockerbuild outputs: @@ -36,20 +36,6 @@ jobs: arch: ${{ steps.config.outputs.arch }} build-args: ${{ steps.config.outputs.build-args }} steps: - # Workaround for self-hosted runners lacking tools - - 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 - curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js - chmod +x $HOME/bin/yarn - echo "$HOME/bin" >> $GITHUB_PATH - - name: Resolve docker image tag for push if: github.event_name == 'push' run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:$GITHUB_REF_NAME" >> $GITHUB_ENV