Skip to content

0.10.0 build

0.10.0 build #71

name: App build
on:
push:
branches:
- "0.10.0"
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 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.10.0 && 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: 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_23.10.06_win64.exe
- name: Upload artifact for windows build
uses: actions/upload-artifact@v3
if: always()
with:
name: windows-dist
path: |
electron/dist/WaterTAP-UI_23.10.06_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
# Mac-Build:
# name: Mac Build
# runs-on: macos-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 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/watertap-org/watertap.git && cd watertap && pip install --progress-bar off .
# - name: Transfer Entry points
# run: # execute some bat file that moves the entry points
# - name: Install watertap-ui Python package
# run: |
# pip install --progress-bar off .
# - name: Create idaes extensions installer
# run: |
# npm --prefix electron get-extensions-installer
# - name: Run dist:mac
# run: npm --prefix electron dist:mac