Skip to content

Commit df6ae3e

Browse files
author
Mustafa Elbehery
committed
chore(CI): Add QEMU to CI Workflow
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
1 parent fde6016 commit df6ae3e

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Cross-Platform Tests
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
cross-test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
goos: [linux]
16+
goarch: [arm, mips, mipsle, mips64, mips64le, ppc64, ppc64le, s390x]
17+
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
- id: goversion
21+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
22+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
23+
with:
24+
go-version: ${{ steps.goversion.outputs.goversion }}
25+
26+
- name: Setup binfmt
27+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
28+
with:
29+
platforms: all
30+
31+
- name: Build for ${{ matrix.goos }}/${{ matrix.goarch }}
32+
run: |
33+
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build ./...
34+
35+
- name: Run tests
36+
run: |
37+
GOBIN= GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} make gofail-enable && make test

0 commit comments

Comments
 (0)