Initial commit: SQLiteKit extracted from SwiftPorts #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Swift | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| # Analog to Cocoanetics/SwiftPorts' swift.yml, minus the external-C-dependency | |
| # install steps (brew / apt / vcpkg): SQLiteKit vendors the SQLite engine, so | |
| # there are no system libraries to provision on any platform. | |
| # | |
| # Each full-build platform runs the suite twice: a default run that pins the | |
| # trait-OFF contract (the `#else` branches — FTS5 / vec0 modules absent), then a | |
| # `--traits FTS5,SQLiteVec` run filtered to the on-state proofs. Android runs the | |
| # whole suite with both traits on the x86_64 emulator — the on-device target | |
| # sqlite-vec is built for. | |
| jobs: | |
| build-macos: | |
| runs-on: macos-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # macos-latest ships an older Xcode; SQLiteKit's tools-version is 6.2. | |
| - name: Select Xcode 26.0 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26.0" | |
| - name: Verify Swift version | |
| run: swift --version | |
| - name: Build (macOS) | |
| run: swift build --build-tests -v | |
| - name: Test (macOS) | |
| run: swift test -v --skip-build --no-parallel | |
| - name: Test engine traits FTS5 + SQLiteVec (macOS) | |
| run: swift test -v --traits FTS5,SQLiteVec --filter fullTextSearchFTS5 --filter semanticSearchSQLiteVec --filter vec0BlobBind | |
| build-ios: | |
| # Build + run the suite on the iOS Simulator (default, trait-off). The | |
| # trait-on engine build for on-device is covered by build-android. | |
| runs-on: macos-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Select Xcode 26.0 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26.0" | |
| - name: Test (iOS Simulator) | |
| run: | | |
| xcodebuild \ | |
| -scheme SQLiteKit \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \ | |
| test | |
| build-linux: | |
| # No `apt-get` step — the SQLite engine is vendored, so the container needs | |
| # nothing beyond the toolchain. Pinned to 6.2 (SQLiteKit's tools-version). | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| container: | |
| image: swift:6.2-jammy | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Verify Swift version | |
| run: swift --version | |
| - name: Build (Linux) | |
| run: swift build --build-tests -v | |
| - name: Test (Linux) | |
| run: swift test -v --skip-build --no-parallel | |
| - name: Test engine traits FTS5 + SQLiteVec (Linux) | |
| run: swift test -v --traits FTS5,SQLiteVec --filter fullTextSearchFTS5 --filter semanticSearchSQLiteVec --filter vec0BlobBind | |
| build-windows: | |
| # No vcpkg step — SQLite is vendored, so there are no external `.lib` files | |
| # to locate (unlike SwiftPorts' libgit2 / libarchive), hence no `-Xcc` / | |
| # `-Xlinker` search-path flags. | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Swift | |
| uses: SwiftyLab/setup-swift@latest | |
| with: | |
| swift-version: "6.3.1" | |
| - name: Verify Swift version | |
| run: swift --version | |
| - name: Build (Windows) | |
| run: swift build --build-tests -v | |
| - name: Test (Windows) | |
| run: swift test -v --skip-build --no-parallel | |
| - name: Test engine traits FTS5 + SQLiteVec (Windows) | |
| run: swift test -v --traits FTS5,SQLiteVec --filter fullTextSearchFTS5 --filter semanticSearchSQLiteVec --filter vec0BlobBind | |
| build-android: | |
| # Cross-build the SDK and run the suite on an x86_64 emulator with both | |
| # engine traits on. No `container:` — the emulator needs nested KVM, only | |
| # available on the bare ubuntu runner image. | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build & test SDK (Android emulator) | |
| uses: skiptools/swift-android-action@v2 | |
| with: | |
| swift-version: "6.3.2" | |
| free-disk-space: true | |
| swift-build-flags: "--traits FTS5,SQLiteVec" | |
| swift-test-flags: "--traits FTS5,SQLiteVec" |