Skip to content

Commit 302262b

Browse files
committed
Enable more CI variations
This project acts as something of a canary since it can build for virtually every target imaginable, add the axes it's missing.
1 parent ab4ee66 commit 302262b

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/pull_request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
name: Test
1313
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1414
with:
15+
linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]'
1516
linux_build_command: "swift build"
1617
linux_exclude_swift_versions: '[{"swift_version": "5.8"}, {"swift_version": "5.9"}, {"swift_version": "5.10"}]'
1718
windows_build_command: "Invoke-Program swift build"
@@ -22,6 +23,7 @@ jobs:
2223
enable_ios_checks: true
2324
enable_linux_static_sdk_build: true
2425
enable_wasm_sdk_build: true
26+
enable_embedded_wasm_sdk_build: true
2527
enable_android_sdk_build: true
2628

2729
soundness:

Package.swift

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,27 @@ let package = Package(
2929
.linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])),
3030
.linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])),
3131
.linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])),
32+
.linkedLibrary("dl", .when(platforms: [.linux])),
3233
.linkedLibrary("m", .when(platforms: [.linux, .android])),
33-
.linkedLibrary("pthread", .when(platforms: [.custom("freebsd")])),
34+
.linkedLibrary("pthread", .when(platforms: [.linux, .custom("freebsd")])),
3435
]
3536
),
3637
.target(
3738
name: "SwiftToolchainCSQLite",
3839
path: "Sources/CSQLite",
39-
publicHeadersPath: "include",
40-
linkerSettings: [
41-
// Needed for swift_addNewDSOImage
42-
.linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi]))
43-
]
40+
publicHeadersPath: "include"
4441
),
4542
]
4643
)
44+
45+
// Workaround for: undefined symbol: swift_addNewDSOImage
46+
// (this should be resolved by Swift Build becoming the default build system)
47+
if Context.environment["GITHUB_JOB"] != "embedded-wasm-sdk-build" {
48+
for target in package.targets {
49+
if target.name == "SwiftToolchainCSQLite" {
50+
target.linkerSettings = [
51+
.linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi]))
52+
]
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)