38
38
cargo generate-lockfile -Z minimal-versions
39
39
cargo test --features=custom,std
40
40
41
- # TODO: add aarch64-based macOS runner when it's supported by Github Actions
42
41
main-tests :
43
42
name : Tier 1 Test
44
43
runs-on : ${{ matrix.os }}
48
47
toolchain : [nightly, beta, stable, 1.36]
49
48
# Only Test macOS on stable to reduce macOS CI jobs
50
49
include :
50
+ # x86_64-apple-darwin.
51
51
- os : macos-12
52
52
toolchain : stable
53
+ # aarch64-apple-darwin.
54
+ - os : macos-14
55
+ toolchain : stable
53
56
steps :
54
57
- uses : actions/checkout@v3
55
58
- uses : dtolnay/rust-toolchain@master
@@ -84,18 +87,43 @@ jobs:
84
87
85
88
ios-tests :
86
89
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
88
106
steps :
89
107
- uses : actions/checkout@v3
90
108
- uses : dtolnay/rust-toolchain@stable
91
109
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.
93
114
- name : Install precompiled cargo-dinghy
115
+ if : ${{ matrix.target == 'x86_64-apple-ios' }}
94
116
run : |
95
117
VERSION=0.6.2
96
118
URL="https://github.com/sonos/dinghy/releases/download/${VERSION}/cargo-dinghy-macos-${VERSION}.tgz"
97
119
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
99
127
- name : Setup Simulator
100
128
# Use the first installed iOS runtime and the first (i.e. oldest) supported iPhone device.
101
129
run : |
@@ -110,7 +138,7 @@ jobs:
110
138
echo "device=$SIM_ID" >> $GITHUB_ENV
111
139
- uses : Swatinem/rust-cache@v2
112
140
- name : Run tests
113
- run : cargo dinghy -d ${{ env.device }} test
141
+ run : cargo dinghy -p ${{ matrix.ios_platform }} - d ${{ env.device }} test
114
142
115
143
windows-tests :
116
144
name : Windows Test
0 commit comments