-
Notifications
You must be signed in to change notification settings - Fork 6
215 lines (181 loc) · 7 KB
/
Installers.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
name: Installers
on:
push:
paths:
- 'installers/construct.yaml'
jobs:
build-installers:
strategy:
fail-fast: false
matrix:
cfg:
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: 3.8
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: 3.9
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: '3.10'
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: '3.11'
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: '3.12'
#########################
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.8'
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.9'
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.10'
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.11'
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.12'
#########################
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: 3.8
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: 3.9
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: '3.10'
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: '3.11'
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: '3.12'
#########################
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.8'
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.9'
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.10'
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.11'
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.12'
env:
PLATFORM: ${{ matrix.cfg.platform }}
PYVER: ${{ matrix.cfg.python-version }}
defaults:
run:
shell: bash -l {0}
runs-on: ${{ matrix.cfg.runs-on }}
name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.platform }}"
steps:
- uses: actions/checkout@v3
- name: Create Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
show-channel-urls: true
- name: Environment Information
run: |
conda install -y -q -c conda-forge constructor jinja2 curl libarchive #conda-standalone
conda env list
conda list
- name: Prepare construct.yaml
run: |
cd installers/
sed -i.bak 's/{% set python = "3.8" %}/{% set python = "${{ env.PYVER }}" %}/g' construct.yaml
sed -i.bak 's/{% set platform = "xxx" %}/{% set platform = "${{ matrix.cfg.formal_platform }}" %}/g' construct.yaml
if [[ "${{ matrix.cfg.python-version }}" == 3.12 ]]; then
sed -i.bak 's/- dftd4-python/#- dftd4-python/g' construct.yaml
fi
if [[ "${{ matrix.cfg.platform }}" == win-* ]]; then
if [[ "${{ matrix.cfg.python-version }}" == 3.12 ]]; then
sed -i.bak 's/- dftd3-python/#- dftd3-python/g' construct.yaml
fi
fi
- name: Build Installer
run: |
cd installers/
if [[ "${{ matrix.cfg.platform }}" != win-* ]]; then
MICROMAMBA_VERSION=1.3.1
MICROMAMBA_BUILD=0
#mkdir "${TEMP_DIR}/micromamba"
#pushd "${TEMP_DIR}/micromamba"
curl -L -O "https://anaconda.org/conda-forge/micromamba/${MICROMAMBA_VERSION}/download/${{ matrix.cfg.platform }}/micromamba-${MICROMAMBA_VERSION}-${MICROMAMBA_BUILD}.tar.bz2"
bsdtar -xf "micromamba-${MICROMAMBA_VERSION}-${MICROMAMBA_BUILD}.tar.bz2"
if [[ "${{ matrix.cfg.platform }}" == win-* ]]; then
MICROMAMBA_FILE="${PWD}/Library/bin/micromamba.exe"
else
MICROMAMBA_FILE="${PWD}/bin/micromamba"
fi
#popd
EXTRA_CONSTRUCTOR_ARGS="${EXTRA_CONSTRUCTOR_ARGS} --conda-exe ${MICROMAMBA_FILE}" # --platform ${TARGET_PLATFORM}"
fi
#if [[ "${{ runner.os }}" == "Windows" ]]; then
# CONDAEXE_FILE="C:\Miniconda\Scripts\conda.exe"
# #CONDAEXE_FILE="${CONDA_PREFIX}/Library/bin/conda.exe"
#elif [[ "${{ runner.os }}" == "Linux" ]]; then
# CONDAEXE_FILE="/usr/share/miniconda/condabin/conda"
#elif [[ "${{ runner.os }}" == "macOS" ]]; then
# CONDAEXE_FILE="/usr/local/miniconda/condabin/conda"
# #CONDAEXE_FILE="${CONDA_PREFIX}/bin/conda"
#fi
constructor --platform ${{ matrix.cfg.platform }} ${EXTRA_CONSTRUCTOR_ARGS} ##--conda-exe ${CONDAEXE_FILE}
echo "ARTIFACT=`ls -1 Psi4conda*`" >> $GITHUB_ENV
- name: Archive Psi4Conda Installer
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: ${{ env.PLATFORM }}-${{ env.PYVER }}
path: installers/${{ env.ARTIFACT }}
retention-days: 1
- name: Install Installer
if: matrix.cfg.platform != 'osx-arm64'
uses: conda-incubator/setup-miniconda@v2
with:
installer-url: file://${{ github.workspace }}/installers/${{ env.ARTIFACT }}
auto-activate-base: true
activate-environment: ""
- name: Test Installer
if: matrix.cfg.platform != 'osx-arm64'
run: |
conda info
conda list
which conda python psi4
psi4 --version
if [[ "${{ runner.os }}" == "Windows" ]]; then
psi4 --test=smoke_not_d2ints -n2
else
psi4 --test -n2
fi