This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Update API documentation link in README #213
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 Build & Test | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| matrix: | |
| include: | |
| - runner: macos-15 | |
| config: debug | |
| - runner: macos-15 | |
| config: release | |
| - runner: ubuntu-24.04 | |
| config: debug | |
| - runner: ubuntu-24.04 | |
| config: release | |
| fail-fast: false | |
| name: Build and Test on ${{ matrix.runner }} (${{ matrix.config }}) | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Set up Swift | |
| if: matrix.runner == 'ubuntu-24.04' | |
| run: | | |
| curl -L https://swiftlygo.xyz/install.sh | sudo bash | |
| sudo swiftlygo install -y 5.10.1 | |
| - uses: actions/checkout@v4 | |
| - name: Build (${{ matrix.config }} mode) | |
| run: swift build -c ${{ matrix.config }} | |
| - name: Run tests (${{ matrix.config }} mode) | |
| run: swift test -c ${{ matrix.config }} | |
| ios-simulator-test: | |
| name: Build and Test on iOS Simulator | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| include: | |
| - destination: "platform=iOS Simulator,name=iPhone 16,OS=18.6" | |
| config: debug | |
| - destination: "platform=iOS Simulator,name=iPhone 16,OS=18.6" | |
| config: release | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build for iOS Simulator | |
| run: | | |
| xcodebuild build-for-testing \ | |
| -scheme kuzu-swift \ | |
| -destination "${{ matrix.destination }}" \ | |
| -configuration ${{ matrix.config }} \ | |
| ENABLE_TESTABILITY=YES \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGNING_REQUIRED=NO | |
| - name: Test on iOS Simulator | |
| run: | | |
| xcodebuild test-without-building \ | |
| -scheme kuzu-swift \ | |
| -destination "${{ matrix.destination }}" \ | |
| -configuration ${{ matrix.config }} \ | |
| ENABLE_TESTABILITY=YES \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGNING_REQUIRED=NO | |
| example: | |
| name: Build and Run Example | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build example project | |
| working-directory: Example | |
| run: | | |
| # Replace version with the current commit hash | |
| sed 's/main/${{ github.sha }}/' Package.swift > Package.swift.tmp | |
| rm Package.swift | |
| mv Package.swift.tmp Package.swift | |
| swift build -c release | |
| # Copy the built binary to the current directory | |
| cp ./.build/arm64-apple-macosx/release/kuzu-swift-example . | |
| - name: Run example | |
| working-directory: Example | |
| run: ./kuzu-swift-example |