-
Notifications
You must be signed in to change notification settings - Fork 543
135 lines (121 loc) · 4.46 KB
/
wasm_editor_and_interpreter.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
---
name: Build and test the slintpad and required WASM binaries
on:
workflow_dispatch:
workflow_call:
inputs:
rustflags:
type: string
description: extra rustflags
jobs:
wasm:
env:
CARGO_PROFILE_RELEASE_OPT_LEVEL: s
CARGO_INCREMENTAL: false
RUSTFLAGS: ${{ github.event.inputs.rustflags || inputs.rustflags }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nodejs
- uses: ./.github/actions/setup-rust
with:
target: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Compile slint-wasm-interpreter
run: wasm-pack build --release --target web -- --features console_error_panic_hook
working-directory: api/wasm-interpreter
- name: Build slint-wasm-lsp
env:
SLINT_STYLE: fluent-light
run: npm run build:wasm_lsp-release
working-directory: tools/slintpad
- name: "Upload wasm Artifacts"
uses: actions/upload-artifact@v4
with:
name: wasm
path: |
api/wasm-interpreter/pkg/
tools/lsp/pkg/
build-slintpad:
needs: [wasm]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nodejs
- name: Download wasm_lsp Artifacts
uses: actions/download-artifact@v4
with:
name: wasm
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-${{ github.job }}-node-${{ hashFiles('tools/lsp/pkg/package.json', 'tools/slintpad/package.json') }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-node-
- name: Install NPM dependencies
run: npm install
working-directory: tools/slintpad
- name: Compile slintpad
run: npm run build
working-directory: tools/slintpad
- name: "Upload slintpad Artifacts"
uses: actions/upload-artifact@v4
with:
name: slintpad
path: tools/slintpad/dist/
lint-slintpad:
needs: [wasm]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nodejs
- name: Download wasm_lsp Artifacts
uses: actions/download-artifact@v4
with:
name: wasm
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-${{ github.job }}-node-${{ hashFiles('tools/lsp/pkg/package.json', 'tools/slintpad/package.json') }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-node-
- name: Install NPM dependencies
run: npm install
working-directory: tools/slintpad
- name: Lint slintpad # This needs the WASM!
run: |
npm run syntax_check
npm run lint
working-directory: tools/slintpad
# test-slintpad-ff:
# needs: [wasm, build-slintpad]
# runs-on: ubuntu-latest
# container:
# image: cypress/browsers:node16.13.0-chrome95-ff94
# options: --user 1001
#
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/test-slintpad
# with:
# browser: "firefox"
# wasm-binaries: wasm
# slintpad-artifact: slintpad
#
# test-slintpad-chrome:
# needs: [wasm, build-slintpad]
# runs-on: ubuntu-latest
# container:
# image: cypress/browsers:node16.13.0-chrome95-ff94
# options: --user 1001
#
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/test-slintpad
# with:
# browser: "chrome"
# wasm-binaries: wasm
# slintpad-artifact: slintpad