-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (60 loc) · 1.85 KB
/
Copy pathswift-wasm.yml
File metadata and controls
61 lines (60 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Swift WebAssembly
on: [push]
jobs:
wasm:
name: WebAssembly
runs-on: ubuntu-latest
container: swift:6.3.2
strategy:
fail-fast: false
matrix:
config: [debug, release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Swift Version
run: swift --version
- name: Install dependencies
run: apt-get update -y && apt-get install -y curl
- name: Install WASM SDK
run: |
set -eux
url="https://download.swift.org/swift-6.3.2-release/wasm-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_wasm.artifactbundle.tar.gz"
curl -fsSL "$url" -o wasm.artifactbundle.tar.gz
swift sdk install wasm.artifactbundle.tar.gz
swift sdk list
- name: Build
run: >-
swift build
-c ${{ matrix.config }}
--swift-sdk swift-6.3.2-RELEASE_wasm
embedded:
name: Embedded WebAssembly
runs-on: ubuntu-latest
container: swift:6.3.2
strategy:
fail-fast: false
matrix:
config: [debug, release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Swift Version
run: swift --version
- name: Install dependencies
run: apt-get update -y && apt-get install -y curl
- name: Install Embedded WASM SDK
run: |
set -eux
# The embedded SDK identifier ships inside the same artifact bundle as the regular WASM SDK.
url="https://download.swift.org/swift-6.3.2-release/wasm-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_wasm.artifactbundle.tar.gz"
curl -fsSL "$url" -o wasm.artifactbundle.tar.gz
swift sdk install wasm.artifactbundle.tar.gz
swift sdk list
- name: Build
run: >-
SWIFTPM_ENABLE_MACROS=0
SWIFT_EMBEDDED=1
swift build
-c ${{ matrix.config }}
--swift-sdk swift-6.3.2-RELEASE_wasm-embedded