forked from project-pareto/pareto-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
133 lines (104 loc) · 4.4 KB
/
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
name: App build
on:
push:
branches:
- "jan-release"
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
# env:
# CSC_LINK: ${{ secrets.CSC_LINK }}
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
activate-environment: pareto-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 Pareto locally
# working-directory: ../
# run: git clone https://github.com/MichaelPesce/project-pareto.git && cd project-pareto && pip install --progress-bar off .
# - name: Install Pareto locally
# working-directory: ../
# run: git clone https://github.com/project-pareto/project-pareto.git && cd project-pareto && git fetch --all --tags && git checkout 0.9.0rc1 && pip install --progress-bar off .
- name: Install Pareto locally
working-directory: ../
run: git clone https://github.com/project-pareto/project-pareto.git && cd project-pareto && git fetch --all && git checkout 0.9_rel && pip install --progress-bar off .
- name: Install numpy 1.24.3
run: |
pip uninstall -y numpy && pip install numpy==1.24.3
- 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: Display file names
run: cd electron && cd dist && ls
- 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/ParetoUI-24.01.23-win64.exe
- name: Upload artifact for windows build
uses: actions/upload-artifact@v3
if: always()
with:
name: windows-pareto-dist
path: |
electron/dist/ParetoUI-24.01.23-win64.exe
# windows-build:
# name: Windows Build
# runs-on: windows-latest
# env:
# CSC_LINK: ${{ secrets.CSC_LINK }}
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
# steps:
# - uses: actions/checkout@v3
# - uses: conda-incubator/setup-miniconda@v2
# with:
# environment-file: environment.yml
# activate-environment: pareto-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 Pareto locally
# # working-directory: ../
# # run: git clone https://github.com/MichaelPesce/project-pareto.git && cd project-pareto && git fetch --all && git checkout 0.5.0_release && pip install --progress-bar off .
# - name: Install Pareto locally
# working-directory: ../
# run: git clone https://github.com/project-pareto/project-pareto.git && cd project-pareto && git fetch --all --tags && git checkout 0.8.0 && pip install --progress-bar off .
# - 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-pareto-dist
# path: |
# electron/dist/ParetoUI-24.01.23-win64.exe