Skip to content

Commit db1d05d

Browse files
committed
Update to handle version 6.1
1 parent e5acc0b commit db1d05d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: "Test Swift Package on Android"
6161
uses: skiptools/swift-android-action@v2
6262
with:
63-
swift-version: 6.0.3
63+
swift-version: 6.1
6464
```
6565

6666
### Swift Versions
@@ -89,7 +89,7 @@ or the most recent snapshot/nightly build can be specified with `nightly-6.1`.
8989

9090
| Parameter | Description | Default |
9191
|-----|-----|-----|
92-
| swift-version | The version of the Swift toolchain to use | 6.0.3 |
92+
| swift-version | The version of the Swift toolchain to use | 6.1 |
9393
| package-path | The folder where the swift package is checked out | . |
9494
| swift-configuration | Whether to build with debug or release configuration | debug |
9595
| swift-build-flags | Additional flags to pass to the swift build command | |
@@ -192,13 +192,13 @@ The actual `swift-build` command will vary between operating systems
192192
and architectures. For example, on Ubuntu 24.04, it might be:
193193

194194
```
195-
/home/runner/swift/toolchains/swift-6.0.3-RELEASE/usr/bin/swift build --swift-sdk x86_64-unknown-linux-android24
195+
/home/runner/swift/toolchains/swift-6.1-RELEASE/usr/bin/swift build --swift-sdk x86_64-unknown-linux-android24
196196
```
197197

198198
while on macOS-15 it will be:
199199

200200
```
201-
/Users/runner/Library/Developer/Toolchains/swift-6.0.3-RELEASE.xctoolchain/usr/bin/swift build --swift-sdk aarch64-unknown-linux-android24
201+
/Users/runner/Library/Developer/Toolchains/swift-6.1-RELEASE.xctoolchain/usr/bin/swift build --swift-sdk aarch64-unknown-linux-android24
202202
```
203203

204204

@@ -232,16 +232,16 @@ jobs:
232232
- name: "Test Swift Package on macOS"
233233
run: swift test
234234
- name: "Test Swift Package on iOS"
235-
run: xcodebuild test -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 15" -scheme "$(xcodebuild -list -json | jq -r '.workspace.schemes[-1]')"
235+
run: xcodebuild test -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=$(xcrun simctl list devices --json | jq -r '.devices | to_entries[] | .value[] | select(.availability == "(available)" or .isAvailable == true) | .name' | grep -E '^iPhone [0-9]+$' | sort -V | tail -n 1)" -scheme "$(xcodebuild -list -json | jq -r '.workspace.schemes[-1]')"
236236
windows:
237237
runs-on: windows-latest
238238
steps:
239239
- uses: actions/checkout@v4
240240
- name: "Setup Swift on Windows"
241241
uses: compnerd/gha-setup-swift@main
242242
with:
243-
branch: swift-6.0.3-release
244-
tag: 6.0.3-RELEASE
243+
branch: swift-6.1-release
244+
tag: 6.1-RELEASE
245245
- name: "Test Swift Package on Windows"
246246
run: swift test
247247
@@ -276,6 +276,7 @@ These are some of the open-source projects using (or used) the Swift Android Act
276276
- [Skip](https://github.com/skiptools/actions/tree/main/.github/workflows)
277277
- [supabase-swift](https://github.com/supabase/supabase-swift/tree/main/.github/workflows)
278278
- [swift-android-native](https://github.com/skiptools/swift-android-native/tree/main/.github/workflows)
279+
- [SwiftCBOR](https://github.com/valpackett/SwiftCBOR/tree/master/.github/workflows)
279280
- [swift-fakes](https://github.com/Quick/swift-fakes/tree/main/.github/workflows)
280281
- [swift-issue-reporting](https://github.com/pointfreeco/swift-issue-reporting/tree/main/.github/workflows)
281282
- [swift-png](https://github.com/tayloraswift/swift-png/tree/master/.github/workflows)

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ runs:
163163
echo "Found nightly build: ${SWIFT_VERSION}"
164164
else
165165
# match "6.0" to "6.0.3"
166-
# match "6.1" to "6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a"
167-
SWIFT_VERSION=$(cat ${SWIFT_VERSIONS_FILE} | ( grep -- "^${SWIFT_VERSION}" || true ) | head -n 1)
166+
# DO NOT match "6.1" to "6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a"
167+
SWIFT_VERSION=$(cat ${SWIFT_VERSIONS_FILE} | ( grep -v -- '-SNAPSHOT' || true ) | ( grep -- "^${SWIFT_VERSION}" || true ) | head -n 1)
168168
fi
169169
170170
if [[ "${SWIFT_VERSION}" == "" ]]; then

0 commit comments

Comments
 (0)