Skip to content

Commit 4952d8c

Browse files
committed
Update cargo-dinghy to v0.6.0
1 parent fd4d941 commit 4952d8c

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ jobs:
154154
SOME_FEATURES: ${{ matrix.features || 'malloc,block,exception,foundation' }}
155155
FEATURES: ${{ matrix.features || 'malloc,block,exception,foundation,catch-all,verify_message,uuid' }}
156156
UNSTABLE_FEATURES: ${{ matrix.unstable-features || 'unstable-autoreleasesafe,unstable-c-unwind' }}
157+
CMD: cargo
157158

158159
runs-on: ${{ matrix.os }}
159160

@@ -187,7 +188,7 @@ jobs:
187188
~/extern/include
188189
~/extern/sdk
189190
# Change this key if we start caching more things
190-
key: ${{ matrix.name }}-extern-v2
191+
key: ${{ matrix.name }}-extern-v3
191192

192193
- name: Setup environment
193194
# These add to PATH-like variables, so they can always be set
@@ -310,32 +311,33 @@ jobs:
310311

311312
- name: Install Cargo Dinghy
312313
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
316315

317316
- name: Launch XCode Simulator and prepare Dinghy
318317
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.
319320
run: |
320321
# Get system info
321322
xcrun simctl list runtimes
322323
323324
# Launch the simulator
324325
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)
326327
xcrun simctl boot $SIM_ID
327328
329+
# Export variable
330+
echo "CMD=$HOME/extern/bin/cargo-dinghy -d=$SIM_ID" >> $GITHUB_ENV
331+
328332
- name: Lint
329333
# Temporarily allow `clippy::let_unit_value`
330334
run: cargo clippy ${{ env.ARGS }} --all-targets -- --deny warnings --allow clippy::let_unit_value
331335

332336
- name: Build
333-
if: ${{ !matrix.dinghy }}
334-
run: cargo build ${{ env.ARGS }}
337+
run: $CMD build ${{ env.ARGS }}
335338

336339
- 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
339341

340342
- name: Test without features
341343
if: ${{ !matrix.dinghy }}
@@ -346,8 +348,7 @@ jobs:
346348
run: cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --tests --features ${{ env.SOME_FEATURES }}
347349

348350
- 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 }}
351352

352353
- name: Test in release mode without features
353354
if: ${{ !matrix.dinghy }}
@@ -386,14 +387,3 @@ jobs:
386387
export HOST_TARGET=$(rustc -vV | grep host | cut -f2 -d' ')
387388

388389
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

Comments
 (0)