Skip to content

Commit efd097c

Browse files
CI: Check all examples build
1 parent e5c37a9 commit efd097c

File tree

3 files changed

+6
-38
lines changed

3 files changed

+6
-38
lines changed

.github/workflows/compatibility.yml

-20
This file was deleted.

.github/workflows/test.yml

+5-18
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ jobs:
3838
id: setup-swiftwasm
3939
with:
4040
target: ${{ matrix.entry.target }}
41-
- name: Configure Swift SDK
42-
run: echo "SWIFT_SDK_ID=${{ steps.setup-swiftwasm.outputs.swift-sdk-id }}" >> $GITHUB_ENV
41+
- name: Configure environment variables
42+
run: |
43+
echo "SWIFT_SDK_ID=${{ steps.setup-swiftwasm.outputs.swift-sdk-id }}" >> $GITHUB_ENV
44+
echo "SWIFT_PATH=$(dirname $(which swiftc))" >> $GITHUB_ENV
4345
- run: make bootstrap
4446
- run: make unittest
4547
# Skip unit tests with uwasi because its proc_exit throws
@@ -49,6 +51,7 @@ jobs:
4951
run: |
5052
make regenerate_swiftpm_resources
5153
git diff --exit-code Sources/JavaScriptKit/Runtime
54+
- run: swift test --package-path ./Plugins/PackageToJS
5255

5356
native-build:
5457
# Check native build to make it easy to develop applications by Xcode
@@ -64,19 +67,3 @@ jobs:
6467
- run: swift build
6568
env:
6669
DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer/
67-
68-
embedded-build:
69-
name: Build for embedded target
70-
runs-on: ubuntu-22.04
71-
strategy:
72-
matrix:
73-
entry:
74-
- os: ubuntu-22.04
75-
toolchain:
76-
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-02-26-a/swift-DEVELOPMENT-SNAPSHOT-2025-02-26-a-ubuntu22.04.tar.gz
77-
steps:
78-
- uses: actions/checkout@v4
79-
- uses: ./.github/actions/install-swift
80-
with:
81-
download-url: ${{ matrix.entry.toolchain.download-url }}
82-
- run: ./Examples/Embedded/build.sh

Plugins/PackageToJS/Tests/ExampleTests.swift

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ extension Trait where Self == ConditionTrait {
135135
let swiftSDKID = try #require(Self.getSwiftSDKID())
136136
try withPackage(at: "Examples/Basic") { packageDir, runSwift in
137137
try runSwift(["package", "--swift-sdk", swiftSDKID, "js"], [:])
138+
try runSwift(["package", "--swift-sdk", swiftSDKID, "-Xswiftc", "-DJAVASCRIPTKIT_WITHOUT_WEAKREFS", "js"], [:])
138139
}
139140
}
140141

0 commit comments

Comments
 (0)