From 366262f1f7abf3d73b0ea1d2483a1b1277f70eaa Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 28 Jan 2024 18:55:20 +0800 Subject: [PATCH] Add wasm CI support (#27) * Add wasm CI support * Add more swift versions for wasm swift-wasm 5.9.1 will encounter a compiler crash for Parameter Packs See https://github.com/swiftwasm/swift/issues/5563 * Fix the upstream compiler error --- .github/workflows/wasm.yml | 31 +++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/wasm.yml diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml new file mode 100644 index 0000000..08502c3 --- /dev/null +++ b/.github/workflows/wasm.yml @@ -0,0 +1,31 @@ +name: Wasm + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + wasmer_test: + name: Execute tests on WASM + strategy: + fail-fast: false + matrix: + swift_version: ["wasm-5.9.1-RELEASE", "wasm-DEVELOPMENT-SNAPSHOT-2024-01-22-a"] + os: [ubuntu-22.04] + include: + - swift_version: "wasm-5.9.1-RELEASE" + extra_params: "-Xswiftc -Xfrontend -Xswiftc -disable-round-trip-debug-types" # https://github.com/swiftwasm/swift/issues/5563#issuecomment-1913533592 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: swiftwasm/setup-swiftwasm@v1 + with: + swift-version: ${{ matrix.swift_version }} + - name: build + run: | + swift build ${{ matrix.extra_params }} + # - name: test + # run: | + # swift test \ No newline at end of file diff --git a/README.md b/README.md index a59e528..7dca679 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ OpenSwiftUI is an open source implementation of Apple's [SwiftUI](https://develo |[![macOS](https://github.com/OpenSwiftUIProject/OpenSwiftUI/actions/workflows/macos.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenSwiftUI/actions/workflows/macos.yml)| |[![iOS](https://github.com/OpenSwiftUIProject/OpenSwiftUI/actions/workflows/ios.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenSwiftUI/actions/workflows/ios.yml)| |[![Ubuntu](https://github.com/OpenSwiftUIProject/OpenSwiftUI/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenSwiftUI/actions/workflows/ubuntu.yml)| +|[![Wasm](https://github.com/OpenSwiftUIProject/OpenSwiftUI/actions/workflows/wasm.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenSwiftUI/actions/workflows/wasm.yml)| The project is for the following purposes: - Build GUI app on non-Apple platform (eg. Linux & Windows)