Skip to content

Add utilities for per-arch QEMU args #152

Add utilities for per-arch QEMU args

Add utilities for per-arch QEMU args #152

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Cancel running workflows on new push to a PR.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tidy:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: tidy
run: |
go mod tidy
go mod verify
git status
if [[ -n "$(git status --porcelain .)" ]]; then
echo 'go.mod/go.sum is out-of-date: run `go mod tidy` in the right module directories (see git status) and then check in the changes'
echo 'If `go mod tidy` results in no changes, make sure you are using the latest relase of Go'
git status --porcelain .
exit 1
fi
- name: gofmt
run: test -z "$(gofmt -s -l $(find -name '*.go'))"
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.21.x' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build ./...
- name: Build tools
run: cd ./tools/runvmtest && go build
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.21.x' ]
arch: [ 'amd64', 'arm', 'arm64', 'riscv64' ]
exclude:
# TODO: QEMU tests seem to time out.
- go-version: 1.21.x
arch: arm
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build runvm tool
run: (cd ./tools/runvmtest && go build)
- name: Test
run: |
VMTEST_ARCH=${{ matrix.arch }} ./tools/runvmtest/runvmtest -- \
go test -v -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... ./...
- uses: codecov/codecov-action@v4-beta
env:
CODECOV_TOKEN: '6793138f-7113-4561-aa24-08bdd9111678'
with:
flags: ${{ matrix.arch }}-${{ matrix.go-version }}
fail_ci_if_error: true
verbose: true