Skip to content

Commit dd2825b

Browse files
Release 0.2.0 (#18)
* Make pyomp a standalone module with numba and llvmlite as dependencies * Refactor and update python packaging - Move nrt static and the llvm plugin pass under libs subdirectory - Rename libbundle to libnrt_static - Fix setup.py to move build libraries in wheel-used build directory * Update github workflowsfor conda deployment - Remove unused commit input - Add paths on pull_request event * Update gitlab ci - Remove need for trigger ([run gitlab ci] to run - Use per job conda pkgs dir to avoid conflicts with multiple runners - Clone with full history for versioning in gitlab ci * Fix map_clause parsing for lark * Use the compiler driver to create shared lib of host offload targets - Avoids missing symbols errors that libomptarget host RTL expects * Update examples and code * Update README and RTD conf.py
1 parent 50ba150 commit dd2825b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+17794
-786
lines changed

.github/workflows/build-upload-conda-base.yml

Lines changed: 11 additions & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,10 @@ on:
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-
3913
jobs:
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-
"

.github/workflows/build-upload-conda-test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ name: Deploy conda pkgs (test)
22

33
on:
44
pull_request:
5+
paths:
6+
- "buildscripts/conda-recipes/**"
7+
- ".github/workflows/build-upload-conda-test.yml"
8+
- ".github/workflows/build-upload-conda-base.yml"
9+
- "numba/**"
510
workflow_dispatch:
611

712
jobs:
813
deploy-conda:
914
uses: ./.github/workflows/build-upload-conda-base.yml
1015
with:
1116
label: test
12-
commit: ${{ github.event.pull_request.head.sha }}
1317
env: .github/workflows/envs/env-test.yml
14-
secrets: inherit
18+
secrets: inherit

.github/workflows/build-upload-conda.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ jobs:
1010
uses: ./.github/workflows/build-upload-conda-base.yml
1111
with:
1212
label: main
13-
commit: ${{ github.sha }}
1413
env: .github/workflows/envs/env.yml
1514
secrets: inherit
1615
deploy-containers:
1716
needs: deploy-conda
1817
uses: ./.github/workflows/build-containers.yml
19-
secrets: inherit
18+
secrets: inherit

.gitlab-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ stages:
8585
strategy: depend
8686
forward:
8787
pipeline_variables: true
88-
rules:
89-
- if: ($CI_COMMIT_MESSAGE =~ /\[run gitlab ci\]/ || $CI_COMMIT_TAG)
9088

9189
include:
9290
# Sets ID tokens for every job using `default:`

.gitlab/jobs/lassen.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,8 @@ build-llvm-openmp-dev-lassen:
6666
variables:
6767
PYOMP_CI_BUILD_PKG: "llvm-openmp-dev"
6868

69-
build-llvmlite-lassen:
69+
build-pyomp-lassen:
7070
extends: [.base-job, .python-variants]
7171
needs: ["build-llvm-openmp-dev-lassen"]
72-
variables:
73-
PYOMP_CI_BUILD_PKG: "llvmlite"
74-
75-
build-numba-lassen:
76-
extends: [.base-job, .python-variants]
77-
needs: ["build-llvmlite-lassen"]
78-
variables:
79-
PYOMP_CI_BUILD_PKG: "numba"
80-
81-
build-pyomp-lassen:
82-
extends: .base-job
83-
needs: ["build-numba-lassen"]
8472
variables:
8573
PYOMP_CI_BUILD_PKG: "pyomp"
86-

.gitlab/subscribed-pipelines.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
--data "{ \"state\": \"failure\", \"target_url\": \"${CI_PIPELINE_URL}\", \"description\": \"GitLab ${CI_MACHINE} down\", \"context\": \"ci/gitlab/${CI_MACHINE}\" }"
2424
exit 1
2525
fi
26-
rules:
27-
- if: ($CI_COMMIT_MESSAGE =~ /\[run gitlab ci\]/ || $CI_COMMIT_TAG)
2826
2927
###
3028
# Trigger a build-and-test pipeline for a machine.

0 commit comments

Comments
 (0)