From 8f6d208e313b731e81bff039fb1384998d9cb585 Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Wed, 23 Jul 2025 21:36:20 +0000 Subject: [PATCH] use arm64 runners for arm builds (#2192) * use arm64 runners for arm builds * use matrix for linux builds on prs * remove unused "kind" --- .github/workflows/artifacts.yml | 4 ++-- .github/workflows/docker.yml | 5 ++++- .github/workflows/pr.yml | 17 ++++++++++++++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index bc31add1..ce29b7cd 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -151,10 +151,10 @@ jobs: - os: ubuntu-latest kind: linux target: linux-musl-x64 - - os: ubuntu-latest + - os: ubuntu-24.04-arm kind: linux target: linux-arm - - os: ubuntu-latest + - os: ubuntu-24.04-arm kind: linux target: linux-arm64 - os: windows-latest diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c58c4c4..230835c1 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,20 +22,23 @@ on: jobs: build_and_push: name: Build & Publish - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} if: contains(github.event.head_commit.message, '[no build]') == false strategy: matrix: include: - name: base + os: ubuntu-latest path: '' suffix: '' qemu: false - name: arm32v7 + os: ubuntu-24.04-arm path: 'arm32v7/' suffix: '-arm' qemu: true - name: arm64 + os: ubuntu-24.04-arm path: 'arm64/' suffix: '-arm64' qemu: true diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d6e2ab3a..5635fdd5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -33,7 +33,18 @@ jobs: cd ErsatzTV-Windows cargo build --release --all-features build_and_test_linux: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + target: linux-x64 + - os: ubuntu-latest + target: linux-musl-x64 + - os: ubuntu-24.04-arm + target: linux-arm + - os: ubuntu-24.04-arm + target: linux-arm64 steps: - name: Get the sources uses: actions/checkout@v4 @@ -47,13 +58,13 @@ jobs: run: dotnet clean --configuration Release && dotnet nuget locals all --clear - name: Install dependencies - run: dotnet restore -p:RestoreEnablePackagePruning=true -r linux-x64 + run: dotnet restore -p:RestoreEnablePackagePruning=true -r "${{ matrix.target }}" - name: Prep project file run: sed -i '/Scanner/d' ErsatzTV/ErsatzTV.csproj - name: Build - run: dotnet build ErsatzTV/ErsatzTV.csproj --runtime linux-x64 --configuration Release --no-restore && dotnet build --configuration Release --no-restore + run: dotnet build ErsatzTV/ErsatzTV.csproj --runtime "${{ matrix.target }}" --configuration Release --no-restore && dotnet build --configuration Release --no-restore - name: Test run: dotnet test --blame-hang-timeout "2m" --no-restore --verbosity normal