Adds windows swift support (#8622)

Adding support for windows requires the code generations
to add a compiler statement to completely ignore GRPC code
generation on windows

Cleanup the project to use the main Package.swift to run tests
instead of having it separate and includes the imports for GRPC
within it.

Adds windows swift ci
This commit is contained in:
mustiikhalil
2025-06-30 14:45:48 +02:00
committed by GitHub
parent 75556437cc
commit b8db3a9a6a
38 changed files with 64 additions and 68 deletions

View File

@@ -492,10 +492,10 @@ jobs:
sh phpUnionVectorTest.sh
build-swift:
name: Build Swift
name: Test Swift
strategy:
matrix:
swift: ["5.9", "5.10", "6.0"]
swift: ["5.9", "5.10", "6.1"]
# Only 22.04 has swift at the moment https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md?plain=1#L30
runs-on: ubuntu-22.04
steps:
@@ -506,13 +506,23 @@ jobs:
- name: Get swift version
run: swift --version
- name: test
working-directory: tests/swift/tests
run: |
swift build --build-tests
swift test
build-swift-windows:
name: Test swift windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: SwiftyLab/setup-swift@latest
with:
swift-version: '6.1'
- run: swift build
- run: swift test
build-swift-wasm:
name: Build Swift Wasm
name: Test Swift Wasm
runs-on: ubuntu-24.04
container:
image: ghcr.io/swiftwasm/carton:0.20.1