From fc6a2b55503082953ca26cc5550b8737b83bcdd1 Mon Sep 17 00:00:00 2001 From: Ariel Elkin <1756909+arielelkin@users.noreply.github.com> Date: Mon, 29 Jul 2024 18:40:23 +0200 Subject: [PATCH 1/8] Update CI for macOS 13 --- .github/workflows/primary.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/primary.yml b/.github/workflows/primary.yml index a2eb997..b141c1d 100644 --- a/.github/workflows/primary.yml +++ b/.github/workflows/primary.yml @@ -18,7 +18,7 @@ on: jobs: primary: name: Primary - runs-on: macOS-11 + runs-on: macOS-13 steps: - uses: actions/checkout@v2 @@ -33,7 +33,7 @@ jobs: spm: name: Swift Package Manager - runs-on: macOS-11 + runs-on: macOS-13 steps: - uses: actions/checkout@v2 - name: Swift Build @@ -41,7 +41,7 @@ jobs: cocoapods: name: Cocoapods - runs-on: macOS-11 + runs-on: macOS-13 steps: - uses: actions/checkout@v2 - name: Lint Podspec @@ -49,7 +49,7 @@ jobs: xcframework: name: XCFramework - runs-on: macOS-11 + runs-on: macOS-13 steps: - uses: actions/checkout@v2 @@ -64,7 +64,7 @@ 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: From c9ac5bbb87de7c6454c73f5db4e217ba163b2c17 Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Mon, 29 Jul 2024 18:42:02 +0200 Subject: [PATCH 2/8] update simulators --- ci/build_demos.sh | 2 +- ci/test.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/build_demos.sh b/ci/build_demos.sh index 14e99ab..b2f8953 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 \ diff --git a/ci/test.sh b/ci/test.sh index 7b47599..53a674a 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 xcodebuild \ -scheme PocketSVG \ - -destination "platform=iOS Simulator,name=iPhone 11 Pro" \ + -destination "platform=iOS Simulator,name=iPhone 15" \ test \ | xcpretty From cea1dd8c9e34c2d6a48d1fea5c7237139c7e48e4 Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Mon, 29 Jul 2024 18:43:07 +0200 Subject: [PATCH 3/8] fix xcode version --- .github/workflows/primary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/primary.yml b/.github/workflows/primary.yml index b141c1d..1c2bab2 100644 --- a/.github/workflows/primary.yml +++ b/.github/workflows/primary.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - 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 From 743e26bf6efe6865a85b3ee1d7e4aca53fee143f Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Wed, 4 Sep 2024 12:58:21 +0200 Subject: [PATCH 4/8] wip --- ci/build_demos.sh | 4 ++-- ci/build_xcframework.sh | 30 +++++++++++------------------- ci/test.sh | 4 ++-- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/ci/build_demos.sh b/ci/build_demos.sh index b2f8953..5889cf8 100644 --- a/ci/build_demos.sh +++ b/ci/build_demos.sh @@ -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 53a674a..2c8430f 100644 --- a/ci/test.sh +++ b/ci/test.sh @@ -12,10 +12,10 @@ xcodebuild \ -scheme PocketSVG \ -destination "platform=iOS Simulator,name=iPhone 15" \ test \ - | xcpretty + | xcbeautify xcodebuild \ -scheme PocketSVG \ -destination "platform=iOS Simulator,name=iPhone 15" \ test \ - | xcpretty + | xcbeautify From f8c514f5b02e18370007def2945876515be1a45d Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Wed, 4 Sep 2024 12:59:52 +0200 Subject: [PATCH 5/8] wip --- .github/workflows/primary.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/primary.yml b/.github/workflows/primary.yml index 1c2bab2..a14d581 100644 --- a/.github/workflows/primary.yml +++ b/.github/workflows/primary.yml @@ -56,7 +56,7 @@ jobs: - 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 @@ -70,7 +70,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: PocketSVG.xcframework path: PocketSVG.xcframework From 1fe10c9df03d0962e2db3e954db6ca3d63a363a9 Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Wed, 4 Sep 2024 13:09:34 +0200 Subject: [PATCH 6/8] allow warnings in cocaopods --- .github/workflows/primary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/primary.yml b/.github/workflows/primary.yml index a14d581..1646691 100644 --- a/.github/workflows/primary.yml +++ b/.github/workflows/primary.yml @@ -45,7 +45,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Lint Podspec - run: pod lib lint + run: pod lib lint --allow-warnings xcframework: name: XCFramework From 20056c1a8d65f82bee1c5971f428219ac5a19171 Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Fri, 13 Sep 2024 13:14:58 +0200 Subject: [PATCH 7/8] make swift package type: .dynamic --- Package.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Package.swift b/Package.swift index 482135e..8c7b993 100644 --- a/Package.swift +++ b/Package.swift @@ -13,6 +13,7 @@ let package = Package( products: [ .library( name: "PocketSVG", + type: .dynamic, targets: ["PocketSVG"]) ], dependencies: [ From 9259fa8464d78fb95a053ad1af1a19633a7126c0 Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Fri, 13 Sep 2024 13:20:12 +0200 Subject: [PATCH 8/8] actions/checkout v4 --- .github/workflows/primary.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/primary.yml b/.github/workflows/primary.yml index 1646691..98af3a8 100644 --- a/.github/workflows/primary.yml +++ b/.github/workflows/primary.yml @@ -20,7 +20,7 @@ jobs: name: Primary runs-on: macOS-13 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Select Xcode run: sudo xcode-select -s /Applications/Xcode_15.0.app @@ -35,7 +35,7 @@ jobs: name: Swift Package Manager runs-on: macOS-13 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Swift Build run: swift build @@ -43,7 +43,7 @@ jobs: name: Cocoapods runs-on: macOS-13 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Lint Podspec run: pod lib lint --allow-warnings @@ -51,7 +51,7 @@ jobs: name: XCFramework runs-on: macOS-13 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build XCFramework run: ci/build_xcframework.sh @@ -68,7 +68,7 @@ jobs: 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@v4 with: