Add github ci #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test llvmlite PyOMP | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
name: llvmlite pyomp ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: false | |
auto-activate-base: false | |
show-channel-urls: true | |
- name: Create conda environment | |
run: | | |
conda create -c python-for-hpc -c conda-forge --override-channels -n test-llvmlite-pyomp \ | |
compilers llvmdev=14.0.6 numpy=1.24 lark-parser cffi python=3.10 \ | |
llvm-openmp-dev=14.0.6 | |
- name: Build llvmlite PyOMP | |
run: | | |
conda init | |
conda activate test-llvmlite-pyomp | |
export PYTHONNOUSERSITE=1 | |
export LLVMLITE_CXX_STATIC_LINK=1 | |
export LLVMLITE_SHARED=1 | |
python setup.py build install | |
- name: Build Numba PyOMP | |
run: | | |
conda init | |
conda activate test-llvmlite-pyomp | |
git clone https://github.com/Python-for-HPC/numbaWithOpenmp.git | |
cd numbaWithOpenmp | |
git checkout develop | |
python setup.py build_static build_ext build install --single-version-externally-managed --record=record.txt | |
- name: Test Numba PyOMP Host | |
env: | |
TEST_DEVICES: 1 | |
RUN_TARGET: 0 | |
run: | | |
# Must be in a different directory to run tests. | |
pushd ${RUNNER_WORKSPACE} | |
conda init | |
conda activate test-llvmlite-pyomp | |
python -m numba.runtests -v -- numba.tests.test_openmp | |
popd | |
- name: Test Numba PyOMP Device target host device(1) | |
env: | |
TEST_DEVICES: 1 | |
RUN_TARGET: 1 | |
run: | | |
# Must be in a different directory to run tests. | |
pushd ${RUNNER_WORKSPACE} | |
conda init | |
conda activate test-llvmlite-pyomp | |
python -m numba.runtests -v -- numba.tests.test_openmp.TestOpenmpTarget | |
popd |