Skip to content

Commit e4a53a7

Browse files
authored
Merge pull request #220 from madsmtm/github-macos-transition
No longer test on macOS 10.15
2 parents c05fb9a + 1bbac07 commit e4a53a7

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ jobs:
3939
fail-fast: false
4040
matrix:
4141
include:
42-
- name: Test macOS 10.15
43-
os: macos-10.15
44-
target: x86_64-apple-darwin
4542
- name: Test macOS 11
4643
os: macos-11
4744
target: x86_64-apple-darwin
45+
- name: Test macOS 12
46+
os: macos-12
47+
target: x86_64-apple-darwin
4848
- name: Build macOS AArch64
49-
os: macos-11
49+
os: macos-latest
5050
target: aarch64-apple-darwin
5151
test-args: --no-run
5252
- name: Test macOS old SDK
53-
os: macos-11
53+
os: macos-latest
5454
target: x86_64-apple-darwin
5555
# Oldest macOS version we support
5656
sdk: "10.7"
@@ -62,7 +62,7 @@ jobs:
6262
# Run UI tests on nightly to help find regressions
6363
ui: true
6464
- name: Build macOS 32bit
65-
os: macos-10.15
65+
os: macos-latest
6666
target: i686-apple-darwin
6767
rust:
6868
toolchain: nightly
@@ -97,7 +97,7 @@ jobs:
9797
runtime: gnustep-1-9
9898
libobjc2: "1.9"
9999
- name: Test iOS simulator x86 64bit
100-
os: macos-11
100+
os: macos-latest
101101
target: x86_64-apple-ios
102102
dinghy: true
103103
- name: Build iOS simulator ARM64

objc2-foundation/src/thread.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,18 @@ mod tests {
202202
)]
203203
fn test_debug() {
204204
let thread = NSThread::main();
205-
let expected = format!("<NSThread: {:p}>{{number = 1, name = (null)}}", thread);
206-
assert_eq!(format!("{:?}", thread), expected);
205+
206+
let actual = format!("{:?}", thread);
207+
let expected_macos_11 = format!("<NSThread: {:p}>{{number = 1, name = (null)}}", thread);
208+
let expected_macos_12 =
209+
format!("<_NSMainThread: {:p}>{{number = 1, name = (null)}}", thread);
210+
assert!(
211+
actual == expected_macos_11 || actual == expected_macos_12,
212+
"Expected one of {:?} or {:?}, got {:?}",
213+
expected_macos_11,
214+
expected_macos_12,
215+
actual,
216+
);
207217

208218
// SAFETY: We don't use the marker for anything other than its Debug
209219
// impl, so this test doesn't actually need to run on the main thread!

tests/extern/encode_utils.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
id b;
8282
void (*c)(void);
8383
};
84-
ENCODING(STRUCT_WITH_BLOCK, struct with_block);
84+
ENCODING_INNER(STRUCT_WITH_BLOCK, struct with_block); \
85+
ENCODING_INNER(STRUCT_WITH_BLOCK_POINTER, struct with_block*); \
8586

8687
struct with_atomic_inner {
8788
_Atomic int a;

tests/src/test_encode_utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ const WITH_BLOCK: Encoding<'static> = Encoding::Struct(
239239
);
240240
assert_inner!(str ENCODING_STRUCT_WITH_BLOCK => WITH_BLOCK);
241241
assert_inner!(str ENCODING_STRUCT_WITH_BLOCK_POINTER => Encoding::Pointer(&WITH_BLOCK));
242-
assert_inner!(str ENCODING_STRUCT_WITH_BLOCK_ATOMIC => "A{with_block}");
243242

244243
assert_inner!(str ENCODING_STRUCT_WITH_ATOMIC => "{with_atomic=Ai^Ai{with_atomic_inner=Ai^Ai}^{with_atomic_inner}^A{with_atomic_inner}}");
245244
assert_inner!(str ENCODING_STRUCT_WITH_ATOMIC_POINTER => "^{with_atomic=Ai^Ai{with_atomic_inner=Ai^Ai}^{with_atomic_inner}^A{with_atomic_inner}}");

0 commit comments

Comments
 (0)