Skip to content

Commit 7bfd7ca

Browse files
committed
DEBUGINFRA-861: Run tests on Arm-based Macs
1 parent 3e1862d commit 7bfd7ca

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test
22

33
on:
44
workflow_dispatch:
5-
push:
5+
push:
66
branches: [main]
77
pull_request:
88
paths:
@@ -85,20 +85,27 @@ jobs:
8585
run: |
8686
make test-xmllint-localrepository
8787
88-
test-amd64:
88+
test-native:
8989
strategy:
9090
matrix:
91-
# Tests on Mac are currently broken
91+
# Runners
92+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
9293
goos: [windows, linux, darwin]
9394
include:
9495
- goos: windows
9596
runs-on: windows-latest
97+
arch: amd64
9698
- goos: linux
9799
runs-on: ubuntu-latest
100+
arch: amd64
98101
- goos: darwin
99102
runs-on: macos-latest
103+
arch: amd64
104+
- goos: darwin
105+
runs-on: macos-14
106+
arch: arm64
100107

101-
name: "${{ matrix.goos }} | amd64"
108+
name: "${{ matrix.goos }} | ${{ matrix.arch }} native"
102109
runs-on: ${{ matrix.runs-on }}
103110
steps:
104111
- name: Check out repository code
@@ -116,13 +123,13 @@ jobs:
116123
- name: Run unit tests
117124
run: |
118125
mkdir -p build
119-
make test > build/cpackgettests-${{ matrix.goos }}-amd64.txt
126+
make test > build/cpackgettests-${{ matrix.goos }}-${{ matrix.arch }}.txt
120127
121128
- name: Generate JUnit test report
122129
if: always()
123130
run: |
124-
go-junit-report -set-exit-code -in build/cpackgettests-${{ matrix.goos }}-amd64.txt -iocopy -out build/cpackget-testreport-${{ matrix.goos }}-amd64.xml
125-
131+
go-junit-report -set-exit-code -in build/cpackgettests-${{ matrix.goos }}-${{ matrix.arch }}.txt -iocopy -out build/cpackget-testreport-${{ matrix.goos }}-${{ matrix.arch }}.xml
132+
126133
- name: Publish coverage report to Code Climate
127134
if: ${{ startsWith(matrix.runs-on, 'ubuntu') && (github.workflow != 'Release') }}
128135
uses: paambaati/codeclimate-action@v5.0.0
@@ -136,12 +143,12 @@ jobs:
136143
- name: Archive unit test results
137144
uses: actions/upload-artifact@v4
138145
with:
139-
name: test-results-${{ matrix.goos }}-amd64
140-
path: ./build/cpackget-testreport-${{ matrix.goos }}-amd64.xml
146+
name: test-results-${{ matrix.goos }}-${{ matrix.arch }}
147+
path: ./build/cpackget-testreport-${{ matrix.goos }}-${{ matrix.arch }}.xml
141148
if-no-files-found: error
142149

143-
test-linux-arm64:
144-
name: "linux | arm64"
150+
test-linux-arm64-emulated:
151+
name: "linux | arm64 emulated"
145152
runs-on: ubuntu-latest
146153
steps:
147154
- name: Unit testing
@@ -183,7 +190,7 @@ jobs:
183190
- name: Generate JUnit test report
184191
run: |
185192
go-junit-report -set-exit-code -in ${PWD}/artifacts/cpackgettests-linux-arm64.txt -iocopy -out ./cpackget-testreport-linux-arm64.xml
186-
193+
187194
- name: Archive unit test results
188195
uses: actions/upload-artifact@v4
189196
with:

0 commit comments

Comments
 (0)