Skip to content

Commit

Permalink
GitHub: add Golang cross compilation check
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Jan 23, 2025
1 parent f8881cc commit 2a2130f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,40 @@ jobs:
- name: build CLI binaries
run: make go-install-cli

########################
# cross compilation
########################
cross-compile:
name: cross compilation
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
# Please keep this list in sync with make/release_flags.mk!
include:
- name: i386
sys: linux-386
- name: amd64
sys: darwin-amd64 linux-amd64 windows-amd64
- name: arm
sys: darwin-arm64 linux-armv6 linux-armv7 linux-arm64
steps:
- name: cleanup space
run: rm -rf /opt/hostedtoolcache

- name: git checkout
uses: actions/checkout@v4

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'
key-prefix: cross-compile
use-build-cache: 'no'

- name: build release for all architectures
run: make release sys="${{ matrix.sys }}"

########################
# proto compile check
########################
Expand Down

0 comments on commit 2a2130f

Please sign in to comment.