Skip to content

Commit

Permalink
[ci] Do cross architecture build of collector
Browse files Browse the repository at this point in the history
This job will help to see if any issues introduced to cross binary builds,
when a commit is pushed.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
  • Loading branch information
hickeyma committed Apr 5, 2022
1 parent ff6a8f6 commit 0af2172
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,49 @@ 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:
- goos: linux
goarch: 386
- goos: linux
goarch: arm64
- goos: darwin
goarch: arm64
- goos: windows
goarch: 386

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 0af2172

Please sign in to comment.