diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..8be2d0b --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,21 @@ +name: Pull request + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + tests: + name: Test + uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main + with: + linux_build_command: "swift build" + linux_exclude_swift_versions: '[{"swift_version": "5.8"}]' + windows_build_command: "swift build" + soundness: + name: Soundness + uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main + with: + license_header_check_project_name: "Swift.org" + license_header_check_enabled: false + unacceptable_language_check_enabled: false diff --git a/Package.swift b/Package.swift index ff4106f..283944c 100644 --- a/Package.swift +++ b/Package.swift @@ -2,42 +2,44 @@ import PackageDescription let package = Package( - name: "swift-toolchain-sqlite", - products: [ - .executable( - name: "sqlite", - targets: ["sqlite"]), - .library( - name: "SwiftToolchainCSQLite", - targets: ["SwiftToolchainCSQLite"]), - ], - targets: [ - .executableTarget( - name: "sqlite", - dependencies: ["SwiftToolchainCSQLite"], - cSettings: [ - .define("SQLITE_OMIT_LOAD_EXTENSION"), - .define("SQLITE_NOHAVE_SYSTEM", .when(platforms: [.macCatalyst, .iOS, .tvOS, .watchOS, .visionOS, .wasi])), - .define("HAVE_READLINE", .when(platforms: [.macOS, .macCatalyst])), - .define("_WASI_EMULATED_SIGNAL", .when(platforms: [.wasi])), - .define("_WASI_EMULATED_PROCESS_CLOCKS", .when(platforms: [.wasi])), - .define("_WASI_EMULATED_GETPID", .when(platforms: [.wasi])), - .define("chmod(a,b)=0", .when(platforms: [.wasi])), - ], - linkerSettings: [ - .linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])), - .linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])), - .linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])), - ] - ), - .target( - name: "SwiftToolchainCSQLite", - path: "Sources/CSQLite", - publicHeadersPath: "include", - linkerSettings: [ - // Needed for swift_addNewDSOImage - .linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi])) - ] - ), - ] + name: "swift-toolchain-sqlite", + products: [ + .executable( + name: "sqlite", + targets: ["sqlite"]), + .library( + name: "SwiftToolchainCSQLite", + targets: ["SwiftToolchainCSQLite"]), + ], + targets: [ + .executableTarget( + name: "sqlite", + dependencies: ["SwiftToolchainCSQLite"], + cSettings: [ + .define("SQLITE_OMIT_LOAD_EXTENSION"), + .define( + "SQLITE_NOHAVE_SYSTEM", + .when(platforms: [.macCatalyst, .iOS, .tvOS, .watchOS, .visionOS, .wasi])), + .define("HAVE_READLINE", .when(platforms: [.macOS, .macCatalyst])), + .define("_WASI_EMULATED_SIGNAL", .when(platforms: [.wasi])), + .define("_WASI_EMULATED_PROCESS_CLOCKS", .when(platforms: [.wasi])), + .define("_WASI_EMULATED_GETPID", .when(platforms: [.wasi])), + .define("chmod(a,b)=0", .when(platforms: [.wasi])), + ], + linkerSettings: [ + .linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])), + .linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])), + .linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])), + ] + ), + .target( + name: "SwiftToolchainCSQLite", + path: "Sources/CSQLite", + publicHeadersPath: "include", + linkerSettings: [ + // Needed for swift_addNewDSOImage + .linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi])) + ] + ), + ] )