Skip to content

Commit

Permalink
[ci] Cross build for architectures (open-telemetry#5142)
Browse files Browse the repository at this point in the history
* [ci] Do cross architecture build of collector

This job will help to see if any issues introduced to cross binary builds,
when a commit is pushed.

Signed-off-by: Martin Hickey <[email protected]>

* Sync cross build list with opentelemetry-collector-releases

Update following review comment:
open-telemetry#5142 (comment)

Signed-off-by: Martin Hickey <[email protected]>

* Disable darwin 386 build

Go 1.15 dropped support for 32-bit binaries on macOS:
https://go.dev/doc/go1.15

Signed-off-by: Martin Hickey <[email protected]>
  • Loading branch information
hickeyma authored Apr 5, 2022
1 parent ff6a8f6 commit 9ca2c42
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,59 @@ jobs:
file: ./coverage.txt
fail_ci_if_error: true
verbose: true
cross-build-collector:
needs: [setup-environment]
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
# Go 1.15 dropped support for 32-bit binaries
# on macOS: https://go.dev/doc/go1.15
#- goos: darwin
# goarch: 386
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: linux
goarch: 386
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: windows
goarch: 386
- goos: windows
goarch: amd64

steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Cache Go
id: module-cache
uses: actions/cache@v3
with:
path: /home/runner/go/pkg/mod
key: go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Cache Tools
id: tool-cache
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod', './cmd/mdatagen/go.mod', './cmd/mdatagen/*.go') }}
- name: Build
env:
GOOS: ${{matrix.goos}}
GOARCH: ${{matrix.goarch}}
run: |
make otelcorecol

0 comments on commit 9ca2c42

Please sign in to comment.