66 label :
77 required : true
88 type : string
9- commit :
10- required : true
11- type : string
129 env :
1310 required : true
1411 type : string
1512
16- # Rembember: you have to escape characters like $ with \$.
17- env :
18- SETUP_BASE : |
19- apt-get -qq update > /dev/null;
20- apt-get -qq upgrade > /dev/null;
21- apt-get -qq install wget git > /dev/null;
22- useradd -ms /bin/bash pyompuser;
23- su pyompuser;
24- cd /home/pyompuser;
25- SETUP_MINICONDA : |
26- wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-\$(uname -m).sh -O miniconda.sh;
27- bash miniconda.sh -b -u -p ./miniconda3;
28- rm -rf miniconda.sh;
29- export PATH=/home/pyompuser/miniconda3/bin:\${PATH};
30- conda remove --name base conda-anaconda-telemetry
31- conda install -q -y -c conda-forge conda-build conda-verify anaconda-client;
32- conda config --set anaconda_upload yes;
33- SETUP_REPO : |
34- git clone https://github.com/Python-for-HPC/PyOMP;
35- cd PyOMP;
36- git checkout ${{ inputs.commit }};
37- export GITHUB_HEAD_SHA=${{ inputs.commit }};
38-
3913jobs :
4014 # Job to deploy llvm-openmp-dev, runs once as it is independent of the python
4115 # version.
@@ -44,13 +18,10 @@ jobs:
4418 runs-on : ${{ matrix.os }}
4519 strategy :
4620 matrix :
47- # os: [ubuntu-latest, macOS-latest, windows-latest]
48- os : [ubuntu-latest, macOS-latest]
21+ # TODO: Add windows.
22+ os : [ubuntu-latest, macOS-latest, ubuntu-24.04-arm ]
4923 steps :
5024 - uses : actions/checkout@v4
51- - name : Set env for HEAD SHA
52- run :
53- echo "GITHUB_HEAD_SHA=${{ inputs.commit }}" >> $GITHUB_ENV
5425 - name : Create and activate conda env
5526 uses : conda-incubator/setup-miniconda@v3
5627 with :
@@ -69,87 +40,22 @@ jobs:
6940 --token ${{ secrets.ANACONDA_TOKEN }} \
7041 buildscripts/conda-recipes/llvm-openmp-dev;
7142
72- # Job to deploy llvmlite and numba, matrixed on os and python version.
73- conda-deploy-llvmlite :
43+ # Job to deploy the pyomp metapackage matrixed on the python version.
44+ conda-deploy-pyomp :
7445 needs : conda-deploy-llvm-openmp-dev
75- name : llvmlite ${{ matrix.os }} ${{ matrix.python-version }}
46+ name : pyomp ${{ matrix.os }} ${{ matrix.python-version }}
7647 runs-on : ${{ matrix.os }}
7748 strategy :
7849 matrix :
79- # os: [ubuntu-latest, macOS-latest, windows-latest]
80- os : [ubuntu-latest, macOS-latest]
50+ # TODO: Add windows.
51+ os : [ubuntu-latest, macOS-latest, ubuntu-24.04-arm ]
8152 python-version : ["3.8", "3.9", "3.10"]
8253 steps :
8354 - uses : actions/checkout@v4
84- - name : Set env for HEAD SHA
85- run :
86- echo "GITHUB_HEAD_SHA=${{ inputs.commit }}" >> $GITHUB_ENV
87- - name : Create and activate conda env
88- uses : conda-incubator/setup-miniconda@v3
55+ # Checkout the repo with history to get the commit hash for the build
56+ # string.
8957 with :
90- python-version : ${{ matrix.python-version }}
91- environment-file : ${{ inputs.env }}
92- auto-update-conda : false
93- auto-activate-base : false
94- show-channel-urls : true
95- - name : Build and upload llvmlite
96- run : |
97- conda remove --name base conda-anaconda-telemetry
98- conda install -q -y -c conda-forge conda-build conda-verify anaconda-client;
99- conda config --set anaconda_upload yes;
100- conda build --user python-for-hpc --label ${{ inputs.label }} \
101- -c python-for-hpc -c conda-forge \
102- --python ${{ matrix.python-version }} --token ${{ secrets.ANACONDA_TOKEN }} \
103- buildscripts/conda-recipes/llvmlite;
104-
105- # Job to deploy numba, matrixed on os and python version.
106- conda-deploy-numba :
107- needs : conda-deploy-llvmlite
108- name : numba ${{ matrix.os }} ${{ matrix.python-version }}
109- runs-on : ${{ matrix.os }}
110- strategy :
111- matrix :
112- # os: [ubuntu-latest, macOS-latest, windows-latest]
113- os : [ubuntu-latest, macOS-latest]
114- python-version : ["3.8", "3.9", "3.10"]
115- steps :
116- - uses : actions/checkout@v4
117- - name : Set env for HEAD SHA
118- run :
119- echo "GITHUB_HEAD_SHA=${{ inputs.commit }}" >> $GITHUB_ENV
120- - name : Create and activate conda env
121- uses : conda-incubator/setup-miniconda@v3
122- with :
123- python-version : ${{ matrix.python-version }}
124- environment-file : ${{ inputs.env }}
125- auto-update-conda : false
126- auto-activate-base : false
127- show-channel-urls : true
128- - name : Build and upload numba
129- run : |
130- conda remove --name base conda-anaconda-telemetry
131- conda install -q -y -c conda-forge conda-build conda-verify anaconda-client;
132- conda config --set anaconda_upload yes;
133- conda build --user python-for-hpc --label ${{ inputs.label }} \
134- -c python-for-hpc -c conda-forge \
135- --python ${{ matrix.python-version }} --token ${{ secrets.ANACONDA_TOKEN }} \
136- buildscripts/conda-recipes/numba;
137-
138- # Job to deploy the pyomp metapackage, runs once as it is independent of the
139- # python version.
140- conda-deploy-pyomp :
141- needs : conda-deploy-numba
142- name : pyomp ${{ matrix.os }}
143- runs-on : ${{ matrix.os }}
144- strategy :
145- matrix :
146- # os: [ubuntu-latest, macOS-latest, windows-latest]
147- os : [ubuntu-latest, macOS-latest]
148- steps :
149- - uses : actions/checkout@v4
150- - name : Set env for HEAD SHA
151- run :
152- echo "GITHUB_HEAD_SHA=${{ inputs.commit }}" >> $GITHUB_ENV
58+ fetch-depth : 0
15359 - name : Create and activate conda env
15460 uses : conda-incubator/setup-miniconda@v3
15561 with :
@@ -165,97 +71,6 @@ jobs:
16571 conda config --set anaconda_upload yes;
16672 conda build --user python-for-hpc --label ${{ inputs.label }} \
16773 -c python-for-hpc -c conda-forge \
74+ --python ${{ matrix.python-version }} \
16875 --token ${{ secrets.ANACONDA_TOKEN }} \
16976 buildscripts/conda-recipes/pyomp;
170-
171- # ###############################################################
172- # Deploy on ARM64 using QEMU and a docker container for building.
173- # ###############################################################
174- conda-deploy-llvm-openmp-dev-linux-arm64 :
175- name : llvm-openmp-dev linux-arm64
176- runs-on : ubuntu-latest
177- steps :
178- - name : Set up QEMU
179- uses : docker/setup-qemu-action@v3
180- with :
181- platforms : linux/arm64
182- - name : Deploy llvm-openmp-dev
183- run : |
184- docker run --platform linux/arm64 ubuntu:22.04 /bin/bash -xel -c "
185- ${{ env.SETUP_BASE }}
186- ${{ env.SETUP_MINICONDA }}
187- ${{ env.SETUP_REPO }}
188- conda build --user python-for-hpc --label ${{ inputs.label }} \
189- -c python-for-hpc -c conda-forge \
190- --token ${{ secrets.ANACONDA_TOKEN }} \
191- buildscripts/conda-recipes/llvm-openmp-dev;
192- "
193-
194- conda-deploy-llvmlite-linux-arm64 :
195- needs : conda-deploy-llvm-openmp-dev-linux-arm64
196- name : llvmlite linux-arm64
197- runs-on : ubuntu-latest
198- strategy :
199- matrix :
200- python-version : ["3.8", "3.9", "3.10"]
201- steps :
202- - name : Set up QEMU
203- uses : docker/setup-qemu-action@v3
204- with :
205- platforms : linux/arm64
206- - name : Deploy llvmlite
207- run : |
208- docker run --platform linux/arm64 ubuntu:22.04 /bin/bash -el -c "
209- ${{ env.SETUP_BASE }}
210- ${{ env.SETUP_MINICONDA }}
211- ${{ env.SETUP_REPO }}
212- conda build --user python-for-hpc --label ${{ inputs.label }} \
213- -c python-for-hpc -c conda-forge \
214- --python ${{ matrix.python-version}} --token ${{ secrets.ANACONDA_TOKEN }} \
215- buildscripts/conda-recipes/llvmlite
216- "
217-
218- conda-deploy-numba-linux-arm64 :
219- needs : conda-deploy-llvmlite-linux-arm64
220- name : numba linux-arm64
221- runs-on : ubuntu-latest
222- strategy :
223- matrix :
224- python-version : ["3.8", "3.9", "3.10"]
225- steps :
226- - name : Set up QEMU
227- uses : docker/setup-qemu-action@v3
228- with :
229- platforms : linux/arm64
230- - name : Deploy numba
231- run : |
232- docker run --platform linux/arm64 ubuntu:22.04 /bin/bash -el -c "
233- ${{ env.SETUP_BASE }}
234- ${{ env.SETUP_MINICONDA }}
235- ${{ env.SETUP_REPO }}
236- conda build --user python-for-hpc --label ${{ inputs.label }} \
237- -c python-for-hpc -c conda-forge \
238- --python ${{ matrix.python-version}} --token ${{ secrets.ANACONDA_TOKEN }} \
239- buildscripts/conda-recipes/numba;
240- "
241-
242- conda-deploy-pyomp-linux-arm64 :
243- needs : conda-deploy-numba-linux-arm64
244- name : pyomp linux-arm64
245- runs-on : ubuntu-latest
246- steps :
247- - name : Set up QEMU
248- uses : docker/setup-qemu-action@v3
249- with :
250- platforms : linux/arm64
251- - name : Deploy pyomp
252- run : |
253- docker run --platform linux/arm64 ubuntu:22.04 /bin/bash -el -c "
254- ${{ env.SETUP_BASE }}
255- ${{ env.SETUP_MINICONDA }}
256- ${{ env.SETUP_REPO }}
257- conda build --user python-for-hpc --label ${{ inputs.label }} \
258- -c python-for-hpc -c conda-forge \
259- --token ${{ secrets.ANACONDA_TOKEN }} \
260- buildscripts/conda-recipes/pyomp;
261- "
0 commit comments