Skip to content

Commit 24a2d65

Browse files
committed
ci: Set up basic pull request CI using https://github.com/PassiveLogic/swift-dispatch-async/blob/main/.github/workflows/pull_request.yml as a source of inspiration.
1 parent 1b28ae0 commit 24a2d65

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/pull_request.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Pull request
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
soundness:
9+
name: Soundness
10+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
11+
with:
12+
format_check_container_image: swift:6.1.0-noble
13+
license_header_check_enabled: false
14+
api_breakage_check_enabled: false
15+
16+
tests:
17+
name: Tests
18+
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
19+
with:
20+
enable_macos_checks: false
21+
linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"5.10.1\"}, {\"swift_version\": \"6.0\"}]"
22+
enable_windows_checks: false
23+
enable_wasm_sdk_build: true
24+
enable_embedded_wasm_sdk_build: false
25+
26+
wasm-sdk:
27+
name: WebAssembly SDK
28+
runs-on: ubuntu-latest
29+
container:
30+
image: "swift:6.1.0-noble"
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
- name: Swift version
35+
run: swift --version
36+
- name: WasmBuild
37+
run: |
38+
apt-get update -y -q
39+
apt-get install -y -q curl
40+
apt-get install -y -q jq
41+
version="$(swift --version | head -n1)"
42+
tag="$(curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/tag-by-version.json" | jq -e -r --arg v "$version" '.[$v] | .[-1]')"
43+
curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/builds/$tag.json" | jq -r '.["swift-sdks"]["wasm32-unknown-wasi"] | "swift sdk install \"\(.url)\" --checksum \"\(.checksum)\""' | sh -x
44+
swift build --swift-sdk wasm32-unknown-wasi

0 commit comments

Comments
 (0)