@@ -154,6 +154,7 @@ jobs:
154
154
SOME_FEATURES : ${{ matrix.features || 'malloc,block,exception,foundation' }}
155
155
FEATURES : ${{ matrix.features || 'malloc,block,exception,foundation,catch-all,verify_message,uuid' }}
156
156
UNSTABLE_FEATURES : ${{ matrix.unstable-features || 'unstable-autoreleasesafe,unstable-c-unwind' }}
157
+ CMD : cargo
157
158
158
159
runs-on : ${{ matrix.os }}
159
160
@@ -187,7 +188,7 @@ jobs:
187
188
~/extern/include
188
189
~/extern/sdk
189
190
# Change this key if we start caching more things
190
- key : ${{ matrix.name }}-extern-v2
191
+ key : ${{ matrix.name }}-extern-v3
191
192
192
193
- name : Setup environment
193
194
# These add to PATH-like variables, so they can always be set
@@ -310,32 +311,33 @@ jobs:
310
311
311
312
- name : Install Cargo Dinghy
312
313
if : matrix.dinghy && steps.extern-cache.outputs.cache-hit != 'true'
313
- # TODO: Replace once cargo dinghy gets updated
314
- # cargo install cargo-dinghy --version=^0.4 --root=$HOME/extern --target=x86_64-apple-darwin
315
- run : cargo install --git https://github.com/madsmtm/dinghy.git --branch update-cargo --bin cargo-dinghy --root=$HOME/extern --target=x86_64-apple-darwin
314
+ run : cargo install cargo-dinghy --version=^0.6.0 --root=$HOME/extern --target=x86_64-apple-darwin
316
315
317
316
- name : Launch XCode Simulator and prepare Dinghy
318
317
if : matrix.dinghy
318
+ # Note that we're not testing all configurations with dinghy, since that
319
+ # takes a very long time to run, and hence impedes general development.
319
320
run : |
320
321
# Get system info
321
322
xcrun simctl list runtimes
322
323
323
324
# Launch the simulator
324
325
RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1)
325
- export SIM_ID=$(xcrun simctl create My-iphone7 com.apple.CoreSimulator.SimDeviceType.iPhone-7 $RUNTIME_ID)
326
+ SIM_ID=$(xcrun simctl create My-iphone7 com.apple.CoreSimulator.SimDeviceType.iPhone-7 $RUNTIME_ID)
326
327
xcrun simctl boot $SIM_ID
327
328
329
+ # Export variable
330
+ echo "CMD=$HOME/extern/bin/cargo-dinghy -d=$SIM_ID" >> $GITHUB_ENV
331
+
328
332
- name : Lint
329
333
# Temporarily allow `clippy::let_unit_value`
330
334
run : cargo clippy ${{ env.ARGS }} --all-targets -- --deny warnings --allow clippy::let_unit_value
331
335
332
336
- name : Build
333
- if : ${{ !matrix.dinghy }}
334
- run : cargo build ${{ env.ARGS }}
337
+ run : $CMD build ${{ env.ARGS }}
335
338
336
339
- name : Check documentation
337
- if : ${{ !matrix.dinghy }}
338
- run : cargo doc ${{ env.ARGS }} --no-deps --document-private-items
340
+ run : $CMD doc ${{ env.ARGS }} --no-deps --document-private-items
339
341
340
342
- name : Test without features
341
343
if : ${{ !matrix.dinghy }}
@@ -346,8 +348,7 @@ jobs:
346
348
run : cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --tests --features ${{ env.SOME_FEATURES }}
347
349
348
350
- name : Test with features
349
- if : ${{ !matrix.dinghy }}
350
- run : cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }}
351
+ run : $CMD test ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }}
351
352
352
353
- name : Test in release mode without features
353
354
if : ${{ !matrix.dinghy }}
@@ -386,14 +387,3 @@ jobs:
386
387
export HOST_TARGET=$(rustc -vV | grep host | cut -f2 -d' ')
387
388
388
389
cargo run --target=$HOST_TARGET --features=run --bin test-assembly -- ${{ env.ARGS }}
389
-
390
- - name : Build w. Cargo Dinghy
391
- if : matrix.dinghy
392
- run : cargo dinghy --device=$SIM_ID build ${{ matrix.args }}
393
-
394
- - name : Test w. Cargo Dinghy
395
- if : matrix.dinghy
396
- # Note that we're not testing more complex configurations, since that
397
- # takes a very long time to run in CI, and that impedes general
398
- # development work.
399
- run : cargo dinghy --device=$SIM_ID test ${{ matrix.args }}
0 commit comments