This repository was archived by the owner on Apr 23, 2025. It is now read-only.
Fix code caching for OpenMP regions (CPU and GPU) #139
Workflow file for this run
This file contains hidden or 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 Numba PyOMP | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest] | |
| name: Build and test Numba 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-numba-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-numba-pyomp | |
| git clone https://github.com/Python-for-HPC/llvmliteWithOpenmp.git | |
| cd llvmliteWithOpenmp | |
| # Change checkout ref to "develop" or desired commit. | |
| git checkout develop | |
| 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-numba-pyomp | |
| pushd ${GITHUB_WORKSPACE} | |
| MACOSX_DEPLOYMENT_TARGET=10.10 python setup.py build_static build_ext build install --single-version-externally-managed --record=record.txt | |
| popd | |
| - 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-numba-pyomp | |
| numba -h | |
| numba -s | |
| 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-numba-pyomp | |
| numba -h | |
| numba -s | |
| python -m numba.runtests -v -- numba.tests.test_openmp.TestOpenmpTarget | |
| popd |