Skip to content

Commit 6da1aed

Browse files
committed
Merge branch 'ci/build-simulators-macos'
2 parents 08e998c + 2594dd2 commit 6da1aed

File tree

1 file changed

+51
-3
lines changed

1 file changed

+51
-3
lines changed

.github/workflows/ci-common.yml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117

118118
# cmocka isn't compatible with Mach-O, so no point in running the C tests.
119119
rust-unit-tests-macos:
120-
runs-on: macos-14
120+
runs-on: macos-15
121121
steps:
122122
- name: Clone the repo
123123
uses: actions/checkout@v4
@@ -135,7 +135,7 @@ jobs:
135135
version: "21.x"
136136
repo-token: ${{ secrets.GITHUB_TOKEN }}
137137

138-
- name: Install rust
138+
- name: install rust
139139
uses: actions-rust-lang/setup-rust-toolchain@v1
140140
with:
141141
rust-src-dir: src/rust
@@ -238,7 +238,55 @@ jobs:
238238
build*/bin/*.bin
239239
build*/bin/*.elf
240240
build*/bin/*.map
241-
build*/bin/simulator
241+
build*/bin/simulator*
242+
243+
# Build simulators for macos aarch64
244+
build-macos:
245+
strategy:
246+
matrix:
247+
target:
248+
- simulator
249+
- simulator-graphical
250+
runs-on: macos-15
251+
steps:
252+
- name: Clone the repo
253+
uses: actions/checkout@v4
254+
with:
255+
# Github action is broken: https://github.com/actions/checkout/issues/1638
256+
# Remove the below line when the issue is resolved
257+
ref: ${{ github.ref }}
258+
fetch-depth: 0
259+
fetch-tags: true
260+
submodules: recursive
261+
262+
- name: Install system dependencies
263+
run: brew install cbindgen bindgen hidapi
264+
265+
- name: Install protoc
266+
uses: arduino/setup-protoc@v3
267+
with:
268+
version: "21.x"
269+
repo-token: ${{ secrets.GITHUB_TOKEN }}
270+
271+
- name: install rust
272+
uses: actions-rust-lang/setup-rust-toolchain@v1
273+
with:
274+
rust-src-dir: src/rust
275+
components: rust-src
276+
277+
- name: Build ${{ matrix.target }}
278+
run: make -j$(($(nproc)+1)) ${{ matrix.target }}
279+
280+
- name: Print hashes
281+
run: sha256sum build*/bin/*
282+
283+
- name: Upload artifact
284+
if: github.event_name == 'push' && !cancelled()
285+
uses: actions/upload-artifact@v4
286+
with:
287+
name: ${{matrix.target}}-apple-aarch64-darwin-${{github.sha}}.bin
288+
path: |
289+
build*/bin/simulator*
242290
243291
doc:
244292
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)