@@ -87,18 +87,43 @@ jobs:
8787
8888 ios-tests :
8989 name : iOS Simulator Test
90- 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
91106 steps :
92107 - uses : actions/checkout@v3
93108 - uses : dtolnay/rust-toolchain@stable
94109 with :
95- 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.
96114 - name : Install precompiled cargo-dinghy
115+ if : ${{ matrix.target == 'x86_64-apple-ios' }}
97116 run : |
98117 VERSION=0.6.2
99118 URL="https://github.com/sonos/dinghy/releases/download/${VERSION}/cargo-dinghy-macos-${VERSION}.tgz"
100119 wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
101- 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
102127 - name : Setup Simulator
103128 # Use the first installed iOS runtime and the first (i.e. oldest) supported iPhone device.
104129 run : |
@@ -113,7 +138,7 @@ jobs:
113138 echo "device=$SIM_ID" >> $GITHUB_ENV
114139 - uses : Swatinem/rust-cache@v2
115140 - name : Run tests
116- run : cargo dinghy -d ${{ env.device }} test
141+ run : cargo dinghy -p ${{ matrix.ios_platform }} - d ${{ env.device }} test
117142
118143 windows-tests :
119144 name : Windows Test
0 commit comments