Skip to content

Commit

Permalink
[ci] Specify 7 as arm version for arm build in CI (#23436)
Browse files Browse the repository at this point in the history
**Description:**

Currently, we specify arm architecture in the cross build test without
specifying the `GOARM` variable. This means the `GOARM` value falls back
to the default and the default value depends on the platform that we are
building on.

We are building on `linux/amd64` machine in github action, so the
`GOARM` defaults to `5`. [There are changes to default to GOARM=7 for
all non-arm systems in the upcoming golang
version](https://go-review.googlesource.com/c/go/+/470695)

I'm looking to add an armv7 release, so without waiting for the newer
golang version, I want to explicitly set the arm version in the CI to
align with the release arm version.

In this pull request, I expanded the configuration for arm build by
adding a new block with the arm version under `include`. Then introduce
the `GOARM` environment variable when calling `make otelcontribcol`


**Testing:** 

Able to run `make GOOS=x GOARCH=y GOARM=z otelcontribcol` with the
following configurations locally

- [x] `GOOS=linux`, `GOARCH=arm`, `GOARM=7`
- [x] `GOOS=linux`, `GOARCH=arm64`, `GOARM=` 
- [x] `GOOS=darwin`, `GOARCH=amd64`, `GOARM=`
- [x] `GOOS=window`, `GOARCH=amd64`, `GOARM=`
  • Loading branch information
Wal8800 authored Jul 4, 2023
1 parent d51d313 commit 10e4660
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ jobs:
- arm
- arm64
- ppc64le
include:
- os: linux
- arch: arm
- arm: 7
exclude:
- os: darwin
arch: 386
Expand Down Expand Up @@ -429,7 +433,7 @@ jobs:
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Build Collector ${{ matrix.binary }}
run: make GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} otelcontribcol
run: make GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM=${{ matrix.arm }} otelcontribcol
- name: Upload Collector Binaries
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 10e4660

Please sign in to comment.