From 4e5511e690ee2eeb87aabd579c44e3ed47006bc8 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 14 Nov 2024 09:25:34 +0100 Subject: [PATCH] Update CI - Add tvOS, watchOS and visionOS - Add more docs - Remove `new-versions` branch - Fix confusions around x86_64 vs Aarch64 runners, by using explicit runner name, see https://github.com/actions/runner-images. --- .github/workflows/ci.yml | 157 +++++++++++++++++---------- CONTRIBUTING.md | 2 +- crates/header-translator/src/main.rs | 34 +++++- helper-scripts/test-local.sh | 2 +- 4 files changed, 133 insertions(+), 62 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d47dd0ab..7602f4145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,11 @@ name: CI on: # Every PR pull_request: - # Once merged into `master`, and on `ci-full` to enable testing a full run push: branches: + # Once merged into `master` - master + # And on `ci-full` to allow running time-consuming checks. - ci-full # Every monday at 09:00 in the morning schedule: @@ -44,13 +45,19 @@ env: --package=objc2-exception-helper # BEGIN AUTOMATICALLY GENERATED - FRAMEWORKS_MACOS_10_12: --package=objc2-accounts --package=objc2-app-kit --package=objc2-automator --package=objc2-av-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-multipeer-connectivity --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-store-kit --package=objc2-web-kit - FRAMEWORKS_MACOS_10_13: --package=objc2-accounts --package=objc2-app-kit --package=objc2-automator --package=objc2-av-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-external-accessory --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-multipeer-connectivity --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-store-kit --package=objc2-vision --package=objc2-web-kit + FRAMEWORKS_MACOS_10_12: --package=objc2-accounts --package=objc2-automator --package=objc2-av-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-multipeer-connectivity --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-store-kit --package=objc2-web-kit + FRAMEWORKS_MACOS_10_13: --package=objc2-accounts --package=objc2-automator --package=objc2-av-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-external-accessory --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-multipeer-connectivity --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-store-kit --package=objc2-vision --package=objc2-web-kit FRAMEWORKS_MACOS_11: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-support --package=objc2-app-kit --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-av-kit --package=objc2-business-chat --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-wlan --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-ml-compute --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-system-extensions --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-virtualization --package=objc2-vision --package=objc2-web-kit FRAMEWORKS_MACOS_12: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-av-kit --package=objc2-business-chat --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-mail-kit --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-ml-compute --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-system-extensions --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-virtualization --package=objc2-vision --package=objc2-web-kit FRAMEWORKS_MACOS_13: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-av-kit --package=objc2-background-assets --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-mail-kit --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-ml-compute --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-capture-kit --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-system-extensions --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-virtualization --package=objc2-vision --package=objc2-web-kit FRAMEWORKS_MACOS_14: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-av-kit --package=objc2-background-assets --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-mail-kit --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-ml-compute --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-capture-kit --package=objc2-screen-saver --package=objc2-sensitive-content-analysis --package=objc2-service-management --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-symbols --package=objc2-system-extensions --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-virtualization --package=objc2-vision --package=objc2-web-kit + FRAMEWORKS_MACOS_15: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-av-kit --package=objc2-background-assets --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-identity-lookup --package=objc2-input-method-kit --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-mail-kit --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-ml-compute --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-capture-kit --package=objc2-screen-saver --package=objc2-sensitive-content-analysis --package=objc2-service-management --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-symbols --package=objc2-system-extensions --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-virtualization --package=objc2-vision --package=objc2-web-kit FRAMEWORKS_IOS_10: --package=objc2-accounts --package=objc2-ad-support --package=objc2-av-kit --package=objc2-call-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-motion --package=objc2-event-kit --package=objc2-external-accessory --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-multipeer-connectivity --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-social --package=objc2-speech --package=objc2-store-kit --package=objc2-ui-kit --package=objc2-user-notifications + FRAMEWORKS_IOS_17: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-av-kit --package=objc2-background-assets --package=objc2-background-tasks --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-identity-lookup --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-ml-compute --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-sensitive-content-analysis --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-symbols --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-vision --package=objc2-web-kit + FRAMEWORKS_TVOS_17: --package=objc2-accessibility --package=objc2-ad-support --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-av-kit --package=objc2-background-tasks --package=objc2-cloud-kit --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-data-detection --package=objc2-device-check --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-link-presentation --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-ml-compute --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-sound-analysis --package=objc2-store-kit --package=objc2-symbols --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-vision + FRAMEWORKS_MAC_CATALYST_17: --package=objc2-accessibility --package=objc2-accounts --package=objc2-ad-services --package=objc2-ad-support --package=objc2-app-kit --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-automator --package=objc2-av-kit --package=objc2-background-assets --package=objc2-background-tasks --package=objc2-business-chat --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-core-wlan --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider-ui --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-identity-lookup --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-ml-compute --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-sensitive-content-analysis --package=objc2-service-management --package=objc2-social --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-symbols --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-vision --package=objc2-web-kit + FRAMEWORKS_VISIONOS_1: --package=objc2-accessibility --package=objc2-ad-services --package=objc2-app-tracking-transparency --package=objc2-authentication-services --package=objc2-automatic-assessment-configuration --package=objc2-av-kit --package=objc2-background-assets --package=objc2-background-tasks --package=objc2-call-kit --package=objc2-class-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-extension-kit --package=objc2-external-accessory --package=objc2-file-provider --package=objc2-file-provider-ui --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-health-kit --package=objc2-identity-lookup --package=objc2-link-presentation --package=objc2-local-authentication --package=objc2-local-authentication-embedded-ui --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-fx --package=objc2-metal-kit --package=objc2-metric-kit --package=objc2-multipeer-connectivity --package=objc2-natural-language --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-sound-analysis --package=objc2-speech --package=objc2-store-kit --package=objc2-symbols --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications --package=objc2-vision --package=objc2-web-kit + FRAMEWORKS_WATCHOS_10: --package=objc2-accessibility --package=objc2-authentication-services --package=objc2-av-kit --package=objc2-call-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-location --package=objc2-core-ml --package=objc2-core-motion --package=objc2-data-detection --package=objc2-device-check --package=objc2-event-kit --package=objc2-extension-kit --package=objc2-foundation --package=objc2-game-kit --package=objc2-health-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-natural-language --package=objc2-nearby-interaction --package=objc2-network-extension --package=objc2-photos --package=objc2-photos-ui --package=objc2-sound-analysis --package=objc2-store-kit --package=objc2-symbols --package=objc2-ui-kit --package=objc2-uniform-type-identifiers --package=objc2-user-notifications FRAMEWORKS_GNUSTEP: --package=objc2-app-kit --package=objc2-foundation # END AUTOMATICALLY GENERATED @@ -67,11 +74,6 @@ env: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - # Only enable time-consuming checks when about to do a new release - # - # This condition is duplicated a few places, since there's no good way to - # deduplicate such information in GitHub Actions... - FULL: ${{ (github.head_ref == 'new-versions' || github.ref_name == 'ci-full') && true || '' }} jobs: fmt: @@ -100,20 +102,32 @@ jobs: fail-fast: false matrix: include: - - name: macOS 64bit - target: aarch64-apple-darwin + # Check three major architectures (x86_64, Aarch64 and any 32bit), and + # test three OS'es (macOS, iOS and a more obscure one, visionOS simulator). + # + # This should give us fairly good coverage for normal PRs. + - name: macOS x86_64 + target: x86_64-apple-darwin args: $PUBLIC_CRATES $FRAMEWORKS_MACOS_14 $INTERESTING_FEATURES - - name: iOS 32bit + - name: iOS ARMv7s target: armv7s-apple-ios build-std: true # `cc` works poorly when cross-compiling, so let's ignore `objc2-exception-helper` for now. - args: --package=block2 --package=objc2 --package=objc2-encode --package=objc2-proc-macros $FRAMEWORKS_IOS_10 $INTERESTING_FEATURES -Zbuild-std + args: --package=block2 --package=objc2 --package=objc2-encode --package=objc2-proc-macros $FRAMEWORKS_IOS_17 $INTERESTING_FEATURES -Zbuild-std + - name: visionOS Aarch64 simulator + target: aarch64-apple-visionos-sim + build-std: true + # `cc` works poorly when cross-compiling, so let's ignore `objc2-exception-helper` for now. + args: --package=block2 --package=objc2 --package=objc2-encode --package=objc2-proc-macros $FRAMEWORKS_VISIONOS_1 $INTERESTING_FEATURES -Zbuild-std + - name: GNUStep + exceptions target: x86_64-unknown-linux-gnu args: $PUBLIC_CRATES $FRAMEWORKS_GNUSTEP $INTERESTING_FEATURES --features=gnustep-1-9,catch-all + - name: header-translator target: x86_64-unknown-linux-gnu args: -pheader-translator + - name: test-assembly target: x86_64-unknown-linux-gnu args: -ptest-assembly @@ -257,7 +271,7 @@ jobs: run: cargo run --bin=test-assembly -- -Z build-std --target=x86_64-apple-darwin - name: Run all assembly tests - if: ${{ env.FULL }} + if: ${{ github.ref_name == 'ci-full' }} run: ./helper-scripts/run-assembly-tests.sh - name: Check diff @@ -266,7 +280,7 @@ jobs: header-translator: name: Verify header translator output - runs-on: macos-15 + runs-on: macos-15-xlarge needs: - fmt - lint @@ -295,11 +309,10 @@ jobs: run: git diff --exit-code --submodule=diff check-framework-features: - # if: ${{ env.FULL }} # This will take ~40 minutes - if: ${{ github.head_ref == 'new-versions' || github.ref_name == 'ci-full' }} + if: ${{ github.ref_name == 'ci-full' }} name: Check framework features - runs-on: macos-12 + runs-on: macos-15-xlarge needs: - fmt - lint @@ -321,9 +334,11 @@ jobs: - name: Check frameworks with each feature enabled separately run: cargo run --bin=check_framework_features + # We make sure to have at least one check on macOS that actually runs the code, + # but all other tests are only run if absolutely needed (see `test-apple` below). test-macos: - name: Test macOS 12 - runs-on: macos-12 + name: Test macOS 15 Aarch64 + runs-on: macos-15-xlarge needs: - fmt # Currently the slowest check, so let's get it started as soon as possible @@ -352,10 +367,9 @@ jobs: run: cargo test $PUBLIC_CRATES $FRAMEWORKS_MACOS_10_12 -ptests $INTERESTING_FEATURES test-apple: - # if: ${{ env.FULL }} - if: ${{ github.head_ref == 'new-versions' || github.ref_name == 'ci-full' }} - name: ${{ matrix.name }} - runs-on: ${{ matrix.os || 'macos-latest' }} + if: ${{ github.ref_name == 'ci-full' }} + name: ${{ matrix.test && 'Test' || 'Build' }} ${{ matrix.name }} + runs-on: ${{ matrix.os }} needs: - fmt - lint @@ -366,52 +380,80 @@ jobs: fail-fast: true matrix: include: - - name: Test macOS 13 + # Reasonably varied set of macOS targets. + - name: macOS 12 x86_64 target: x86_64-apple-darwin - os: macos-13 + os: macos-12-large frameworks: MACOS_13 - - name: Test macOS 14 - target: aarch64-apple-darwin - os: macos-14 - frameworks: MACOS_14 - - name: Build macOS AArch64 + test: true + - name: macOS 15 AArch64 target: aarch64-apple-darwin - frameworks: MACOS_11 - - name: Test macOS old SDK - target: x86_64-apple-darwin - # Oldest macOS version we support - sdk: "10.12" - frameworks: MACOS_10_12 - # The SDK itself only supports compiling build scripts for x86_64 - os: macos-13 - - name: Test macOS nightly + os: macos-15-xlarge + frameworks: MACOS_15 + test: true + - name: macOS 14 Aarch64 nightly target: aarch64-apple-darwin + os: macos-14-xlarge + frameworks: MACOS_14 nightly: true - frameworks: MACOS_11 - - name: Build macOS 32bit + test: true + + # Old macOS targets. + - name: macOS 32bit target: i686-apple-darwin + # The SDK itself only supports compiling build scripts for x86_64 + os: macos-13-large + frameworks: MACOS_10_13 nightly: true build-std: true # Newest SDK that supports 32-bit sdk: "10.13" - frameworks: MACOS_10_13 - # The SDK itself only supports compiling build scripts for x86_64 - os: macos-13 - - name: Build iOS simulator ARM64 - target: aarch64-apple-ios-sim - frameworks: IOS_10 - - name: Build iOS ARM64 - target: aarch64-apple-ios - frameworks: IOS_10 - - name: Build iOS ARMv7s + - name: macOS 14 x86_64 with 10.12 SDK + target: x86_64-apple-darwin + os: macos-14-large + frameworks: MACOS_10_12 + # Oldest macOS version we support. + # The SDK itself only supports compiling build scripts for x86_64. + sdk: "10.12" + test: true + + # A reasonably varied set of iOS/tvOS/watchOS/visionOS targets. + - name: iOS x86_64 simulator + target: x86_64-apple-ios + os: macos-14-xlarge + frameworks: IOS_17 + - name: Mac Catalyst Aarch64 + target: aarch64-apple-ios-macabi + os: macos-14-xlarge + frameworks: MAC_CATALYST_17 + test: true + - name: visionOS Aarch64 + target: aarch64-apple-visionos + os: macos-14-xlarge + frameworks: VISIONOS_1 + - name: tvOS Aarch64 + target: arm64e-apple-tvos + nightly: true + build-std: true + os: macos-14-xlarge + frameworks: TVOS_17 + - name: watchOS Aarch64 + target: arm64_32-apple-watchos + nightly: true + build-std: true + os: macos-14-xlarge + frameworks: WATCHOS_10 + - name: iOS ARMv7s target: armv7s-apple-ios nightly: true build-std: true + os: macos-14-xlarge frameworks: IOS_10 - - name: Build iOS 32bit x86 + - name: iOS x86 target: i386-apple-ios nightly: true build-std: true + os: macos-14-xlarge frameworks: IOS_10 env: @@ -420,7 +462,7 @@ jobs: # So we pass `--no-run` when building for other targets. ARGS: >- ${{ matrix.build-std && '-Zbuild-std -Zdoctest-xcompile' }} - ${{ matrix.target && '--no-run' }} + ${{ matrix.test && '' || '--no-run' }} steps: - uses: actions/checkout@v4 @@ -504,10 +546,9 @@ jobs: --features=NSString test-ios: - # if: ${{ env.FULL }} - if: ${{ github.head_ref == 'new-versions' || github.ref_name == 'ci-full' }} + if: ${{ github.ref_name == 'ci-full' }} name: Test on iOS simulator w. dinghy - runs-on: macos-13 + runs-on: macos-13-xlarge needs: - fmt - lint @@ -752,12 +793,12 @@ jobs: run: cargo test --features=${{ matrix.runtime }} $PUBLIC_CRATES $INTERESTING_FEATURES -ptests -pobjc2-foundation --features=catch-all - name: Test all frameworks - if: ${{ env.FULL && matrix.target == 'x86_64-unknown-linux-gnu' }} + if: ${{ github.ref_name == 'ci-full' && matrix.target == 'x86_64-unknown-linux-gnu' }} run: cargo test --features=${{ matrix.runtime }} $PUBLIC_CRATES $INTERESTING_FEATURES -ptests $FRAMEWORKS_GNUSTEP --features=catch-all - name: Test in release mode # Disabled on GNUStep 2.1 for now - if: ${{ env.FULL && matrix.runtime != 'gnustep-2-1' }} + if: ${{ github.ref_name == 'ci-full' && matrix.runtime != 'gnustep-2-1' }} run: cargo test --features=${{ matrix.runtime }} $PUBLIC_CRATES -pobjc2-foundation --release - name: Run fuzzing diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 63f0ffa43..de2048c23 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,7 @@ If you're confused about this, don't worry too much about it, if you enable Copy and fill out the following checklist into the release PR: ```markdown -- [ ] The branch is named `new-versions`, such that the full CI will run. +- [ ] The branch is named `ci-full`, such that the full CI will run. - [ ] Changelogs have only been modified under the `Unreleased` header. - [ ] Version numbers are bumped in the following order: - `objc2-proc-macros` diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 07fb80520..640ef3e59 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -490,7 +490,7 @@ fn update_ci(workspace_dir: &Path, config: &Config) -> io::Result<()> { .is_some_and(|v| VersionReq::parse("<=10.12").unwrap().matches(v)) // HACK: These depend on `objc2-uniform-type-identifiers`, which // is not available on macOS 10.12, but will be enabled by `"all"` - && !["objc2-file-provider", "objc2-health-kit", "objc2-photos"].contains(&&*lib.krate) + && !["objc2-app-kit", "objc2-file-provider", "objc2-health-kit", "objc2-photos"].contains(&&*lib.krate) })?; writer(&mut ci, config, "FRAMEWORKS_MACOS_10_13", |lib| { lib.macos @@ -498,7 +498,7 @@ fn update_ci(workspace_dir: &Path, config: &Config) -> io::Result<()> { .is_some_and(|v| VersionReq::parse("<=10.13").unwrap().matches(v)) // HACK: These depend on `objc2-uniform-type-identifiers`, which // is not available on macOS 10.13, but will be enabled by `"all"` - && !["objc2-file-provider", "objc2-health-kit", "objc2-photos"].contains(&&*lib.krate) + && !["objc2-app-kit", "objc2-file-provider", "objc2-health-kit", "objc2-photos"].contains(&&*lib.krate) })?; writer(&mut ci, config, "FRAMEWORKS_MACOS_11", |lib| { lib.macos @@ -520,11 +520,41 @@ fn update_ci(workspace_dir: &Path, config: &Config) -> io::Result<()> { .as_ref() .is_some_and(|v| VersionReq::parse("<=14.0").unwrap().matches(v)) })?; + writer(&mut ci, config, "FRAMEWORKS_MACOS_15", |lib| { + lib.macos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=15.0").unwrap().matches(v)) + })?; writer(&mut ci, config, "FRAMEWORKS_IOS_10", |lib| { lib.ios .as_ref() .is_some_and(|v| VersionReq::parse("<=10.0").unwrap().matches(v)) })?; + writer(&mut ci, config, "FRAMEWORKS_IOS_17", |lib| { + lib.ios + .as_ref() + .is_some_and(|v| VersionReq::parse("<=17.0").unwrap().matches(v)) + })?; + writer(&mut ci, config, "FRAMEWORKS_TVOS_17", |lib| { + lib.tvos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=17.0").unwrap().matches(v)) + })?; + writer(&mut ci, config, "FRAMEWORKS_MAC_CATALYST_17", |lib| { + lib.maccatalyst + .as_ref() + .is_some_and(|v| VersionReq::parse("<=17.0").unwrap().matches(v)) + })?; + writer(&mut ci, config, "FRAMEWORKS_VISIONOS_1", |lib| { + lib.visionos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=1.0").unwrap().matches(v)) + })?; + writer(&mut ci, config, "FRAMEWORKS_WATCHOS_10", |lib| { + lib.watchos + .as_ref() + .is_some_and(|v| VersionReq::parse("<=10.0").unwrap().matches(v)) + })?; writer(&mut ci, config, "FRAMEWORKS_GNUSTEP", |lib| lib.gnustep)?; write!(&mut ci, " # END AUTOMATICALLY GENERATED{after}")?; diff --git a/helper-scripts/test-local.sh b/helper-scripts/test-local.sh index c5d636816..08557fd58 100644 --- a/helper-scripts/test-local.sh +++ b/helper-scripts/test-local.sh @@ -6,7 +6,7 @@ set -euxo pipefail export CARGO_TARGET_DIR=$HOME/Desktop/objc2-target export MACOSX_DEPLOYMENT_TARGET=10.12 export CRATES='--package=block2 --package=objc2 --package=objc2-encode --package=objc2-proc-macros --package=tests' -export FRAMEWORKS_MACOS_10_12='--package=objc2-accounts --package=objc2-app-kit --package=objc2-automator --package=objc2-av-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-multipeer-connectivity --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-store-kit --package=objc2-web-kit' +export FRAMEWORKS_MACOS_10_12='--package=objc2-accounts --package=objc2-automator --package=objc2-av-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-multipeer-connectivity --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-store-kit --package=objc2-web-kit' export FRAMEWORKS_IOS_9='--package=objc2-foundation --package=objc2-metal' # Test on macOS 32bit