refact: Only use the arm64 runner to run the tests. #199
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Snap Build and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allow manual trigger | |
workflow_dispatch: | |
jobs: | |
build-arm64: | |
# ARM64 runner | |
runs-on: Ubuntu_ARM64_4C_16G_01 | |
# runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Native Build on ARM64 | |
- name: Build Snap | |
uses: snapcore/action-build@v1 | |
id: build | |
# QEMU Build on ARM64 | |
# - name: Setup QEMU | |
# uses: docker/setup-qemu-action@v3 | |
# with: | |
# platforms: arm64 | |
# - name: Build snap for arm64 | |
# uses: diddlesnaps/snapcraft-multiarch-action@v1 | |
# id: build | |
# with: | |
# architecture: arm64 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: matter-pi-gpio-commander_${{ github.run_number}}_arm64.snap | |
path: ${{ steps.build.outputs.snap }} | |
test-arm64: | |
needs: build-arm64 | |
runs-on: Ubuntu_ARM64_4C_16G_01 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download snap artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: matter-pi-gpio-commander_${{ github.run_number}}_arm64.snap | |
path: . | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.*' | |
cache: false | |
- name: Run tests | |
working-directory: tests | |
env: | |
MOCK_GPIO: true | |
SKIP_TEARDOWN_REMOVAL: true | |
LOCAL_SERVICE_SNAP: ../matter-pi-gpio-commander_*_arm64.snap | |
run: go test -failfast -p 1 -timeout 20m -v | |
- name: Upload snap logs | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: snap-logs | |
path: tests/*.log |