Skip to content

Commit 449ff42

Browse files
committed
Add macOS-arm64 runners in build and test steps of the CI
Handle "error: externally-managed-environment" on macOS arm64 runners by allow pip to modify an EXTERNALLY-MANAGED Python installation with `--break-system-packages` option
1 parent 93c0a5e commit 449ff42

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/actions/build-upload-mithril-artifact/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,19 @@ runs:
1919
run: echo "short_sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
2020

2121
- name: Add commit short sha to Cargo.tomls version
22+
if: matrix.os != 'macos-14'
2223
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
2324
run: |
2425
pip3 install toml
2526
python3 ./.github/workflows/scripts/edit-cargo-toml-version.py -l "${{ steps.label.outputs.short_sha }}"
2627
28+
- name: Add commit short sha to Cargo.tomls version on macOS-arm64 runners
29+
if: matrix.os == 'macos-14'
30+
shell: bash
31+
run: |
32+
pip3 install toml --break-system-packages
33+
python3 ./.github/workflows/scripts/edit-cargo-toml-version.py -l "${{ steps.label.outputs.short_sha }}"
34+
2735
- name: Cargo build - Binaries - Distribution
2836
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
2937
run: cargo build --release ${{ inputs.binaries-build-args }} ${{ inputs.common-build-args }}

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@ jobs:
7575
strategy:
7676
fail-fast: false
7777
matrix:
78-
os: [ macos-12, windows-latest ]
78+
os: [ macos-12, macos-14, windows-latest ]
7979

8080
include:
8181
# Only build client on windows & mac
8282
- os: macos-12
8383
binaries-build-args: --bin mithril-client --features bundle_openssl
8484
libraries-build-args: --package mithril-stm --package mithril-client --features full,unstable
85+
- os: macos-14
86+
binaries-build-args: --bin mithril-client --features bundle_openssl
87+
libraries-build-args: --package mithril-stm --package mithril-client --features full,unstable
8588
- os: windows-latest
8689
# Use `--bins --package <package>` instead of `--bin <package>`, otherwise the 'windows' compatibility
8790
# hack in mithril common cargo.toml doesn't apply (we have no idea why).
@@ -163,14 +166,16 @@ jobs:
163166
strategy:
164167
fail-fast: false
165168
matrix:
166-
os: [ ubuntu-22.04, macos-12, windows-latest ]
169+
os: [ ubuntu-22.04, macos-12, macos-14, windows-latest ]
167170

168171
include:
169172
- os: ubuntu-22.04
170173
test-args: --features full,unstable --workspace
171174
# Only test client on windows & mac (since its the only binaries supported for those os for now)
172175
- os: macos-12
173176
test-args: --package mithril-client --package mithril-client-cli --features full,unstable
177+
- os: macos-14
178+
test-args: --package mithril-client --package mithril-client-cli --features full,unstable
174179
- os: windows-latest
175180
test-args: --package mithril-client --package mithril-client-cli --features full,unstable
176181

0 commit comments

Comments
 (0)