Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] split arm builds into their own workflow #10113

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/build-and-test-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: build-and-test-arm
on:
push:
branches: [ main ]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
merge_group:
pull_request:
env:
TEST_RESULTS: testbed/tests/results/junit/results.xml
# Make sure to exit early if cache segment download times out after 2 minutes.
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
GOPROXY: https://goproxy1.cncf.selfactuated.dev,direct

# Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
arm-unittest-matrix:
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run ARM') || github.event_name == 'push' || github.event_name == 'merge_group') }}
runs-on: actuated-arm64-4cpu-4gb
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "~1.22.2"
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v4
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-build-cache-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Run Unit Tests
run: make -j4 gotest
arm-unittest:
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run ARM') || github.event_name == 'push' || github.event_name == 'merge_group') }}
runs-on: actuated-arm64-4cpu-4gb
needs: [arm-unittest-matrix]
steps:
- name: Print result
run: echo ${{ needs.arm-unittest-matrix.result }}
- name: Interpret result
run: |
if [[ success == ${{ needs.arm-unittest-matrix.result }} ]]
then
echo "All matrix jobs passed!"
else
echo "One or more matrix jobs failed."
false
fi
5 changes: 1 addition & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ jobs:
unittest-matrix:
strategy:
matrix:
runner: [ubuntu-latest, actuated-arm64-4cpu-4gb]
exclude:
- go-version: "~1.21.9"
runner: actuated-arm64-4cpu-4gb
runner: [ubuntu-latest]
go-version: ["~1.22", "~1.21.9"] # 1.20 needs quotes otherwise it's interpreted as 1.2
runs-on: ${{ matrix.runner }}
needs: [setup-environment]
Expand Down
Loading