From 0dbc5301358bfc844261041d3f4208af07a0e7aa Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Tue, 29 Nov 2022 20:55:51 -0800 Subject: [PATCH] support ppc --- .github/workflows/golangci-lint.yml | 17 +++++++++++++++++ metadata/hostmetadata/host-linux_test.go | 4 ++-- metadata/hostmetadata/host-not-linux.go | 4 ++-- metadata/hostmetadata/host_linux.go | 4 ++-- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 36fd6a7..0360d7e 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -31,3 +31,20 @@ jobs: # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. skip-build-cache: true + cross-compile: + name: cross-compile + runs-on: ubuntu-latest + strategy: + matrix: + os: [ linux, windows, darwin ] + arch: [ ppc64le, amd64, arm64 ] + exclude: + - os: darwin + arch: ppc64le + - os: windows + arch: ppc64le + steps: + - uses: actions/checkout@v2 + - run: | + GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build ./... + diff --git a/metadata/hostmetadata/host-linux_test.go b/metadata/hostmetadata/host-linux_test.go index d8348e0..2837d82 100644 --- a/metadata/hostmetadata/host-linux_test.go +++ b/metadata/hostmetadata/host-linux_test.go @@ -1,5 +1,5 @@ -//go:build linux -// +build linux +//go:build linux && !ppc && !ppc64 && !ppc64le +// +build linux,!ppc,!ppc64,!ppc64le package hostmetadata diff --git a/metadata/hostmetadata/host-not-linux.go b/metadata/hostmetadata/host-not-linux.go index ca97f65..5624d2d 100644 --- a/metadata/hostmetadata/host-not-linux.go +++ b/metadata/hostmetadata/host-not-linux.go @@ -1,5 +1,5 @@ -//go:build !linux -// +build !linux +//go:build !linux || ppc || ppc64 || ppc64le +// +build !linux ppc ppc64 ppc64le package hostmetadata diff --git a/metadata/hostmetadata/host_linux.go b/metadata/hostmetadata/host_linux.go index cec9f50..23928ee 100644 --- a/metadata/hostmetadata/host_linux.go +++ b/metadata/hostmetadata/host_linux.go @@ -1,5 +1,5 @@ -//go:build linux -// +build linux +//go:build linux && !ppc && !ppc64 && !ppc64le +// +build linux,!ppc,!ppc64,!ppc64le package hostmetadata