Skip to content

Commit

Permalink
Merge pull request #3486 from architecture-building-systems/3468-upda…
Browse files Browse the repository at this point in the history
…te-nsis

Update nsis workflow for Windows installation
  • Loading branch information
reyery authored Feb 12, 2024
2 parents 297d8a6 + 7ce7156 commit 9612084
Show file tree
Hide file tree
Showing 29 changed files with 1,708 additions and 1,429 deletions.
49 changes: 23 additions & 26 deletions .github/workflows/setup_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,38 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install conda environment from environment.yml
uses: mamba-org/setup-micromamba@v1
- uses: actions/setup-python@v5
with:
environment-file: conda-lock.yml
environment-name: cea
cache-environment: true
init-shell: bash powershell
python-version: '3.8'

- name: Install CEA to conda environment
shell: bash -l {0}
- name: Install CEA to python environment
run: pip install .

- name: Install conda-pack
run: micromamba create -n conda-pack conda-pack

- name: Pack conda environment
shell: bash -l {0}
run: |
micromamba activate conda-pack
conda-pack -p $MAMBA_ROOT_PREFIX/envs/cea -o $GITHUB_WORKSPACE/cea.tar.gz --n-threads -1
- name: Extract tar
- name: Get CEA version
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/setup/Dependencies/Python
cd $GITHUB_WORKSPACE/setup/Dependencies/Python
tar -xzf $GITHUB_WORKSPACE/cea.tar.gz --force-local
run: echo "CEA_VERSION=$(python -c "import cea; print(cea.__version__)")" >> "$GITHUB_ENV"

- name: Create sdist of CEA
shell: bash
run: |
CEA_VERSION=$(python -c "import cea; print(cea.__version__)")
python -m pip install build
python -m build
mv dist/cityenergyanalyst-$CEA_VERSION.tar.gz setup/Dependencies/cityenergyanalyst.tar.gz
mv dist/cityenergyanalyst-$CEA_VERSION.tar.gz setup/cityenergyanalyst.tar.gz
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: conda-lock.yml
environment-name: cea
micromamba-binary-path: setup/dependencies/micromamba.exe
create-args: --no-pyc

- name: Clean conda environment
shell: bash -el {0}
run: micromamba clean -afy

- name: Compress conda environment
shell: bash -el {0}
run: 7z a setup/dependencies/cea-env.7z $MAMBA_ROOT_PREFIX

- uses: actions/checkout@v4
with:
Expand All @@ -54,7 +51,7 @@ jobs:
id: cache-gui
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/setup/CityEnergyAnalyst-GUI-win32-x64
path: ${{ github.workspace }}/setup/dashboard
key: ${{ runner.os }}-${{ hashFiles('gui/src', 'gui/yarn.lock') }}-gui-setup

- name: Package CEA GUI
Expand All @@ -64,7 +61,7 @@ jobs:
cd $GITHUB_WORKSPACE/gui
yarn
yarn package
mv out/CityEnergyAnalyst-GUI-win32-x64 $GITHUB_WORKSPACE/setup/CityEnergyAnalyst-GUI-win32-x64
mv out/CityEnergyAnalyst-GUI-win32-x64 $GITHUB_WORKSPACE/setup/dashboard
- name: Install setup plugin
shell: bash
Expand Down
7 changes: 0 additions & 7 deletions cea/dev/conda.bat

This file was deleted.

Loading

0 comments on commit 9612084

Please sign in to comment.