-
-
Notifications
You must be signed in to change notification settings - Fork 89
129 lines (105 loc) · 3.2 KB
/
wasm.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
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
name: WASM
on:
push:
paths-ignore:
- '**.md'
- 'docs/**'
- 'extras/images/**'
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: "Ubuntu", os: "ubuntu-20.04", target: "wasm" }
steps:
- uses: actions/checkout@v4
- name: Install System Packages
run: |
sudo apt-get install -y doxygen
doxygen --version
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Upgrade PIP
run: python3 -m pip install --upgrade pip setuptools wheel
- name: Install CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.24.0"
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
with:
version: "1.10.0"
- name: Install EMSDK
uses: mymindstorm/setup-emsdk@v14
with:
version: "3.1.64"
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '19'
architecture: 'x64'
- name: Verify
run: |
python3 --version
cmake --version
ninja --version
node --version
npm --version
emcc -v
- name: Python requirements
run: python3 -m pip install -r requirements.txt --user
- name: Depot tools
run: python3 make.py build-depot-tools
- name: Environment
run: echo "$PWD/build/depot-tools" >> $GITHUB_PATH
- name: PDFium
run: python3 make.py build-pdfium-${{ matrix.config.target }}
- name: Patch
run: python3 make.py patch-${{ matrix.config.target }}
- name: Patch - Check
run: python3 make.py patch-${{ matrix.config.target }}
- name: Build
run: python3 make.py build-${{ matrix.config.target }}
- name: Install
run: python3 make.py install-${{ matrix.config.target }}
- name: Test
run: python3 make.py test-${{ matrix.config.target }}
- name: Generate
run: python3 make.py generate-${{ matrix.config.target }}
- name: Archive
run: python3 make.py archive-${{ matrix.config.target }}
- name: Save
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.config.target }}
path: ${{ matrix.config.target }}.tgz
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Load
uses: actions/download-artifact@v2
with:
name: artifact-wasm
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: wasm.tgz
asset_name: wasm.tgz
asset_content_type: application/tar+gzip