Skip to content

Commit 95615cc

Browse files
committed
chore(CI): Add QEMU to CI Workflow
Signed-off-by: Mustafa Elbehery <[email protected]>
1 parent 092ee98 commit 95615cc

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
name: Cross-Platform Build Tests
3+
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build-aix:
12+
strategy:
13+
matrix:
14+
goarch: [386, amd64, arm, arm64, loong64, mips64x, mipsx, ppc, ppc64le, riscv64, s390x]
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
- id: goversion
19+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
20+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
21+
with:
22+
go-version: ${{ steps.goversion.outputs.goversion }}
23+
24+
- name: Build for aix/${{ matrix.goarch }}
25+
run: |
26+
export GOOS=aix GOARCH=${{ matrix.GOARCH }} go build ./...
27+
28+
build-android:
29+
strategy:
30+
matrix:
31+
goarch: [amd64, mips64x, ppc, riscv64, s390x]
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
- id: goversion
36+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
37+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
38+
with:
39+
go-version: ${{ steps.goversion.outputs.goversion }}
40+
41+
- name: Build for android/${{ matrix.goarch }}
42+
run: |
43+
GOOS=android GOARCH=${{ matrix.GOARCH }} go build ./...
44+
45+
build-linux:
46+
strategy:
47+
matrix:
48+
goarch: [mips64, mipsx, ppc]
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
- id: goversion
53+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
54+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
55+
with:
56+
go-version: ${{ steps.goversion.outputs.goversion }}
57+
58+
- name: Build for linux/${{ matrix.goarch }}
59+
run: |
60+
GOOS=linux GOARCH=${{ matrix.GOARCH }} go build ./...
61+
62+
build-openbsd:
63+
strategy:
64+
matrix:
65+
goarch: [mipsx, ppc, s390x, mipsx]
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
69+
- id: goversion
70+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
71+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
72+
with:
73+
go-version: ${{ steps.goversion.outputs.goversion }}
74+
75+
- name: Build for openbsd/${{ matrix.goarch }}
76+
run: |
77+
GOOS=openbsd GOARCH=${{ matrix.GOARCH }} go build ./...
78+
79+
build-solaris:
80+
strategy:
81+
matrix:
82+
goarch: [386, loong64, mipsx, ppc, ppc64, ppc64le, riscv64]
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
86+
- id: goversion
87+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
88+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
89+
with:
90+
go-version: ${{ steps.goversion.outputs.goversion }}
91+
92+
- name: Build for solaris/${{ matrix.goarch }}
93+
run: |
94+
GOOS=solaris GOARCH=${{ matrix.GOARCH }} go build ./...
95+
96+
build-unix:
97+
strategy:
98+
matrix:
99+
goarch: [386, arm, arm64, loong64, mipsx, riscv64, s390x]
100+
runs-on: ubuntu-latest
101+
steps:
102+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
103+
- id: goversion
104+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
105+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
106+
with:
107+
go-version: ${{ steps.goversion.outputs.goversion }}
108+
109+
- name: Build for unix/${{ matrix.goarch }}
110+
run: |
111+
GOOS=unix GOARCH=${{ matrix.GOARCH }} go build ./...
112+
113+
build-windows:
114+
strategy:
115+
matrix:
116+
goarch: [mips64x, ppc, ppc64, riscv64]
117+
runs-on: windows-latest
118+
steps:
119+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
120+
- id: goversion
121+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
122+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
123+
with:
124+
go-version: ${{ steps.goversion.outputs.goversion }}
125+
126+
- name: Build for windows/${{ matrix.goarch }}
127+
run: |
128+
GOOS=windows GOARCH=${{ matrix.GOARCH }} go build ./...

0 commit comments

Comments
 (0)