Skip to content

Initial Windows Support #181

Initial Windows Support

Initial Windows Support #181

Workflow file for this run

name: Build and test
on:
pull_request:
push:
branches: [main]
jobs:
build-macos:
strategy:
matrix:
include:
# Swift 5.8.1
- os: macos-13
xcode: Xcode_14.3.1
# Swift 5.9.0
- os: macos-13
xcode: Xcode_15.0.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- id: setup-swiftwasm
uses: swiftwasm/setup-swiftwasm@v1
with:
swift-version: "wasm-5.8.0-RELEASE"
add-to-path: false
- name: Select Xcode version
run: sudo xcode-select -switch /Applications/${{ matrix.xcode }}.app
- name: Configure Tests/default.json
run: |
cat <<EOS > Tests/default.json
{
"swiftExecutablePath": "${{ steps.setup-swiftwasm.outputs.toolchain-path }}/usr/bin/swift",
"hostSwiftExecutablePath": "$(xcrun --find swift)",
"hostSdkRootPath": "$(xcrun --show-sdk-path --sdk macosx)"
}
EOS
- run: swift test
# TODO: Enable spectest and wasi-testsuite checks
build-linux:
strategy:
matrix:
swift:
- "5.8-focal"
- "5.8-amazonlinux2"
- "5.9-focal"
- "5.9-amazonlinux2"
container:
image: swift:${{ matrix.swift }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- id: setup-swiftwasm
uses: swiftwasm/setup-swiftwasm@v1
with:
swift-version: "wasm-5.8.0-RELEASE"
add-to-path: false
- name: Configure Tests/default.json
run: |
cat <<EOS > Tests/default.json
{
"swiftExecutablePath": "${{ steps.setup-swiftwasm.outputs.toolchain-path }}/usr/bin/swift",
"hostSwiftExecutablePath": "/usr/bin/swift"
}
EOS
- run: swift test
- run: ./CI/check-spectest.sh
- run: ./CI/check-wasi-testsuite.sh
build-windows:
runs-on: windows-latest
steps:
- uses: compnerd/gha-setup-swift@main
with:
branch: swift-5.10.1-release
tag: 5.10.1-RELEASE
- uses: actions/checkout@v4
- run: swift test
build-cmake:
runs-on: ubuntu-20.04
container:
image: swift:5.8-focal
steps:
- uses: actions/checkout@v4
- name: Install Ninja
run: apt-get update && apt-get install -y ninja-build
- name: Install CMake
run: |
apt-get install -y curl
curl -L https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-linux-x86_64.tar.gz | tar xz --strip-component 1 -C /usr/local/
- run: cmake -G Ninja -B ./build
- run: cmake --build ./build
- run: ./build/bin/wasmkit-cli --version