diff --git a/.github/workflows/primary.yml b/.github/workflows/primary.yml index a2eb997..98af3a8 100644 --- a/.github/workflows/primary.yml +++ b/.github/workflows/primary.yml @@ -18,12 +18,12 @@ on: jobs: primary: name: Primary - runs-on: macOS-11 + runs-on: macOS-13 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_13.2.app + run: sudo xcode-select -s /Applications/Xcode_15.0.app - name: Build demos run: sh ci/build_demos.sh @@ -33,30 +33,30 @@ jobs: spm: name: Swift Package Manager - runs-on: macOS-11 + runs-on: macOS-13 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Swift Build run: swift build cocoapods: name: Cocoapods - runs-on: macOS-11 + runs-on: macOS-13 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Lint Podspec - run: pod lib lint + run: pod lib lint --allow-warnings xcframework: name: XCFramework - runs-on: macOS-11 + runs-on: macOS-13 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build XCFramework run: ci/build_xcframework.sh - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: PocketSVG.xcframework path: derived_data/xcframework/PocketSVG.xcframework @@ -64,13 +64,13 @@ jobs: create-release: name: Make release - runs-on: macOS-11 + runs-on: macOS-13 if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') # only if tag is pushed needs: [primary, cocoapods, spm, xcframework] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: PocketSVG.xcframework path: PocketSVG.xcframework diff --git a/Package.swift b/Package.swift index 09fe9be..43c1b4d 100644 --- a/Package.swift +++ b/Package.swift @@ -13,8 +13,8 @@ let package = Package( products: [ .library( name: "PocketSVG", - targets: ["PocketSVG"] - ), + type: .dynamic, + targets: ["PocketSVG"]) ], dependencies: [ ], diff --git a/ci/build_demos.sh b/ci/build_demos.sh index 14e99ab..5889cf8 100644 --- a/ci/build_demos.sh +++ b/ci/build_demos.sh @@ -12,7 +12,7 @@ set -xeo pipefail rm -rf .build/ rm -rf derived_data/ -IOS_DESTINATION="platform=iOS Simulator,name=iPhone 11 Pro" +IOS_DESTINATION="platform=iOS Simulator,name=iPhone 15" echo "Build iOS demo" xcodebuild \ @@ -23,7 +23,7 @@ xcodebuild \ 'OTHER_LDFLAGS=$(inherited) -lxml2' \ clean \ build \ - | xcpretty + | xcbeautify echo "Build macOS demo" xcodebuild \ @@ -34,4 +34,4 @@ xcodebuild \ 'OTHER_LDFLAGS=$(inherited) -lxml2' \ clean \ build \ - | xcpretty + | xcbeautify diff --git a/ci/build_xcframework.sh b/ci/build_xcframework.sh index ce1c120..1ec0529 100755 --- a/ci/build_xcframework.sh +++ b/ci/build_xcframework.sh @@ -8,7 +8,6 @@ #!/usr/bin/env bash set -xeo pipefail -PROJECT_PATH="derived_data/PocketSVG.xcodeproj" IOS_SIMULATOR_XCARCHIVE_PATH="derived_data/archives/PocketSVG-iOS-Simulator.xcarchive" IOS_DEVICE_XCARCHIVE_PATH="derived_data/archives/PocketSVG-iOS-Device.xcarchive" MACOS_XCARCHIVE_PATH="derived_data/archives/PocketSVG-macOS.xcarchive" @@ -16,57 +15,50 @@ TVOS_XCARCHIVE_PATH="derived_data/archives/PocketSVG-tvOS.xcarchive" CATALYST_XCARCHIVE_PATH="derived_data/archives/PocketSVG-Catalyst.xcarchive" XCFRAMEWORK_PATH="derived_data/xcframework/PocketSVG.xcframework" -swift package generate-xcodeproj --output $PROJECT_PATH - xcodebuild archive \ - -project $PROJECT_PATH \ - -scheme PocketSVG-Package \ + -scheme PocketSVG \ -destination 'generic/platform=iOS' \ -derivedDataPath derived_data \ -archivePath $IOS_DEVICE_XCARCHIVE_PATH \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - | xcpretty + | xcbeautify xcodebuild archive \ - -project $PROJECT_PATH \ - -scheme PocketSVG-Package \ + -scheme PocketSVG \ -destination 'generic/platform=iOS Simulator' \ -derivedDataPath derived_data \ -archivePath $IOS_SIMULATOR_XCARCHIVE_PATH \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - | xcpretty + | xcbeautify xcodebuild archive \ - -project $PROJECT_PATH \ - -scheme PocketSVG-Package \ + -scheme PocketSVG \ -destination 'generic/platform=macOS' \ -derivedDataPath derived_data \ -archivePath $MACOS_XCARCHIVE_PATH \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - | xcpretty + | xcbeautify xcodebuild archive \ - -project $PROJECT_PATH \ - -scheme PocketSVG-Package \ - -destination 'generic/platform=tvos' \ + -scheme PocketSVG \ + -destination 'generic/platform=appletvos' \ -derivedDataPath derived_data \ -archivePath $TVOS_XCARCHIVE_PATH \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - | xcpretty + | xcbeautify xcodebuild archive \ - -project $PROJECT_PATH \ - -scheme PocketSVG-Package \ + -scheme PocketSVG \ -destination 'generic/platform=macOS,variant=Mac Catalyst' \ -derivedDataPath derived_data \ -archivePath $CATALYST_XCARCHIVE_PATH \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - | xcpretty + | xcbeautify IOS_SIMULATOR_FRAMEWORK_PATH=$(find $IOS_SIMULATOR_XCARCHIVE_PATH -name "*.framework") IOS_DEVICE_FRAMEWORK_PATH=$(find $IOS_DEVICE_XCARCHIVE_PATH -name "*.framework") diff --git a/ci/test.sh b/ci/test.sh index 7b47599..2c8430f 100644 --- a/ci/test.sh +++ b/ci/test.sh @@ -10,12 +10,12 @@ set -xeo pipefail xcodebuild \ -scheme PocketSVG \ - -destination "platform=iOS Simulator,name=iPhone 11 Pro" \ + -destination "platform=iOS Simulator,name=iPhone 15" \ test \ - | xcpretty + | xcbeautify xcodebuild \ -scheme PocketSVG \ - -destination "platform=iOS Simulator,name=iPhone 11 Pro" \ + -destination "platform=iOS Simulator,name=iPhone 15" \ test \ - | xcpretty + | xcbeautify