Skip to content

Commit 4a3a628

Browse files
committed
GitHub: add Golang cross compilation check
1 parent f8881cc commit 4a3a628

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,40 @@ jobs:
8888
- name: build CLI binaries
8989
run: make go-install-cli
9090

91+
########################
92+
# cross compilation
93+
########################
94+
cross-compile:
95+
name: cross compilation
96+
runs-on: ubuntu-latest
97+
strategy:
98+
fail-fast: true
99+
matrix:
100+
# Please keep this list in sync with make/release_flags.mk!
101+
include:
102+
- name: i386
103+
sys: linux-386
104+
- name: amd64
105+
sys: darwin-amd64 linux-amd64 windows-amd64
106+
- name: arm
107+
sys: darwin-arm64 linux-armv6 linux-armv7 linux-arm64
108+
steps:
109+
- name: cleanup space
110+
run: rm -rf /opt/hostedtoolcache
111+
112+
- name: git checkout
113+
uses: actions/checkout@v4
114+
115+
- name: setup go ${{ env.GO_VERSION }}
116+
uses: ./.github/actions/setup-go
117+
with:
118+
go-version: '${{ env.GO_VERSION }}'
119+
key-prefix: cross-compile
120+
use-build-cache: 'no'
121+
122+
- name: build release for all architectures (skip app build)
123+
run: make go-release sys="${{ matrix.sys }}"
124+
91125
########################
92126
# proto compile check
93127
########################

0 commit comments

Comments
 (0)