diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 0e76443..a62aa6d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -21,62 +21,104 @@ jobs: uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 with: scheme: TemplatePackage - artifactname: TemplatePackage.xcresult + resultBundle: TemplatePackage-iOS.xcresult + artifactname: TemplatePackage-iOS.xcresult packagewatchos: name: Build and Test Swift Package watchOS uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 with: scheme: TemplatePackage - resultBundle: TemplatePackageWatchOS.xcresult - destination: 'platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)' - artifactname: TemplatePackageWatchOS.xcresult + destination: 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)' + resultBundle: TemplatePackage-watchOS.xcresult + artifactname: TemplatePackage-watchOS.xcresult packagevisionos: name: Build and Test Swift Package visionOS uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 with: - xcodeversion: latest scheme: TemplatePackage - resultBundle: TemplatePackageVisionOS.xcresult destination: 'platform=visionOS Simulator,name=Apple Vision Pro' - artifactname: TemplatePackageVisionOS.xcresult + resultBundle: TemplatePackage-visionOS.xcresult + artifactname: TemplatePackage-visionOS.xcresult + packagetvos: + name: Build and Test Swift Package tvOS + uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + with: + scheme: TemplatePackage + resultBundle: TemplatePackage-tvOS.xcresult + destination: 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)' + artifactname: TemplatePackage-tvOS.xcresult + packagemacos: + name: Build and Test Swift Package macOS + uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + with: + scheme: TemplatePackage + resultBundle: TemplatePackage-macOS.xcresult + destination: 'platform=macOS,arch=arm64' + artifactname: TemplatePackage-macOS.xcresult ios: name: Build and Test iOS uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 with: + runsonlabels: '["macOS", "self-hosted"]' path: 'Tests/UITests' scheme: TestApp - artifactname: TestApp.xcresult + resultBundle: TestApp-iOS.xcresult + artifactname: TestApp-iOS.xcresult ipados: name: Build and Test iPadOS uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 with: + runsonlabels: '["macOS", "self-hosted"]' path: 'Tests/UITests' scheme: TestApp - resultBundle: TestAppiPadOS.xcresult - destination: 'platform=iOS Simulator,name=iPad mini (6th generation)' - artifactname: TestAppiPadOS.xcresult + destination: 'platform=iOS Simulator,name=iPad Air (5th generation)' + resultBundle: TestApp-iPadOS.xcresult + artifactname: TestApp-iPadOS.xcresult watchos: name: Build and Test watchOS uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 with: + runsonlabels: '["macOS", "self-hosted"]' path: 'Tests/UITests' scheme: TestAppWatchApp - resultBundle: TestAppWatchApp.xcresult - destination: 'platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)' - artifactname: TestAppWatchApp.xcresult + destination: 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)' + resultBundle: TestApp-watchOS.xcresult + artifactname: TestApp-watchOS.xcresult + visionos: + name: Build and Test visionOS + uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + with: + runsonlabels: '["macOS", "self-hosted"]' + path: 'Tests/UITests' + scheme: TestApp + destination: 'platform=visionOS Simulator,name=Apple Vision Pro' + resultBundle: TestApp-visionOS.xcresult + artifactname: TestApp-visionOS.xcresult + tvos: + name: Build and Test tvOS + uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + with: + runsonlabels: '["macOS", "self-hosted"]' + path: 'Tests/UITests' + scheme: TestApp + destination: 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)' + resultBundle: TestApp-tvOS.xcresult + artifactname: TestApp-tvOS.xcresult codeql: name: CodeQL uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 with: codeql: true - xcodeversion: '14.3.1' + test: false scheme: TemplatePackage permissions: security-events: write actions: read uploadcoveragereport: name: Upload Coverage Report - needs: [packageios, packagewatchos, packagevisionos, ios, ipados, watchos] + needs: [packageios, packagewatchos, packagevisionos, packagetvos, packagemacos, ios, ipados, watchos, visionos, tvos] uses: StanfordBDHG/.github/.github/workflows/create-and-upload-coverage-report.yml@v2 with: - coveragereports: TemplatePackage.xcresult TemplatePackageWatchOS.xcresult TemplatePackageVisionOS.xcresult TestApp.xcresult TestAppiPadOS.xcresult TestAppWatchApp.xcresult + coveragereports: TemplatePackage-iOS.xcresult TemplatePackage-watchOS.xcresult TemplatePackage-visionOS.xcresult TemplatePackage-tvOS.xcresult TemplatePackage-macOS.xcresult TestApp-iOS.xcresult TestApp-iPadOS.xcresult TestApp-watchOS.xcresult TestApp-visionOS.xcresult TestApp-tvOS.xcresult + secrets: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Package.swift b/Package.swift index da083f3..d567050 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.8 +// swift-tools-version:5.9 // // This source file is part of the TemplatePackage open source project @@ -14,8 +14,11 @@ import PackageDescription let package = Package( name: "TemplatePackage", platforms: [ - .iOS(.v16), - .watchOS(.v9) + .iOS(.v17), + .watchOS(.v10), + .visionOS(.v1), + .tvOS(.v17), + .macOS(.v14) ], products: [ .library(name: "TemplatePackage", targets: ["TemplatePackage"]) diff --git a/Sources/TemplatePackage/TemplatePackage.swift b/Sources/TemplatePackage/TemplatePackage.swift index be39395..fb06b53 100644 --- a/Sources/TemplatePackage/TemplatePackage.swift +++ b/Sources/TemplatePackage/TemplatePackage.swift @@ -1,7 +1,7 @@ // // This source file is part of the TemplatePackage open source project // -// SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) +// SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md) // // SPDX-License-Identifier: MIT // diff --git a/Tests/UITests/UITests.xcodeproj/project.pbxproj b/Tests/UITests/UITests.xcodeproj/project.pbxproj index ac31437..25c3d4a 100644 --- a/Tests/UITests/UITests.xcodeproj/project.pbxproj +++ b/Tests/UITests/UITests.xcodeproj/project.pbxproj @@ -431,12 +431,17 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TVOS_DEPLOYMENT_TARGET = 17.0; + WATCHOS_DEPLOYMENT_TARGET = 10.0; + XROS_DEPLOYMENT_TARGET = 1.0; }; name = Debug; }; @@ -485,12 +490,17 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; + TVOS_DEPLOYMENT_TARGET = 17.0; VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 10.0; + XROS_DEPLOYMENT_TARGET = 1.0; }; name = Release; }; @@ -512,23 +522,21 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.templatepackage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_STRICT_CONCURRENCY = complete; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2,3,7"; }; name = Debug; }; @@ -550,23 +558,21 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.templatepackage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_STRICT_CONCURRENCY = complete; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2,3,7"; }; name = Release; }; @@ -578,19 +584,17 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 637867499T; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.templatepackage.testapp.uitests; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,3,7"; TEST_TARGET_NAME = TestApp; }; name = Debug; @@ -603,19 +607,17 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 637867499T; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.templatepackage.testapp.uitests; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,3,7"; TEST_TARGET_NAME = TestApp; }; name = Release; @@ -650,7 +652,6 @@ SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 9.0; }; name = Debug; }; @@ -683,7 +684,6 @@ SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 9.0; }; name = Test; }; @@ -716,7 +716,6 @@ SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 9.0; }; name = Release; }; @@ -741,7 +740,6 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; TEST_TARGET_NAME = TestAppWatchApp; - WATCHOS_DEPLOYMENT_TARGET = 9.0; }; name = Debug; }; @@ -765,7 +763,6 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; TEST_TARGET_NAME = TestAppWatchApp; - WATCHOS_DEPLOYMENT_TARGET = 9.0; }; name = Test; }; @@ -789,7 +786,6 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; TEST_TARGET_NAME = TestAppWatchApp; - WATCHOS_DEPLOYMENT_TARGET = 9.0; }; name = Release; }; @@ -844,12 +840,17 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = TEST; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TVOS_DEPLOYMENT_TARGET = 17.0; + WATCHOS_DEPLOYMENT_TARGET = 10.0; + XROS_DEPLOYMENT_TARGET = 1.0; }; name = Test; }; @@ -871,23 +872,21 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.templatepackage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_STRICT_CONCURRENCY = complete; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2,3,7"; }; name = Test; }; @@ -899,19 +898,17 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 637867499T; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.templatepackage.testapp.uitests; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,3,7"; TEST_TARGET_NAME = TestApp; }; name = Test;