Skip to content

Commit 331e79d

Browse files
authored
added CI tests for macOS (#13)
Added a matrix to run the CI jobs, using both `ubuntu-latest` and `macos-latest`.
2 parents 888d8eb + 7f8d3d0 commit 331e79d

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,33 @@ concurrency:
1313

1414
jobs:
1515
ci:
16-
runs-on: ubuntu-latest
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest]
1720
steps:
18-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
1922

20-
- name: Rust compilation prerequisites
23+
- name: Rust compilation prerequisites (Ubuntu)
24+
if: contains(matrix.os, 'ubuntu')
2125
run: |
2226
sudo apt update
2327
sudo apt install -y \
2428
protobuf-compiler
2529
rustup target add wasm32-unknown-unknown
2630
rustup component add rustfmt clippy rust-src
2731
32+
- name: Install Cargo (MacOS)
33+
if: contains(matrix.os, 'macos')
34+
run: |
35+
curl https://sh.rustup.rs -sSf -y | sh
36+
brew install protobuf
37+
rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin
38+
rustup component add rust-src --toolchain stable-aarch64-apple-darwin
39+
2840
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
2941
- name: Free Disk Space (Ubuntu)
42+
if: contains(matrix.os, 'ubuntu')
3043
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
3144
with:
3245
android: true # This alone is a 12 GB save.
@@ -58,7 +71,7 @@ jobs:
5871
build-docker:
5972
runs-on: ubuntu-latest
6073
steps:
61-
- uses: actions/checkout@v3
74+
- uses: actions/checkout@v4
6275

6376
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
6477
- name: Free Disk Space (Ubuntu)

0 commit comments

Comments
 (0)