Skip to content

Commit 597c950

Browse files
committed
Fix running id_retain_autoreleased in CI
1 parent ae39cff commit 597c950

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/ci.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,13 @@ jobs:
302302
args: --features ${{ env.FEATURES }} ${{ env.TESTARGS }}
303303

304304
- name: Test in release mode
305+
if: ${{ !matrix.dinghy }}
306+
uses: actions-rs/cargo@v1
307+
with:
308+
command: test
309+
args: --no-default-features ${{ env.TESTARGS }} --release
310+
311+
- name: Test in release mode with features
305312
if: ${{ !matrix.dinghy }}
306313
uses: actions-rs/cargo@v1
307314
with:
@@ -346,10 +353,12 @@ jobs:
346353
xcrun simctl boot $SIM_ID
347354
348355
# Build
349-
cargo dinghy build
356+
cargo dinghy --device=$SIM_ID build
350357
351358
# Run tests
352359
cargo dinghy --device=$SIM_ID test --no-default-features
360+
cargo dinghy --device=$SIM_ID test --release
361+
353362
# Enable a few features. We're doing it this way because cargo dingy
354363
# doesn't support specifying features from a workspace.
355364
sed -i -e '/\[features\]/a\

objc2/tests/id_retain_autoreleased.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ fn test_retain_autoreleased() {
5454
// When compiled in release mode / with optimizations enabled,
5555
// subsequent usage of `retain_autoreleased` will succeed in retaining
5656
// the autoreleased value!
57-
let expected = if cfg!(all(debug_assertions, not(gnustep))) {
57+
let expected = if cfg!(gnustep) {
58+
1
59+
} else if cfg!(any(
60+
debug_assertions,
61+
feature = "exception",
62+
feature = "verify_message"
63+
)) {
5864
2
5965
} else {
6066
1

0 commit comments

Comments
 (0)