-
Notifications
You must be signed in to change notification settings - Fork 117
244 lines (215 loc) · 6.14 KB
/
gh_pages.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
name: GH Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 5 * * *'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
wasm_chrome:
name: Add Wasm_Chrome
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x # Run with latest stable Deno.
- name: Generate Dynamic Files
if: github.ref == 'refs/heads/main'
run: |
cd tools/wasm_chrome
deno run --allow-all generate_branch_file.ts -T ${{ secrets.GITHUB_TOKEN }}
- name: Uploading
uses: actions/upload-artifact@v3
with:
name: Wasm-Chrome
path: tools/wasm_chrome
logviewer:
name: Add Logviewer
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Uploading
uses: actions/upload-artifact@v3
with:
name: Logviewer
path: tools/logviewer
addonStats:
name: Add Addon-Stats
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Uploading
uses: actions/upload-artifact@v3
with:
name: AddonStats
path: tools/addonstats
docs:
name: Render Docs
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Building
shell: bash
run: |
sudo apt-get update
sudo apt-get install doxygen -y
doxygen
- name: Uploading
uses: actions/upload-artifact@v3
with:
name: doxygen-docs
path: html/
inspector:
name: Add Inspector
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Building
shell: bash
run: |
npm install
npm run inspector:build
- name: Uploading
uses: actions/upload-artifact@v3
with:
name: Inspector Build
path: tools/inspector/dist/app
translationsreport:
name: Add Translations Report
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Building
shell: bash
run: |
cd tools/translationsreport/app
npm install
npm run build
- name: Uploading
uses: actions/upload-artifact@v3
with:
name: Translations Report
path: tools/translationsreport/app/build
addons:
runs-on: ubuntu-22.04
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install Linux packages
run: |
sudo apt-get update
sudo apt-get install -y $(./scripts/linux/getdeps.py -a linux/debian/control)
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install python dependencies
shell: bash
run: pip install -r requirements.txt
- name: Generating addons
shell: bash
run: |
export PATH=/opt/$QTVERSION/gcc_64/bin:$PATH
mkdir -p build-addons
cmake -S addons -B build-addons
cmake --build build-addons
- name: Sign manifest
if: github.ref == 'refs/heads/main'
shell: bash
env:
ADDON_PRIVATE_KEY: ${{ secrets.ADDON_PRIVATE_KEY }}
run: |
echo -n "$ADDON_PRIVATE_KEY" > addon_private_key.pem
openssl dgst -sha256 -sign addon_private_key.pem -out build-addons/manifest.json.sig build-addons/manifest.json
rm addon_private_key.pem
- name: Uploading
uses: actions/upload-artifact@v3
with:
name: Addons
path: |
build-addons/*.rcc
build-addons/manifest.*
ghPages:
runs-on: ubuntu-20.04
needs: [wasm_chrome, inspector, translationsreport, addons, logviewer, addonstats, docs]
name: Compile Github Page from Components
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Download Wasm-chrome
uses: actions/download-artifact@v3
with:
name: Wasm-Chrome
# Destination path
path: _site
- name: Download Docs
uses: actions/download-artifact@v3
with:
name: doxygen-docs
# Destination path
path: _site/docs
- name: Download a Addons Artifact
uses: actions/download-artifact@v3
with:
name: Addons
path: _site/addons
- name: Download the Logviewer Artifact
uses: actions/download-artifact@v3
with:
name: Logviewer
path: _site/logviewer
- name: Download the AddonStats Artifact
uses: actions/download-artifact@v3
with:
name: AddonStats
path: _site/addonstats
- name: Download a Inspector Artifact
uses: actions/download-artifact@v3
with:
name: Inspector Build
path: _site/inspector
- name: Download the Translations Report artifact
uses: actions/download-artifact@v3
with:
name: Translations Report
path: _site/translationsreport
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
deploy:
name: Deploy Github Page
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: ghPages
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1