From e4a1fd7477515d601f268092c9f35f3b6d67dd67 Mon Sep 17 00:00:00 2001 From: Alexander Cyon Date: Thu, 15 Feb 2024 16:36:11 +0100 Subject: [PATCH] test --- .github/workflows/release.yml | 13 +++- Package.swift | 2 +- examples/iOS/Package.resolved | 140 ++++++++++++++++++++++++++++++++++ scripts/ios/build-sargon.sh | 7 +- scripts/ios/release.sh | 9 ++- 5 files changed, 164 insertions(+), 7 deletions(-) create mode 100644 examples/iOS/Package.resolved diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 145639b63..b99d5830a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ name: CD on: + workflow_dispatch: push: branches: - develop @@ -20,7 +21,15 @@ jobs: with: toolchain: nightly-2024-01-11 default: true + target: x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim + - name: Config local env + run: | + brew install jq + - name: Run iOS build script run: | - zip_path = ./scripts/ios/release.sh - \ No newline at end of file + ZIP_PATH=$(sh ./scripts/ios/release.sh | tail -n 1) + echo "🔮 ZIP_PATH: $ZIP_PATH" + + - name: Configure Package.swift for remote development + run: sed -i '' 's/let useLocalFramework = true/let useLocalFramework = false/' Package.swift \ No newline at end of file diff --git a/Package.swift b/Package.swift index 40cdd316a..f0ad4838d 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ if useLocalFramework { ) } else { let releaseTag = "0.1.0" - let releaseChecksum = "33f779dd6e30a0083689795b588770e76d5b387df60576379431d842e74538c6" + let releaseChecksum = "a913efe0d125f3dad5895487e9333fcd9439ac486a28d29a1fec81faffa37b84" binaryTarget = .binaryTarget( name: sargonBinaryTargetName, url: diff --git a/examples/iOS/Package.resolved b/examples/iOS/Package.resolved new file mode 100644 index 000000000..a4c42fccb --- /dev/null +++ b/examples/iOS/Package.resolved @@ -0,0 +1,140 @@ +{ + "pins" : [ + { + "identity" : "combine-schedulers", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/combine-schedulers", + "state" : { + "revision" : "9dc9cbe4bc45c65164fa653a563d8d8db61b09bb", + "version" : "1.0.0" + } + }, + { + "identity" : "keychainaccess", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kishikawakatsumi/KeychainAccess", + "state" : { + "revision" : "84e546727d66f1adc5439debad16270d0fdd04e7", + "version" : "4.2.2" + } + }, + { + "identity" : "swift-case-paths", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-case-paths", + "state" : { + "revision" : "551150d5e60e3be78972607d89cd69069cca3e7c", + "version" : "1.2.4" + } + }, + { + "identity" : "swift-clocks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-clocks", + "state" : { + "revision" : "a8421d68068d8f45fbceb418fbf22c5dad4afd33", + "version" : "1.0.2" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections", + "state" : { + "revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", + "version" : "1.1.0" + } + }, + { + "identity" : "swift-composable-architecture", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-composable-architecture", + "state" : { + "revision" : "cf967a28a8605629559533320d604168d733fc9c", + "version" : "1.8.0" + } + }, + { + "identity" : "swift-concurrency-extras", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-concurrency-extras", + "state" : { + "revision" : "bb5059bde9022d69ac516803f4f227d8ac967f71", + "version" : "1.1.0" + } + }, + { + "identity" : "swift-custom-dump", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-custom-dump", + "state" : { + "revision" : "6ea3b1b6a4957806d72030a32360d4bcb155a0d2", + "version" : "1.2.0" + } + }, + { + "identity" : "swift-dependencies", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-dependencies", + "state" : { + "revision" : "09e49dd46932adfe80ce672b4b3772d79ee6c21a", + "version" : "1.2.1" + } + }, + { + "identity" : "swift-dependencies-additions", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tgrapperon/swift-dependencies-additions", + "state" : { + "revision" : "02e7b1801a96828049fe4d3e8bdc5e608ef5ffbc", + "version" : "1.0.1" + } + }, + { + "identity" : "swift-identified-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-identified-collections", + "state" : { + "revision" : "d1e45f3e1eee2c9193f5369fa9d70a6ddad635e8", + "version" : "1.0.0" + } + }, + { + "identity" : "swift-perception", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-perception", + "state" : { + "revision" : "42240120b2a8797595433288ab4118f8042214c3", + "version" : "1.1.1" + } + }, + { + "identity" : "swift-syntax", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-syntax", + "state" : { + "revision" : "64889f0c732f210a935a0ad7cda38f77f876262d", + "version" : "509.1.1" + } + }, + { + "identity" : "swiftui-navigation", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swiftui-navigation", + "state" : { + "revision" : "d9e72f3083c08375794afa216fb2f89c0114f303", + "version" : "1.2.1" + } + }, + { + "identity" : "xctest-dynamic-overlay", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", + "state" : { + "revision" : "b58e6627149808b40634c4552fcf2f44d0b3ca87", + "version" : "1.1.0" + } + } + ], + "version" : 2 +} diff --git a/scripts/ios/build-sargon.sh b/scripts/ios/build-sargon.sh index 7c141904e..eb981077f 100755 --- a/scripts/ios/build-sargon.sh +++ b/scripts/ios/build-sargon.sh @@ -88,4 +88,9 @@ basename=sargon generate_ffi $basename create_fat_simulator_lib $basename ZIP_PATH=$(build_xcframework $basename) -echo "📦 End of '$me' ZIP_PATH: '$ZIP_PATH' ✅" \ No newline at end of file +echo "📦 ✅ End of '$me', xcframework can be found at" + +# This print MUST be the last print. +# The path is read by `release.sh` script. +# This is probably terrible... but I'm a Rust/Swift dev, not a bash script dev... +echo "$ZIP_PATH" \ No newline at end of file diff --git a/scripts/ios/release.sh b/scripts/ios/release.sh index f29592d32..0b4ec1f3b 100755 --- a/scripts/ios/release.sh +++ b/scripts/ios/release.sh @@ -8,6 +8,9 @@ REL_DIR=$0:P DIR="$( cd "$( dirname "$REL_DIR" )" && pwd )"; -ZIP_PATH=$(sh $DIR/build-sargon.sh --release) -echo "Zip path output of 'build-sargon.sh' was: '$ZIP_PATH'" -echo "END OF release.sh - bye bye." \ No newline at end of file +ZIP_PATH=$(sh $DIR/build-sargon.sh --release | tail -n 1) + +# This print MUST be the last print. +# The path is read by `release.yml` CD pipeline! +# This is probably terrible... but I'm a Rust/Swift dev, not a bash script dev... +echo "$ZIP_PATH" \ No newline at end of file