Run in unsupported architectures #32
Workflow file for this run
This file contains hidden or 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: Go | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ '*' ] | |
jobs: | |
supported: | |
strategy: | |
matrix: | |
go: [ '1.21', '1.22' ] | |
runner: [ 'ubuntu-latest', 'ubuntu-24.04-arm' ] | |
runs-on: ${{ matrix.runner }} | |
name: Go ${{ matrix.go }} ${{ matrix.runner }} supported test | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
unsupported: | |
strategy: | |
matrix: | |
go: [ '1.21', '1.22' ] | |
runs-on: ubuntu-latest | |
name: Go ${{ matrix.go }} unsupported test | |
steps: | |
- name: install qemu | |
run: sudo apt install --yes qemu-user-static | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Build | |
run: GOARCH=riscv64 go build -v ./... | |
- name: Test | |
run: | | |
GOARCH=riscv64 go test -v ./... -c -o test.riscv64 | |
qemu-riscv64-static test.riscv64 -test.v |