@@ -87,18 +87,43 @@ jobs:
87
87
88
88
ios-tests :
89
89
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
91
106
steps :
92
107
- uses : actions/checkout@v3
93
108
- uses : dtolnay/rust-toolchain@stable
94
109
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.
96
114
- name : Install precompiled cargo-dinghy
115
+ if : ${{ matrix.target == 'x86_64-apple-ios' }}
97
116
run : |
98
117
VERSION=0.6.2
99
118
URL="https://github.com/sonos/dinghy/releases/download/${VERSION}/cargo-dinghy-macos-${VERSION}.tgz"
100
119
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
102
127
- name : Setup Simulator
103
128
# Use the first installed iOS runtime and the first (i.e. oldest) supported iPhone device.
104
129
run : |
@@ -113,7 +138,7 @@ jobs:
113
138
echo "device=$SIM_ID" >> $GITHUB_ENV
114
139
- uses : Swatinem/rust-cache@v2
115
140
- name : Run tests
116
- run : cargo dinghy -d ${{ env.device }} test
141
+ run : cargo dinghy -p ${{ matrix.ios_platform }} - d ${{ env.device }} test
117
142
118
143
windows-tests :
119
144
name : Windows Test
0 commit comments