-
Notifications
You must be signed in to change notification settings - Fork 65
83 lines (68 loc) · 2.38 KB
/
setup_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
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'
- name: Install CEA to python environment
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: 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:
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: 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: |
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