Build CEA Setup #120
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build CEA Windows setup | |
on: | |
workflow_dispatch | |
jobs: | |
build_win_setup: | |
runs-on: "windows-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-binary-path: setup/micromamba.exe | |
- name: Install CEA to conda environment | |
shell: bash | |
run: pip install . | |
- name: Get CEA version | |
shell: bash | |
run: echo "CEA_VERSION=$(python -c "import cea; print(cea.__version__)")" >> "$GITHUB_ENV" | |
- name: Create sdist of CEA | |
shell: bash | |
run: | | |
python -m pip install build | |
python -m build | |
mv dist/cityenergyanalyst-$CEA_VERSION.tar.gz setup/cityenergyanalyst.tar.gz | |
- uses: actions/checkout@v4 | |
with: | |
path: gui | |
repository: architecture-building-systems/CityEnergyAnalyst-GUI | |
- name: Cache GUI | |
id: cache-gui | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/setup/dashboard | |
key: ${{ runner.os }}-${{ hashFiles('gui/src', 'gui/yarn.lock') }}-gui-setup | |
- name: Package CEA GUI | |
if: steps.cache-gui.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
cd $GITHUB_WORKSPACE/gui | |
yarn | |
yarn package | |
mv out/CityEnergyAnalyst-GUI-win32-x64 $GITHUB_WORKSPACE/setup/dashboard | |
- name: Make setup | |
shell: bash | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/setup/Output | |
makensis $GITHUB_WORKSPACE/setup/cityenergyanalyst.nsi | |
- name: Upload setup | |
uses: actions/upload-artifact@v4 | |
with: | |
name: setup | |
path: ${{ github.workspace }}\setup\Output |