-
Notifications
You must be signed in to change notification settings - Fork 119
78 lines (65 loc) · 1.91 KB
/
wasm.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
name: WebAssembly
on:
push:
branches:
- main
- 'releases/**'
pull_request:
branches:
- main
- 'releases/**'
jobs:
wasm:
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Install Qt
shell: bash
run: |
python3 -m pip install aqtinstall
python3 -m aqt install --outputdir /opt 5.15.0 linux desktop wasm_32 -m qtcharts
- name: Install python dependencies
shell: bash
run: |
pip install -r requirements.txt
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v7
with:
version: 1.39.8
- name: Compiling
shell: bash
run: |
./scripts/wasm_compile.sh /opt/5.15.0/wasm_32/bin
- name: Uploading
uses: actions/upload-artifact@v1
with:
name: WebAssembly Build
path: wasm
ghPages:
runs-on: ubuntu-20.04
needs: [wasm]
if: github.ref == 'refs/heads/main' # Only do this on Main Branch Pushes and not PR's
name: Publish Wasm on Github Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: WebAssembly Build
# Destination path
path: _site
- name: GH Pages deploy
uses: Cecilapp/[email protected]
with:
# A verified email.
email: [email protected]
# Where static files are.
build_dir: _site