-
Notifications
You must be signed in to change notification settings - Fork 4
152 lines (124 loc) · 3.95 KB
/
main.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Build
on:
push:
branches: [master, stable]
pull_request:
workflow_call:
inputs:
ref:
description: 'The git ref to build'
default: ''
required: true
type: string
outputs:
whl-filename:
description: Wheel filename
value: ${{ jobs.wheel.outputs.whl-filename }}
tar-filename:
description: Tarball filename
value: ${{ jobs.wheel.outputs.tar-filename }}
workflow_dispatch:
jobs:
bundles:
name: Build bundles
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# If the ref input is empty, checkout falls back to github.ref.
ref: ${{ inputs.ref }}
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install gettext for i18n
run: |
sudo apt install -y gettext
- name: Set up Node
uses: actions/setup-node@v3
with:
# Should be same version as in scripts/bootstrap.sh
node-version: '16.14.0'
- name: Install latest pipenv
run: |
python -m pip install --upgrade pipenv wheel
- name: Install dependencies in pipenv
run: |
bash ./scripts/bootstrap.sh --ci
- name: Build libs
run: pipenv run yarn build:libs
- name: Upload loading-screen.zip
uses: actions/upload-artifact@v3
with:
name: loading-screen.zip
path: packages/loading-screen/loading-screen.zip
if-no-files-found: error
- name: Build apps
run: pipenv run yarn build:apps
- name: Deploy apps
run: pipenv run yarn deploy:apps
- name: Upload apps-bundle.zip
uses: actions/upload-artifact@v3
with:
name: apps-bundle.zip
path: apps-bundle.zip
if-no-files-found: error
wheel:
name: Build wheel
runs-on: ubuntu-latest
outputs:
whl-filename: ${{ steps.whl-filename.outputs.whl-filename }}
tar-filename: ${{ steps.tar-filename.outputs.tar-filename }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# If the ref input is empty, checkout falls back to github.ref.
ref: ${{ inputs.ref }}
# The full git history is needed so that setuptools_scm can derive
# the version number correctly.
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install gettext for i18n
run: |
sudo apt install -y gettext
- name: Set up Node
uses: actions/setup-node@v3
with:
# Should be same version as in scripts/bootstrap.sh
node-version: '16.14.0'
- name: Install latest pipenv
run: |
python -m pip install --upgrade pipenv wheel
- name: Install dependencies in pipenv
run: |
bash ./scripts/bootstrap.sh --ci
- name: Python tests
run: |
pipenv run python -m pytest --log-level DEBUG
- name: Build
run: |
pipenv run yarn build-dist
ls -l dist/
- name: Get wheel filename
id: whl-filename
run: echo "whl-filename=$(ls dist | grep '\.whl$')" >> $GITHUB_OUTPUT
- name: Upload wheel
uses: actions/upload-artifact@v3
with:
name: ${{ steps.whl-filename.outputs.whl-filename }}
path: dist/${{ steps.whl-filename.outputs.whl-filename }}
if-no-files-found: error
- name: Get tarball filename
id: tar-filename
run: echo "tar-filename=$(ls dist | grep '\.tar\.')" >> $GITHUB_OUTPUT
- name: Upload tarball
uses: actions/upload-artifact@v3
with:
name: ${{ steps.tar-filename.outputs.tar-filename }}
path: dist/${{ steps.tar-filename.outputs.tar-filename }}
if-no-files-found: error