Skip to content

Commit 287cf32

Browse files
authored
Merge pull request #12 from swiftlang/github-actions-support
[CI] Add support for GitHub Actions
2 parents 4ee66b3 + 6d0d395 commit 287cf32

File tree

2 files changed

+61
-38
lines changed

2 files changed

+61
-38
lines changed

.github/workflows/pull_request.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Pull request
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
tests:
9+
name: Test
10+
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
11+
with:
12+
linux_build_command: "swift build"
13+
linux_exclude_swift_versions: '[{"swift_version": "5.8"}]'
14+
windows_build_command: "swift build"
15+
soundness:
16+
name: Soundness
17+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
18+
with:
19+
license_header_check_project_name: "Swift.org"
20+
license_header_check_enabled: false
21+
unacceptable_language_check_enabled: false

Package.swift

+40-38
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,44 @@
22
import PackageDescription
33

44
let package = Package(
5-
name: "swift-toolchain-sqlite",
6-
products: [
7-
.executable(
8-
name: "sqlite",
9-
targets: ["sqlite"]),
10-
.library(
11-
name: "SwiftToolchainCSQLite",
12-
targets: ["SwiftToolchainCSQLite"]),
13-
],
14-
targets: [
15-
.executableTarget(
16-
name: "sqlite",
17-
dependencies: ["SwiftToolchainCSQLite"],
18-
cSettings: [
19-
.define("SQLITE_OMIT_LOAD_EXTENSION"),
20-
.define("SQLITE_NOHAVE_SYSTEM", .when(platforms: [.macCatalyst, .iOS, .tvOS, .watchOS, .visionOS, .wasi])),
21-
.define("HAVE_READLINE", .when(platforms: [.macOS, .macCatalyst])),
22-
.define("_WASI_EMULATED_SIGNAL", .when(platforms: [.wasi])),
23-
.define("_WASI_EMULATED_PROCESS_CLOCKS", .when(platforms: [.wasi])),
24-
.define("_WASI_EMULATED_GETPID", .when(platforms: [.wasi])),
25-
.define("chmod(a,b)=0", .when(platforms: [.wasi])),
26-
],
27-
linkerSettings: [
28-
.linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])),
29-
.linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])),
30-
.linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])),
31-
]
32-
),
33-
.target(
34-
name: "SwiftToolchainCSQLite",
35-
path: "Sources/CSQLite",
36-
publicHeadersPath: "include",
37-
linkerSettings: [
38-
// Needed for swift_addNewDSOImage
39-
.linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi]))
40-
]
41-
),
42-
]
5+
name: "swift-toolchain-sqlite",
6+
products: [
7+
.executable(
8+
name: "sqlite",
9+
targets: ["sqlite"]),
10+
.library(
11+
name: "SwiftToolchainCSQLite",
12+
targets: ["SwiftToolchainCSQLite"]),
13+
],
14+
targets: [
15+
.executableTarget(
16+
name: "sqlite",
17+
dependencies: ["SwiftToolchainCSQLite"],
18+
cSettings: [
19+
.define("SQLITE_OMIT_LOAD_EXTENSION"),
20+
.define(
21+
"SQLITE_NOHAVE_SYSTEM",
22+
.when(platforms: [.macCatalyst, .iOS, .tvOS, .watchOS, .visionOS, .wasi])),
23+
.define("HAVE_READLINE", .when(platforms: [.macOS, .macCatalyst])),
24+
.define("_WASI_EMULATED_SIGNAL", .when(platforms: [.wasi])),
25+
.define("_WASI_EMULATED_PROCESS_CLOCKS", .when(platforms: [.wasi])),
26+
.define("_WASI_EMULATED_GETPID", .when(platforms: [.wasi])),
27+
.define("chmod(a,b)=0", .when(platforms: [.wasi])),
28+
],
29+
linkerSettings: [
30+
.linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])),
31+
.linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])),
32+
.linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])),
33+
]
34+
),
35+
.target(
36+
name: "SwiftToolchainCSQLite",
37+
path: "Sources/CSQLite",
38+
publicHeadersPath: "include",
39+
linkerSettings: [
40+
// Needed for swift_addNewDSOImage
41+
.linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi]))
42+
]
43+
),
44+
]
4345
)

0 commit comments

Comments
 (0)