Skip to content

Commit

Permalink
Compress CEA environment using 7z
Browse files Browse the repository at this point in the history
  • Loading branch information
reyery committed Feb 7, 2024
1 parent 3d2e46d commit 0652ab9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/setup_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
environment-file: conda-lock.yml
environment-name: cea
cache-environment: true
micromamba-binary-path: setup/micromamba.exe
micromamba-binary-path: setup/dependencies/micromamba.exe

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

- name: Move conda environment to setup
- name: Compress conda environment
shell: bash -el {0}
run: mv $MAMBA_ROOT_PREFIX setup/dependencies/
run: 7z a setup/dependencies/cea_env.7z $MAMBA_ROOT_PREFIX

- uses: actions/checkout@v4
with:
Expand All @@ -63,6 +63,13 @@ jobs:
yarn package
mv out/CityEnergyAnalyst-GUI-win32-x64 $GITHUB_WORKSPACE/setup/dashboard
- name: Install setup plugin
shell: bash
run: |
cd "C:\Program Files (x86)\NSIS\Plugins\x86-unicode"
curl -o Nsis7z.7z https://nsis.sourceforge.io/mediawiki/images/6/69/Nsis7z_19.00.7z
7z e Nsis7z.7z Plugins/x86-unicode/nsis7z.dll
- name: Make setup
shell: bash
run: |
Expand Down
7 changes: 4 additions & 3 deletions setup/cityenergyanalyst.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ Section "Base Installation" Base_Installation_Section
File "cityenergyanalyst.tar.gz"
File /r "dependencies"

# add micromamba
File /oname=$INSTDIR\dependencies\micromamba.exe "micromamba.exe"
File /oname=$INSTDIR\dependencies\conda-lock.yml "..\conda-lock.yml"
SetOutPath "$INSTDIR\dependencies\micromamba"
Nsis7z::ExtractWithDetails "$INSTDIR\dependencies\cea-env.7z" "Installing CEA dependencies %s..."
Delete "$INSTDIR\dependencies\cea-env.7z"
SetOutPath "$INSTDIR"

# install CEA from tarball
DetailPrint "pip installing CityEnergyAnalyst==${VER}"
Expand Down

0 comments on commit 0652ab9

Please sign in to comment.