forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (88 loc) · 2.93 KB
/
wasm_demos.yaml
File metadata and controls
91 lines (88 loc) · 2.93 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
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
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
name: Build wasm demos
on:
workflow_dispatch:
workflow_call:
jobs:
wasm_demo:
env:
CARGO_PROFILE_RELEASE_OPT_LEVEL: s
CARGO_INCREMENTAL: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v1
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Gallery WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/gallery
- name: Printer demo WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/printerdemo/rust
- name: Printer demo old WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/printerdemo_old/rust
- name: Todo demo WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/todo/rust
- name: Sliding Puzzle demo WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/slide_puzzle
- name: Memory example WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/memory
- name: Imagefilter example WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/imagefilter
- name: Plotter example WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/plotter
- name: OpenGL underlay example WASM build
run: |
sed -i "s/#wasm# //" Cargo.toml
wasm-pack build --release --target web
working-directory: examples/opengl_underlay
- name: "Upload Demo Artifacts"
uses: actions/upload-artifact@v2
with:
name: wasm_demo
path: |
examples/gallery/
examples/printerdemo/rust/
examples/printerdemo_old/rust/
examples/todo/
examples/memory/
examples/slide_puzzle/
examples/imagefilter/
examples/plotter/
examples/opengl_underlay/
- name: Clean cache # Otherwise the cache is much too big
run: |
du -hs target
rm -rf target/*/incremental
rm -rf target/*/*/*slint*
du -hs target