Skip to content

Run in unsupported architectures (#22) #34

Run in unsupported architectures (#22)

Run in unsupported architectures (#22) #34

Workflow file for this run

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: Update package index
run: sudo apt-get update
- 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