3838 cargo generate-lockfile -Z minimal-versions
3939 cargo test --features=custom,std
4040
41- # TODO: add aarch64-based macOS runner when it's supported by Github Actions
4241 main-tests :
4342 name : Tier 1 Test
4443 runs-on : ${{ matrix.os }}
4847 toolchain : [nightly, beta, stable, 1.36]
4948 # Only Test macOS on stable to reduce macOS CI jobs
5049 include :
50+ # x86_64-apple-darwin.
5151 - os : macos-12
5252 toolchain : stable
53+ # aarch64-apple-darwin.
54+ - os : macos-14
55+ toolchain : stable
5356 steps :
5457 - uses : actions/checkout@v3
5558 - uses : dtolnay/rust-toolchain@master
@@ -84,18 +87,43 @@ jobs:
8487
8588 ios-tests :
8689 name : iOS Simulator Test
87- runs-on : macos-12
90+ runs-on : ${{ matrix.os }}
91+ strategy :
92+ matrix :
93+ os : [macos-12, macos-14]
94+ # Only test on stable to reduce macOS CI jobs
95+ toolchain : [stable]
96+ include :
97+ # The Aarch64 device simulator doesn't seem to work on an x86-64 host
98+ # and the x86_64 device simulator doesn't seem to work on an Aarch64
99+ # host, at least within GitHub Actions.
100+ - os : macos-12
101+ target : x86_64-apple-ios
102+ ios_platform : auto-ios-x86_64
103+ - os : macos-14
104+ target : aarch64-apple-ios-sim
105+ ios_platform : auto-ios-aarch64-sim
88106 steps :
89107 - uses : actions/checkout@v3
90108 - uses : dtolnay/rust-toolchain@stable
91109 with :
92- targets : x86_64-apple-ios
110+ targets : ${{ matrix.target }}
111+ # There is no precompiled cargo-dinghy for Aarch64. The precompiled
112+ # x86_64 binary runs on ARM64 macOS via Rosetta 2, but it fails to
113+ # correctly interface with macOS toolchain.
93114 - name : Install precompiled cargo-dinghy
115+ if : ${{ matrix.target == 'x86_64-apple-ios' }}
94116 run : |
95117 VERSION=0.6.2
96118 URL="https://github.com/sonos/dinghy/releases/download/${VERSION}/cargo-dinghy-macos-${VERSION}.tgz"
97119 wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
98- cargo dinghy --version
120+ - name : cargo install cargo-dinghy
121+ if : ${{ matrix.target == 'aarch64-apple-ios-sim' }}
122+ run : |
123+ VERSION=0.6.2
124+ cargo install cargo-dinghy --version ${VERSION}
125+ - name : Check cargo-dinghy version.
126+ run : cargo dinghy --version
99127 - name : Setup Simulator
100128 # Use the first installed iOS runtime and the first (i.e. oldest) supported iPhone device.
101129 run : |
@@ -110,7 +138,7 @@ jobs:
110138 echo "device=$SIM_ID" >> $GITHUB_ENV
111139 - uses : Swatinem/rust-cache@v2
112140 - name : Run tests
113- run : cargo dinghy -d ${{ env.device }} test
141+ run : cargo dinghy -p ${{ matrix.ios_platform }} - d ${{ env.device }} test
114142
115143 windows-tests :
116144 name : Windows Test
0 commit comments