Skip to content

Commit 7ca7544

Browse files
committed
Properly set up which frameworks are tested in CI
1 parent cf41df3 commit 7ca7544

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,30 @@ jobs:
4343
- name: Test macOS 11
4444
os: macos-11
4545
target: x86_64-apple-darwin
46+
frameworks: macos-11
4647
- name: Test macOS 12
4748
os: macos-12
4849
target: x86_64-apple-darwin
50+
frameworks: macos-12
4951
- name: Build macOS AArch64
5052
os: macos-latest
5153
target: aarch64-apple-darwin
5254
test-args: --no-run
55+
frameworks: macos-11
5356
- name: Test macOS old SDK
5457
os: macos-latest
5558
target: x86_64-apple-darwin
5659
# Oldest macOS version we support
5760
sdk: "10.7"
61+
frameworks: macos-10-7
5862
- name: Test macOS nightly (w. ui tests)
5963
os: macos-latest
6064
target: x86_64-apple-darwin
6165
rust:
6266
toolchain: nightly
6367
# Run UI tests on nightly to help find regressions
6468
ui: true
69+
frameworks: macos-11
6570
- name: Build macOS 32bit
6671
os: macos-latest
6772
target: i686-apple-darwin
@@ -75,17 +80,20 @@ jobs:
7580
test-args: --no-run
7681
# Newest SDK that supports 32-bit
7782
sdk: "10.13"
83+
frameworks: macos-10-13
7884
- name: Test GNUStep with libobjc2 v1.9
7985
os: ubuntu-latest
8086
target: x86_64-unknown-linux-gnu
8187
runtime: gnustep-1-9
8288
libobjc2: "1.9"
89+
frameworks: gnustep
8390
- name: Test GNUStep with libobjc2 v2.0
8491
# Fails for some reason on Ubuntu 22
8592
os: ubuntu-20.04
8693
target: x86_64-unknown-linux-gnu
8794
runtime: gnustep-2-0
8895
libobjc2: "2.0"
96+
frameworks: gnustep
8997
- name: Test GNUStep with libobjc2 v2.1 on nightly
9098
os: ubuntu-latest
9199
target: x86_64-unknown-linux-gnu
@@ -94,6 +102,7 @@ jobs:
94102
runtime: gnustep-2-1
95103
libobjc2: "2.1"
96104
fuzz: true
105+
frameworks: gnustep
97106
- name: Test GNUStep 32bit
98107
# Ubuntu 22 image doesn't have the required C++ libraries
99108
# installed for 32-bit
@@ -103,18 +112,22 @@ jobs:
103112
configureflags: --target=x86-pc-linux-gnu
104113
runtime: gnustep-1-9
105114
libobjc2: "1.9"
115+
frameworks: gnustep
106116
- name: Test iOS simulator x86 64bit
107117
os: macos-11
108118
target: x86_64-apple-ios
109119
dinghy: true
120+
frameworks: ios
110121
- name: Build iOS simulator ARM64
111122
os: macos-latest
112123
target: aarch64-apple-ios-sim
113124
test-args: --no-run
125+
frameworks: ios
114126
- name: Build iOS ARM64
115127
os: macos-latest
116128
target: aarch64-apple-ios
117129
test-args: --no-run
130+
frameworks: ios
118131
- name: Build iOS ARMv7
119132
os: macos-latest
120133
target: armv7-apple-ios
@@ -124,6 +137,7 @@ jobs:
124137
components: clippy, rust-src
125138
args: -Zbuild-std -Zdoctest-xcompile
126139
test-args: --no-run
140+
frameworks: ios
127141
- name: Build iOS ARMv7s
128142
os: macos-latest
129143
target: armv7s-apple-ios
@@ -133,6 +147,7 @@ jobs:
133147
components: clippy, rust-src
134148
args: -Zbuild-std -Zdoctest-xcompile
135149
test-args: --no-run
150+
frameworks: ios
136151
- name: Build iOS 32bit x86
137152
os: macos-latest
138153
target: i386-apple-ios
@@ -142,13 +157,15 @@ jobs:
142157
components: clippy, rust-src
143158
args: -Zbuild-std -Zdoctest-xcompile
144159
test-args: --no-run
160+
frameworks: ios
145161
- name: Test Compiler-RT
146162
os: ubuntu-latest
147163
target: x86_64-unknown-linux-gnu
148164
runtime: compiler-rt
149165
args: -p block-sys -p block2
150166
features: ' '
151167
unstable-features: ' '
168+
frameworks: none
152169

153170
env:
154171
CARGO_BUILD_TARGET: ${{ matrix.target }}
@@ -163,10 +180,8 @@ jobs:
163180
FEATURES: >-
164181
${{
165182
matrix.features || format(
166-
'malloc,block,exception,catch-all,verify,uuid,{0}',
167-
contains(matrix.target, 'darwin') && 'unstable-macos-frameworks'
168-
|| contains(matrix.target, 'ios') && 'unstable-ios-frameworks'
169-
|| matrix.target == 'x86_64-unknown-linux-gnu' && 'unstable-gnustep-frameworks' || ''
183+
'malloc,block,exception,catch-all,verify,uuid,unstable-frameworks-{0}',
184+
matrix.frameworks
170185
)
171186
}}
172187
UNSTABLE_FEATURES: ${{ matrix.unstable-features || 'unstable-autoreleasesafe,unstable-c-unwind' }}

crates/icrate/Cargo.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ uuid = { version = "1.1.2", optional = true, default-features = false }
2727

2828
[package.metadata.docs.rs]
2929
default-target = "x86_64-apple-darwin"
30-
features = ["block", "objective-c", "uuid", "unstable-all-frameworks", "unstable-docsrs"]
30+
features = ["block", "objective-c", "uuid", "unstable-frameworks-all", "unstable-docsrs"]
3131

3232
targets = [
3333
# MacOS
@@ -93,7 +93,11 @@ AuthenticationServices = ["Foundation"]
9393
CoreData = ["Foundation"]
9494
Foundation = ["objective-c", "block"]
9595

96-
unstable-all-frameworks = ["unstable-ios-frameworks", "unstable-macos-frameworks"]
97-
unstable-gnustep-frameworks = ["AppKit", "Foundation"]
98-
unstable-ios-frameworks = ["AuthenticationServices", "CoreData", "Foundation"]
99-
unstable-macos-frameworks = ["AppKit", "AuthenticationServices", "CoreData", "Foundation"]
96+
# Helps with CI
97+
unstable-frameworks-all = ["AppKit", "AuthenticationServices", "CoreData", "Foundation"]
98+
unstable-frameworks-gnustep = ["AppKit", "Foundation"]
99+
unstable-frameworks-ios = ["AuthenticationServices", "CoreData", "Foundation"]
100+
unstable-frameworks-macos-10-7 = ["AppKit", "CoreData", "Foundation"]
101+
unstable-frameworks-macos-10-13 = ["unstable-frameworks-macos-10-7"]
102+
unstable-frameworks-macos-11 = ["unstable-frameworks-macos-10-13", "AuthenticationServices"]
103+
unstable-frameworks-macos-12 = ["unstable-frameworks-macos-11"]

0 commit comments

Comments
 (0)