Skip to content

Commit

Permalink
ghactions: Use ubuntu runner for tests
Browse files Browse the repository at this point in the history
M1 macos runners can't build our test code, and the M1 runners don't
support nested virt, which is required by `make test`
Since I expect in the future the x86_64 macos runners to go away, and
since the ubuntu runners now support nested virt, this commit uses an
ubuntu runner to run `make test`.

This fixes #358

Signed-off-by: Christophe Fergeau <[email protected]>
  • Loading branch information
cfergeau committed May 17, 2024
1 parent 647723a commit 923f48c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,25 @@ jobs:
path: bin/*

tests:
runs-on: macos-latest # Only Mac runners support nested virt
runs-on: ubuntu-latest # The runner must support nested virt
needs: build # Don't bother testing if cross arch build fails
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

- name: Install
- name: Install qemu
run: |
brew install qemu
touch continue
sudo apt install qemu-kvm
sudo usermod -a -G kvm $USER
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Test
run: make test
run: |
sudo -s -u ${USER} bash -c 'make test'
- uses: actions/upload-artifact@v4
if: always()
Expand Down

0 comments on commit 923f48c

Please sign in to comment.