@@ -79,15 +79,13 @@ jobs:
7979 - name : Test GNUStep
8080 os : ubuntu-latest
8181 target : x86_64-unknown-linux-gnu
82- host-args : --features block-sys/gnustep-1-9,objc-sys/gnustep-1-9
83- args : --features block-sys/gnustep-1-9,objc-sys/gnustep-1-9
82+ runtime : gnustep-1-9
8483 - name : Test GNUStep 32bit
8584 os : ubuntu-latest
8685 target : i686-unknown-linux-gnu
8786 cflags : -m32
8887 configureflags : --target=x86-pc-linux-gnu
89- host-args : --features block-sys/gnustep-1-9,objc-sys/gnustep-1-9
90- args : --features block-sys/gnustep-1-9,objc-sys/gnustep-1-9
88+ runtime : gnustep-1-9
9189 - name : Test iOS simulator x86 64bit
9290 os : macos-11
9391 target : x86_64-apple-ios
@@ -134,8 +132,10 @@ jobs:
134132 CXXFLAGS : ${{ matrix.cflags }}
135133 ASMFLAGS : ${{ matrix.cflags }}
136134 LDFLAGS : ${{ matrix.cflags }}
135+ HOSTARGS : --no-default-features --features ${{ matrix.runtime || 'apple' }}
136+ ARGS : --no-default-features --features ${{ matrix.runtime || 'apple' }} ${{ matrix.args }}
137137 # Use --no-fail-fast, except with dinghy
138- TESTARGS : ${{ matrix.dinghy && ' ' || '--no-fail-fast' }} ${{ matrix.args }} ${{ matrix. test-args }}
138+ TESTARGS : ${{ matrix.dinghy && ' ' || '--no-fail-fast' }} ${{ matrix.test-args }}
139139
140140 runs-on : ${{ matrix.os }}
141141
@@ -169,7 +169,7 @@ jobs:
169169 ~/extern/include
170170 ~/extern/sdk
171171 # Change this key if we start caching more things
172- key : ${{ matrix.name }}-extern-v1
172+ key : ${{ matrix.name }}-extern-v2
173173
174174 - name : Setup environment
175175 # These add to PATH-like variables, so they can always be set
@@ -273,49 +273,51 @@ jobs:
273273
274274 - name : Install Cargo Dinghy
275275 if : matrix.dinghy && steps.extern-cache.outputs.cache-hit != 'true'
276- run : cargo install cargo-dinghy --version=^0.4 --root=$HOME/extern --target=x86_64-apple-darwin
276+ # TODO: Replace once cargo dinghy gets updated
277+ # cargo install cargo-dinghy --version=^0.4 --root=$HOME/extern --target=x86_64-apple-darwin
278+ run : cargo install --git https://github.com/madsmtm/dinghy.git --branch update-cargo --bin cargo-dinghy --root=$HOME/extern --target=x86_64-apple-darwin
277279
278280 - name : Build
279281 if : ${{ !matrix.dinghy }}
280282 uses : actions-rs/cargo@v1
281283 with :
282284 command : build
283- args : ${{ matrix.args }}
285+ args : ${{ env.ARGS }}
284286
285287 - name : Check documentation
286288 if : ${{ !matrix.dinghy }}
287289 uses : actions-rs/cargo@v1
288290 with :
289291 command : doc
290- args : --no-deps --document-private-items ${{ matrix.args }}
292+ args : ${{ env.ARGS }} --no-deps --document-private-items
291293
292294 - name : Test without features
293295 if : ${{ !matrix.dinghy }}
294296 uses : actions-rs/cargo@v1
295297 with :
296298 command : test
297- args : --no-default-features ${{ env.TESTARGS }}
299+ args : ${{ env.ARGS }} ${{ env.TESTARGS }}
298300
299301 - name : Test with features
300302 if : ${{ !matrix.dinghy }}
301303 uses : actions-rs/cargo@v1
302304 with :
303305 command : test
304- args : --features ${{ env.FEATURES }} ${{ env.TESTARGS }}
306+ args : ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }}
305307
306- - name : Test in release mode
308+ - name : Test in release mode without features
307309 if : ${{ !matrix.dinghy }}
308310 uses : actions-rs/cargo@v1
309311 with :
310312 command : test
311- args : --no-default-features ${{ env.TESTARGS }} --release
313+ args : ${{ env.ARGS }} ${{ env.TESTARGS }} --release
312314
313315 - name : Test in release mode with features
314316 if : ${{ !matrix.dinghy }}
315317 uses : actions-rs/cargo@v1
316318 with :
317319 command : test
318- args : --features ${{ env.FEATURES }} ${{ env.TESTARGS }} --release
320+ args : ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }} --release
319321
320322 - name : Run benchmarks
321323 # Difficult to install Valgrind on macOS
@@ -324,15 +326,15 @@ jobs:
324326 uses : actions-rs/cargo@v1
325327 with :
326328 command : bench
327- args : --bench autorelease ${{ env.TESTARGS }}
329+ args : ${{ env.ARGS }} ${{ env.TESTARGS }} --bench autorelease
328330
329331 - name : Test with unstable features
330332 if : ${{ !matrix.dinghy && matrix.rust.toolchain == 'nightly' }}
331333 uses : actions-rs/cargo@v1
332334 with :
333335 command : test
334336 # Not using --all-features because that would enable e.g. gnustep
335- args : --features ${{ env.FEATURES }}, ${{ env.UNSTABLE_FEATURES }} ${{ env.TESTARGS }}
337+ args : ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }},${{ env.UNSTABLE_FEATURES }}
336338
337339 - name : Run assembly tests
338340 # Not run on GNUStep yet since a lot of function labels are mangled and
@@ -343,28 +345,26 @@ jobs:
343345 run :
344346 export HOST_TARGET=$(rustc -vV | grep host | cut -f2 -d' ')
345347
346- cargo run ${{ matrix.host-args }} --features assembly --target=$HOST_TARGET test_assembly ${{ matrix.args }}
348+ cargo run ${{ env.HOSTARGS }} --features assembly --target=$HOST_TARGET test_assembly ${{ env.ARGS }}
347349
348- - name : Run Cargo Dinghy
350+ - name : Launch XCode Simulator
349351 if : matrix.dinghy
350352 run : |
351- # Launch the simulator
353+ # Get system info
352354 xcrun simctl list runtimes
355+
356+ # Launch the simulator
353357 RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1)
354358 export SIM_ID=$(xcrun simctl create My-iphone7 com.apple.CoreSimulator.SimDeviceType.iPhone-7 $RUNTIME_ID)
355359 xcrun simctl boot $SIM_ID
356360
357- # Build
358- cargo dinghy --device=$SIM_ID build
359-
360- # Run tests
361- cargo dinghy --device=$SIM_ID test --no-default-features
362- cargo dinghy --device=$SIM_ID test --release
361+ - name : Build w. Cargo Dinghy
362+ if : matrix.dinghy
363+ run : cargo dinghy --device=$SIM_ID build ${{ matrix.args }}
363364
364- # Enable a few features. We're doing it this way because cargo dingy
365- # doesn't support specifying features from a workspace.
366- sed -i -e '/\[features\]/a\
367- default = ["exception", "verify_message", "catch_all"]
368- ' objc2/Cargo.toml
369- cargo dinghy --device=$SIM_ID test
370- cargo dinghy --device=$SIM_ID test --release
365+ - name : Test w. Cargo Dinghy
366+ if : matrix.dinghy
367+ # Note that we're not testing more complex configurations, since that
368+ # takes a very long time to run in CI, and that impedes general
369+ # development work.
370+ run : cargo dinghy --device=$SIM_ID test ${{ matrix.args }}
0 commit comments