-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (78 loc) · 2.55 KB
/
test.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: test
on:
push:
branches:
- main
pull_request:
paths:
- .github/workflows/test.yml
- bin/ci
- Sources
- Tests
- Package.resolved
- Package.swift
jobs:
test-linux:
runs-on: ubuntu-22.04
env:
SWIFT: swift-DEVELOPMENT-SNAPSHOT-2024-04-02-a
SWIFT_WASM: swift-wasm-DEVELOPMENT-SNAPSHOT-2024-04-03-a
steps:
- uses: actions/checkout@v4
- run: bin/ci/check-package.sh
- run: >
sudo apt-get update &&
sudo apt-get install -y
binutils
git
gnupg2
libc6-dev
libcurl4-openssl-dev
libedit2
libgcc-9-dev
libpython3.8
libsqlite3-0
libstdc++-9-dev
libxml2-dev
libz3-dev
pkg-config
tzdata
unzip
zlib1g-dev
curl
binaryen
- run: curl -L -O https://download.swift.org/development/ubuntu2204/${{ env.SWIFT }}/${{ env.SWIFT }}-ubuntu22.04.tar.gz
working-directory: /home/runner
- run: tar xzf ${{ env.SWIFT }}-ubuntu22.04.tar.gz
working-directory: /home/runner
- run: echo /home/runner/${{ env.SWIFT }}-ubuntu22.04/usr/bin >> ${GITHUB_PATH}
- run: swift --version
- run: >
swift experimental-sdk install
https://github.com/swiftwasm/swift/releases/download/${{ env.SWIFT_WASM }}/${{ env.SWIFT_WASM }}-ubuntu22.04_x86_64.artifactbundle.zip
- run: curl -L -O https://github.com/omochi/carton-build/releases/download/snapshot-2024-04-16/carton.tar.gz
working-directory: /home/runner
- run: tar xzf carton.tar.gz
working-directory: /home/runner
- run: echo /home/runner/carton >> ${GITHUB_PATH}
- run: carton --version
- run: swift package resolve
- run: swift build --build-tests
- run: swift test
- run: >
swift build --experimental-swift-sdk wasm32-unknown-wasi
--build-tests
-Xswiftc -static-stdlib
-Xswiftc -Xclang-linker -Xswiftc -mexec-model=reactor
-Xlinker --export-if-defined=__main_argc_argv
--disable-build-manifest-caching
-Xlinker --stack-first
-Xlinker --global-base=1048576
-Xlinker -z -Xlinker stack-size=1048576
- run: >
CartonFrontend test
--prebuilt-test-bundle-path .build/debug/swift-reactPackageTests.wasm
--environment browser --headless
env:
WEBDRIVER_PATH: /usr/bin/chromedriver
- run: ./BrowserTests/bin/build