forked from watertap-org/watertap-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
235 lines (176 loc) · 7.08 KB
/
electron-build.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
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
name: App build
on:
push:
branches:
- "update-package-versions"
defaults:
run:
# -l: use login shell (required when using Conda)
shell: bash -l {0}
env:
PYTEST_ADDOPTS: --color=yes
jobs:
windows-build:
name: Windows Build
runs-on: windows-latest
# strategy:
# fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
activate-environment: watertap-ui-env
- name: Install Azure Signtool
run: |
dotnet tool install --global AzureSignTool
- name: Install Electron JS dependencies
run: |
npm --prefix electron clean-install
- name: Install frontend JS dependencies
run: |
npm --prefix electron/ui clean-install
- name: Get idaes extensions
run: idaes get-extensions
- name: Install Watertap locally
working-directory: ../
run: git clone https://github.com/MichaelPesce/watertap.git && cd watertap && git fetch --all && git checkout update-pydantic && pip install --progress-bar off .
# - name: Install Watertap locally
# working-directory: ../
# run: git clone https://github.com/watertap-org/watertap.git && cd watertap && pip install --progress-bar off .
- name: Transfer Entry points
run: |
npm --prefix electron run move-entrypoints
- name: Install watertap-ui Python package
run: |
pip install --progress-bar off .
# install slightly older versions of numpy, pandas, and scipy.
# having issues when freezing the latest packages of each (numpy 1.26, pandas 2.1, scipy 1.11)
- name: Install numpy 1.24.3
run: |
pip uninstall -y numpy && pip install numpy==1.24.3
- name: Install pandas 2.0.3
run: |
pip uninstall -y pandas && pip install pandas==2.0.3
- name: Install scipy 1.9.1
run: |
pip uninstall -y scipy && pip install scipy==1.9.1
- name: Build Backend
run: npm --prefix electron run build-backend
- name: Build Frontend
run: npm --prefix electron run build-frontend-win
- name: Build Windows Distribution
run: npm --prefix electron run electron-build-win
- name: Sign Windows Distribution
run: |
AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v electron/dist/WaterTAP-UI_24.01.26_win64.exe
- name: Upload artifact for windows build
uses: actions/upload-artifact@v3
if: always()
with:
name: windows-dist
path: |
electron/dist/WaterTAP-UI_24.01.26_win64.exe
# windows-build:
# name: Windows Build
# runs-on: windows-latest
# env:
# CSC_LINK: ${{ secrets.CSC_LINK }}
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
# # strategy:
# # fail-fast: false
# steps:
# - uses: actions/checkout@v3
# - uses: conda-incubator/setup-miniconda@v2
# with:
# environment-file: environment.yml
# activate-environment: watertap-ui-env
# - name: Install Electron JS dependencies
# run: |
# npm --prefix electron clean-install
# - name: Install frontend JS dependencies
# run: |
# npm --prefix electron/ui clean-install
# - name: Get idaes extensions
# run: idaes get-extensions
# # - name: Install Watertap locally
# # working-directory: ../
# # run: git clone https://github.com/MichaelPesce/watertap.git && cd watertap && git fetch --all && git checkout springmeeting-2023 && pip install --progress-bar off .
# - name: Install Watertap locally
# working-directory: ../
# run: git clone https://github.com/watertap-org/watertap.git && cd watertap && git fetch --all --tags && git checkout 0.9.0rc0 && pip install --progress-bar off .
# - name: Transfer Entry points
# run: |
# npm --prefix electron run move-entrypoints
# - name: Install watertap-ui Python package
# run: |
# pip install --progress-bar off .
# - name: Install scipy 1.9.1
# run: |
# pip uninstall -y scipy && pip install scipy==1.9.1
# - name: Build Backend
# run: npm --prefix electron run build-backend
# - name: Build Frontend
# run: npm --prefix electron run build-frontend-win
# - name: Build Windows Distribution
# run: npm --prefix electron run electron-build-win
# - name: Upload artifact for windows build
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: windows-dist
# path: |
# electron/dist/WaterTAP-UI_Setup.exe
linux-build:
name: Linux Build
runs-on: ubuntu-latest
env:
CI: false
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
activate-environment: watertap-ui-env
- name: Install Electron JS dependencies
run: |
npm --prefix electron clean-install
- name: Install frontend JS dependencies
run: |
npm --prefix electron/ui clean-install
- name: Install GNU FORTRAN, GOMP, Blas, and Lapack libraries
run: |
sudo apt-get install -y libgfortran5 libgomp1 liblapack3 libblas3
- name: Get idaes extensions
run: idaes get-extensions
- name: Install Watertap locally
working-directory: ../
run: git clone https://github.com/watertap-org/watertap.git && cd watertap && git fetch --all --tags && git checkout 0.9.0rc0 && pip install --progress-bar off .
- name: Transfer Entry points
run: |
npm --prefix electron run move-entrypoints
- name: Install watertap-ui Python package
run: |
pip install --progress-bar off .
# - name: Create idaes extensions installer
# run: |
# npm --prefix electron run get-extensions-installer
# - name: Revert to correct idaes version
# run: |
# pip uninstall -y idaes-pse && pip install 'idaes-pse @ https://github.com/IDAES/idaes-pse/archive/2.0.0a3.zip'
- name: Build Backend
run: npm --prefix electron run build-backend
- name: Build Frontend
run: npm --prefix electron run build-frontend
# for some reason, ico file breaks linux build. going without icon for now
- name: Remove ico file
run: rm electron/build/nawi-logo.ico
- name: Build Linux Distribution
run: npm --prefix electron run electron-build-lin
- name: Upload artifact for linux build
uses: actions/upload-artifact@v3
if: always()
with:
name: linux-dist
path: |
electron/dist/watertap-ui_0.1.0_amd64.deb