Skip to content

Commit 52f228b

Browse files
authored
Merge pull request #195 from PureSwift/feature/swift-6.1
Update for Swift 6.1
2 parents 6890c35 + 50e14f3 commit 52f228b

File tree

3 files changed

+29
-21
lines changed

3 files changed

+29
-21
lines changed

.github/workflows/swift-arm.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
run: SWIFTPM_ENABLE_MACROS=0 SWIFTPM_ENABLE_PLUGINS=0 SWIFTPM_BLUETOOTH_METADATA=0 SWIFT_BLUETOOTH_C_SHIMS=0 swift build --triple armv6m-apple-none-macho --configuration release --verbose -Xswiftc -enable-experimental-feature -Xswiftc Embedded -Xcc -D__MACH__ -Xcc -ffreestanding -Xcc -mcpu=cortex-m0plus -Xcc -mthumb --target ${{ matrix.target }}
2121

2222
linux-arm-raspios-build:
23-
name: Linux (Build)
23+
name: Linux (Raspberry Pi OS)
2424
runs-on: ubuntu-latest
2525
strategy:
2626
matrix:
27-
config: ["debug" , "release"]
27+
arch: ["armv6", "armv7"]
2828
swift: ["6.1.2"]
29+
config: ["debug" , "release"]
2930
linux: ["raspios"]
3031
release: ["bookworm"]
31-
arch: ["armv6", "armv7"]
3232
container: swift:${{ matrix.swift }}
3333
steps:
3434
- name: Checkout
@@ -46,15 +46,15 @@ jobs:
4646
run: SWIFT_BUILD_DYNAMIC_LIBRARY=1 swift build -c ${{ matrix.config }} --destination /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}/${{ matrix.linux }}-${{ matrix.release }}.json
4747

4848
linux-arm-debian-build:
49-
name: Linux (Build)
49+
name: Linux (Debian)
5050
runs-on: ubuntu-latest
5151
strategy:
5252
matrix:
53-
config: ["debug" , "release"]
53+
arch: ["armv7"]
5454
swift: ["6.1.2"]
55+
config: ["debug" , "release"]
5556
linux: ["debian"]
5657
release: ["bookworm", "bullseye"]
57-
arch: ["armv7"]
5858
container: swift:${{ matrix.swift }}
5959
steps:
6060
- name: Checkout
@@ -76,13 +76,15 @@ jobs:
7676
name: "swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-bluetooth-${{ matrix.config }}"
7777
path: .build/armv7-unknown-linux-gnueabihf/${{ matrix.config }}/libBluetooth.so
7878

79-
80-
linux-arm-test:
81-
name: Linux (Test)
79+
linux-arm-debian-test:
80+
name: Linux Test
8281
runs-on: ubuntu-latest
8382
strategy:
8483
matrix:
85-
swift: ["6.0.3"]
84+
arch: ["armv7"]
85+
swift: ["6.1.2"]
86+
linux: ["debian"]
87+
release: ["bookworm", "bullseye"]
8688
container: swift:${{ matrix.swift }}
8789
steps:
8890
- name: Checkout
@@ -91,15 +93,15 @@ jobs:
9193
run: apt update -y; apt install wget -y
9294
- name: Install SDK
9395
run: |
94-
wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7-sdk.tar.gz
95-
tar -xvf swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7-sdk.tar.gz
96-
mv swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7 /opt/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7
96+
wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
97+
tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
98+
mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}
9799
- name: Swift Version
98100
run: swift --version
99101
- name: Build
100-
run: SWIFT_BUILD_DYNAMIC_LIBRARY=0 swift build --build-tests --destination /opt/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7/debian-bookworm.json
102+
run: SWIFT_BUILD_DYNAMIC_LIBRARY=0 swift build --build-tests --destination /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}/${{ matrix.linux }}-${{ matrix.release }}.json
101103
- name: Upload artifacts
102104
uses: actions/upload-artifact@v4
103105
with:
104-
name: "linux-armv7-bookworm-tests-${{ matrix.swift }}"
105-
path: .build/armv7-unknown-linux-gnueabihf/debug/BluetoothPackageTests.xctest
106+
name: "swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-bluetooth-test"
107+
path: .build/armv7-unknown-linux-gnueabihf/${{ matrix.config }}/BluetoothPackageTests.xctest

.github/workflows/swift.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
config: ["debug", "release"]
11-
options: ["", "SWIFT_BUILD_DYNAMIC_LIBRARY=1", "SWIFT_BLUETOOTH_C_SHIMS=1"]
11+
options: ["", "SWIFT_BUILD_DYNAMIC_LIBRARY=1"]
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
@@ -23,9 +23,9 @@ jobs:
2323
name: Linux
2424
strategy:
2525
matrix:
26-
container: ["swift:6.0.3", "swift:6.1.1"]
26+
container: ["swift:6.0.3", "swift:6.1.2", "swiftlang/swift:nightly"]
2727
config: ["debug", "release"]
28-
options: ["", "SWIFT_BUILD_DYNAMIC_LIBRARY=1", "SWIFT_BLUETOOTH_C_SHIMS=1"]
28+
options: ["", "SWIFT_BUILD_DYNAMIC_LIBRARY=1"]
2929
runs-on: ubuntu-latest
3030
container: ${{ matrix.container }}-jammy
3131
steps:
@@ -38,7 +38,7 @@ jobs:
3838
- name: Test
3939
run: ${{ matrix.options }} swift test -c ${{ matrix.config }}
4040

41-
android-arm:
41+
android:
4242
name: Android
4343
strategy:
4444
fail-fast: false

Package.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,19 @@ if generateCode {
156156
}
157157

158158
if enableMacros {
159+
let version: Version
160+
#if swift(>=6.1)
161+
version = "601.0.1"
162+
#else
163+
version = "600.0.1"
164+
#endif
159165
package.targets[0].swiftSettings = [
160166
.define("SWIFTPM_ENABLE_MACROS")
161167
]
162168
package.dependencies += [
163169
.package(
164170
url: "https://github.com/swiftlang/swift-syntax.git",
165-
from: "600.0.1"
171+
from: version
166172
)
167173
]
168174
package.targets += [

0 commit comments

Comments
 (0)