-
-
Notifications
You must be signed in to change notification settings - Fork 317
259 lines (231 loc) · 9.41 KB
/
ci.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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
name: Build miniforge
on: [ push, pull_request ]
jobs:
build:
name: ${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
ARCH: x86_64
TARGET_PLATFORM: win-64
MINIFORGE_NAME: "Miniforge3"
OS_NAME: "Windows"
- os: windows-latest
ARCH: x86_64
TARGET_PLATFORM: win-64
MINIFORGE_NAME: "Mambaforge"
OS_NAME: "Windows"
- os: windows-latest
ARCH: x86_64
TARGET_PLATFORM: win-64
MINIFORGE_NAME: "Miniforge-pypy3"
OS_NAME: "Windows"
- os: windows-latest
ARCH: x86_64
TARGET_PLATFORM: win-64
MINIFORGE_NAME: "Mambaforge-pypy3"
OS_NAME: "Windows"
- os: macos-latest
ARCH: arm64
TARGET_PLATFORM: osx-arm64
MINIFORGE_NAME: "Miniforge3"
OS_NAME: "MacOSX"
- os: macos-latest
ARCH: arm64
TARGET_PLATFORM: osx-arm64
MINIFORGE_NAME: "Mambaforge"
OS_NAME: "MacOSX"
- os: macos-latest
ARCH: x86_64
TARGET_PLATFORM: osx-64
MINIFORGE_NAME: "Miniforge-pypy3"
OS_NAME: "MacOSX"
- os: macos-latest
ARCH: x86_64
TARGET_PLATFORM: osx-64
MINIFORGE_NAME: "Mambaforge-pypy3"
OS_NAME: "MacOSX"
- os: macos-latest
ARCH: x86_64
TARGET_PLATFORM: osx-64
MINIFORGE_NAME: "Miniforge3"
OS_NAME: "MacOSX"
- os: macos-latest
ARCH: x86_64
TARGET_PLATFORM: osx-64
MINIFORGE_NAME: "Mambaforge"
OS_NAME: "MacOSX"
- os: ubuntu-latest
ARCH: aarch64
TARGET_PLATFORM: linux-aarch64
DOCKER_ARCH: arm64v8
DOCKERIMAGE: condaforge/linux-anvil-aarch64
MINIFORGE_NAME: "Miniforge3"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: aarch64
TARGET_PLATFORM: linux-aarch64
DOCKER_ARCH: arm64v8
DOCKERIMAGE: condaforge/linux-anvil-aarch64
MINIFORGE_NAME: "Mambaforge"
OS_NAME: "Linux"
# Reduce the test matrix because the builds timeouts on emulated architectures
# The time consuming operation is an attempt a full solve of conda/mamba/boa
# for as a compatibility
# xref https://github.com/conda-forge/miniforge/pull/361
TEST_IMAGE_NAMES: "ubuntu:24.04"
- os: ubuntu-latest
ARCH: x86_64
TARGET_PLATFORM: linux-64
DOCKER_ARCH: amd64
DOCKERIMAGE: condaforge/linux-anvil-cos7-x86_64
MINIFORGE_NAME: "Miniforge3"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: x86_64
TARGET_PLATFORM: linux-64
DOCKER_ARCH: amd64
DOCKERIMAGE: condaforge/linux-anvil-cos7-x86_64
MINIFORGE_NAME: "Mambaforge"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: ppc64le
TARGET_PLATFORM: linux-ppc64le
DOCKER_ARCH: ppc64le
DOCKERIMAGE: condaforge/linux-anvil-ppc64le
MINIFORGE_NAME: "Miniforge3"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: ppc64le
TARGET_PLATFORM: linux-ppc64le
DOCKER_ARCH: ppc64le
DOCKERIMAGE: condaforge/linux-anvil-ppc64le
MINIFORGE_NAME: "Mambaforge"
OS_NAME: "Linux"
# Reduce the test matrix because the builds timeouts on emulated architectures
# The time consuming operation is an attempt a full solve of conda/mamba/boa
# for as a compatibility
# xref https://github.com/conda-forge/miniforge/pull/361
TEST_IMAGE_NAMES: "ubuntu:24.04"
- os: ubuntu-latest
ARCH: aarch64
TARGET_PLATFORM: linux-aarch64
DOCKER_ARCH: arm64v8
DOCKERIMAGE: condaforge/linux-anvil-aarch64
MINIFORGE_NAME: "Miniforge-pypy3"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: aarch64
TARGET_PLATFORM: linux-aarch64
DOCKER_ARCH: arm64v8
DOCKERIMAGE: condaforge/linux-anvil-aarch64
MINIFORGE_NAME: "Mambaforge-pypy3"
OS_NAME: "Linux"
# Reduce the test matrix because the builds timeouts on emulated architectures
# The time consuming operation is an attempt a full solve of conda/mamba/boa
# for as a compatibility
# xref https://github.com/conda-forge/miniforge/pull/361
TEST_IMAGE_NAMES: "ubuntu:24.04"
- os: ubuntu-latest
ARCH: x86_64
TARGET_PLATFORM: linux-64
DOCKER_ARCH: amd64
DOCKERIMAGE: condaforge/linux-anvil-cos7-x86_64
MINIFORGE_NAME: "Miniforge-pypy3"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: x86_64
TARGET_PLATFORM: linux-64
DOCKER_ARCH: amd64
DOCKERIMAGE: condaforge/linux-anvil-cos7-x86_64
MINIFORGE_NAME: "Mambaforge-pypy3"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: ppc64le
TARGET_PLATFORM: linux-ppc64le
DOCKER_ARCH: ppc64le
DOCKERIMAGE: condaforge/linux-anvil-ppc64le
MINIFORGE_NAME: "Miniforge-pypy3"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: ppc64le
TARGET_PLATFORM: linux-ppc64le
DOCKER_ARCH: ppc64le
DOCKERIMAGE: condaforge/linux-anvil-ppc64le
MINIFORGE_NAME: "Mambaforge-pypy3"
OS_NAME: "Linux"
# Reduce the test matrix because the builds timeouts on emulated architectures
# The time consuming operation is an attempt a full solve of conda/mamba/boa
# for as a compatibility
# xref https://github.com/conda-forge/miniforge/pull/361
TEST_IMAGE_NAMES: "centos:7"
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
with:
miniforge-version: "latest"
use-mamba: true
if: ${{ ! contains(matrix.OS_NAME, 'Linux') }}
- name: Patch license for Mambaforge deprecation
if: matrix.MINIFORGE_NAME == 'Mambaforge' || matrix.MINIFORGE_NAME == 'Mambaforge-pypy3'
run: |
echo "!!!!!! Mambaforge is now deprecated !!!!!" > Miniforge3/MAMBAFORGE_LICENSE.txt
echo "Future Miniforge releases will NOT build Mambaforge installers." >> Miniforge3/MAMBAFORGE_LICENSE.txt
echo "We advise you switch to Miniforge at your earliest convenience." >> Miniforge3/MAMBAFORGE_LICENSE.txt
echo "More details at https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/." >> Miniforge3/MAMBAFORGE_LICENSE.txt
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> Miniforge3/MAMBAFORGE_LICENSE.txt
cat LICENSE >> Miniforge3/MAMBAFORGE_LICENSE.txt
echo "MINIFORGE_LICENSE_OVERRIDE=MAMBAFORGE_LICENSE.txt" >> $GITHUB_ENV
- name: Build and test miniforge
env:
ARCH: ${{ matrix.ARCH }}
MINIFORGE_NAME: ${{ matrix.MINIFORGE_NAME }}
OS_NAME: ${{ matrix.OS_NAME }}
DOCKERIMAGE: ${{ matrix.DOCKERIMAGE }}
DOCKER_ARCH: ${{ matrix.DOCKER_ARCH }}
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
TEST_IMAGE_NAMES: ${{ matrix.TEST_IMAGE_NAMES }}
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
export MINIFORGE_VERSION=${GITHUB_REF##*/};
fi
if [[ "$OS_NAME" == "Linux" ]]; then
export EXT=sh
bash build_miniforge.sh;
fi
if [[ "$OS_NAME" == "MacOSX" ]]; then
export EXT=sh
bash build_miniforge_osx.sh;
fi
if [[ "$OS_NAME" == "Windows" ]]; then
export EXT=exe
echo "WINDIR:$WINDIR"
source "${CONDA}"/Scripts/activate;
source build_miniforge_win.sh;
fi
# Copy for latest release
cp build/$MINIFORGE_NAME-*-$OS_NAME-$ARCH.$EXT build/$MINIFORGE_NAME-$OS_NAME-$ARCH.$EXT
if [[ "$OS_NAME" == "MacOSX" ]]; then
cp build/$MINIFORGE_NAME-*-$OS_NAME-$ARCH.$EXT build/$MINIFORGE_NAME-Darwin-$ARCH.$EXT
fi
ls -alh build
shell: bash
- name: Upload miniforge to Github artifact
if: always()
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
path: build/${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}*
name: ${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}
- name: Upload miniforge to release
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/M*forge*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
if: startsWith(github.ref, 'refs/tags/')