-
Notifications
You must be signed in to change notification settings - Fork 46
130 lines (112 loc) · 3.49 KB
/
installer.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Create conda-based installers
on:
workflow_dispatch:
inputs:
helios_version:
description: 'Helios version to build'
required: true
# It would be nice to somehow extract this from the actual
# latest version of Helios, but that would require a Python
# script to perform `conda repoquery search helios --json` etc.
default: '2.0.1'
jobs:
build-installer:
name: Build installer for ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux-64
- os: windows-latest
platform: win-64
- os: macos-13
platform: osx-64
- os: macos-14
platform: osx-arm64
defaults:
run:
# Conda requires a login shell in order to work properly
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Create constructor dev environment
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge,defaults
- name: Install constructor and menuinst
run: |
conda install constructor menuinst
- name: Install jinja2-cli
run: |
python -m pip install jinja2-cli[yaml]
- name: Render the constructor configuration
run: |
jinja2 -D version=${{ github.event.inputs.helios_version }} ./constructor/construct.yaml.j2 -o construct.yaml
- name: Create installer
run: |
mkdir dist
constructor . --output-dir dist --verbose
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: installer-${{ matrix.platform }}
path: dist/*
retention-days: 1
test-installer:
name: Test installer for ${{ matrix.os }}
needs: [build-installer]
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux-64
- os: windows-latest
platform: win-64
- os: macos-13
platform: osx-64
- os: macos-14
platform: osx-arm64
defaults:
run:
# Conda requires a login shell in order to work properly
shell: bash -l {0}
steps:
- name: Download installer
uses: actions/download-artifact@v4
with:
name: installer-${{ matrix.platform }}
path: dist
- name: Extract installer path
run: |
echo "INSTALLER=$(ls ./dist)" >> $GITHUB_ENV
- name: Install Helios through installer
uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
installer-url: file://${{ github.workspace }}/dist/${{ env.INSTALLER }}
- name: Ensure that the package is working (rudimentary)
run: |
helios --version
python -c "import pyhelios; print(pyhelios.__version__)"
checksums:
name: Calculate checksums
needs: [test-installer]
runs-on: ubuntu-latest
steps:
- name: Download all installers
uses: actions/download-artifact@v4
with:
pattern: installer-*
path: dist
- name: Calculate checksums
run: |
sha256sum $(find ./dist -type f) > checksums.txt
- name: Upload checksums
uses: actions/upload-artifact@v4
with:
name: checksums
path: checksums.txt
retention-days: 1