Skip to content

Commit

Permalink
Properly set up which frameworks are tested in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Dec 23, 2022
1 parent cf41df3 commit 7ca7544
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,30 @@ jobs:
- name: Test macOS 11
os: macos-11
target: x86_64-apple-darwin
frameworks: macos-11
- name: Test macOS 12
os: macos-12
target: x86_64-apple-darwin
frameworks: macos-12
- name: Build macOS AArch64
os: macos-latest
target: aarch64-apple-darwin
test-args: --no-run
frameworks: macos-11
- name: Test macOS old SDK
os: macos-latest
target: x86_64-apple-darwin
# Oldest macOS version we support
sdk: "10.7"
frameworks: macos-10-7
- name: Test macOS nightly (w. ui tests)
os: macos-latest
target: x86_64-apple-darwin
rust:
toolchain: nightly
# Run UI tests on nightly to help find regressions
ui: true
frameworks: macos-11
- name: Build macOS 32bit
os: macos-latest
target: i686-apple-darwin
Expand All @@ -75,17 +80,20 @@ jobs:
test-args: --no-run
# Newest SDK that supports 32-bit
sdk: "10.13"
frameworks: macos-10-13
- name: Test GNUStep with libobjc2 v1.9
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
runtime: gnustep-1-9
libobjc2: "1.9"
frameworks: gnustep
- name: Test GNUStep with libobjc2 v2.0
# Fails for some reason on Ubuntu 22
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
runtime: gnustep-2-0
libobjc2: "2.0"
frameworks: gnustep
- name: Test GNUStep with libobjc2 v2.1 on nightly
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
Expand All @@ -94,6 +102,7 @@ jobs:
runtime: gnustep-2-1
libobjc2: "2.1"
fuzz: true
frameworks: gnustep
- name: Test GNUStep 32bit
# Ubuntu 22 image doesn't have the required C++ libraries
# installed for 32-bit
Expand All @@ -103,18 +112,22 @@ jobs:
configureflags: --target=x86-pc-linux-gnu
runtime: gnustep-1-9
libobjc2: "1.9"
frameworks: gnustep
- name: Test iOS simulator x86 64bit
os: macos-11
target: x86_64-apple-ios
dinghy: true
frameworks: ios
- name: Build iOS simulator ARM64
os: macos-latest
target: aarch64-apple-ios-sim
test-args: --no-run
frameworks: ios
- name: Build iOS ARM64
os: macos-latest
target: aarch64-apple-ios
test-args: --no-run
frameworks: ios
- name: Build iOS ARMv7
os: macos-latest
target: armv7-apple-ios
Expand All @@ -124,6 +137,7 @@ jobs:
components: clippy, rust-src
args: -Zbuild-std -Zdoctest-xcompile
test-args: --no-run
frameworks: ios
- name: Build iOS ARMv7s
os: macos-latest
target: armv7s-apple-ios
Expand All @@ -133,6 +147,7 @@ jobs:
components: clippy, rust-src
args: -Zbuild-std -Zdoctest-xcompile
test-args: --no-run
frameworks: ios
- name: Build iOS 32bit x86
os: macos-latest
target: i386-apple-ios
Expand All @@ -142,13 +157,15 @@ jobs:
components: clippy, rust-src
args: -Zbuild-std -Zdoctest-xcompile
test-args: --no-run
frameworks: ios
- name: Test Compiler-RT
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
runtime: compiler-rt
args: -p block-sys -p block2
features: ' '
unstable-features: ' '
frameworks: none

env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
Expand All @@ -163,10 +180,8 @@ jobs:
FEATURES: >-
${{
matrix.features || format(
'malloc,block,exception,catch-all,verify,uuid,{0}',
contains(matrix.target, 'darwin') && 'unstable-macos-frameworks'
|| contains(matrix.target, 'ios') && 'unstable-ios-frameworks'
|| matrix.target == 'x86_64-unknown-linux-gnu' && 'unstable-gnustep-frameworks' || ''
'malloc,block,exception,catch-all,verify,uuid,unstable-frameworks-{0}',
matrix.frameworks
)
}}
UNSTABLE_FEATURES: ${{ matrix.unstable-features || 'unstable-autoreleasesafe,unstable-c-unwind' }}
Expand Down
14 changes: 9 additions & 5 deletions crates/icrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ uuid = { version = "1.1.2", optional = true, default-features = false }

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

targets = [
# MacOS
Expand Down Expand Up @@ -93,7 +93,11 @@ AuthenticationServices = ["Foundation"]
CoreData = ["Foundation"]
Foundation = ["objective-c", "block"]

unstable-all-frameworks = ["unstable-ios-frameworks", "unstable-macos-frameworks"]
unstable-gnustep-frameworks = ["AppKit", "Foundation"]
unstable-ios-frameworks = ["AuthenticationServices", "CoreData", "Foundation"]
unstable-macos-frameworks = ["AppKit", "AuthenticationServices", "CoreData", "Foundation"]
# Helps with CI
unstable-frameworks-all = ["AppKit", "AuthenticationServices", "CoreData", "Foundation"]
unstable-frameworks-gnustep = ["AppKit", "Foundation"]
unstable-frameworks-ios = ["AuthenticationServices", "CoreData", "Foundation"]
unstable-frameworks-macos-10-7 = ["AppKit", "CoreData", "Foundation"]
unstable-frameworks-macos-10-13 = ["unstable-frameworks-macos-10-7"]
unstable-frameworks-macos-11 = ["unstable-frameworks-macos-10-13", "AuthenticationServices"]
unstable-frameworks-macos-12 = ["unstable-frameworks-macos-11"]

0 comments on commit 7ca7544

Please sign in to comment.