|
| 1 | +name: Test llvmlite PyOMP |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + workflow_dispatch: |
| 6 | + |
| 7 | +jobs: |
| 8 | + build-and-test: |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + os: [ubuntu-latest, macOS-latest] |
| 12 | + name: llvmlite pyomp ${{ matrix.os }} |
| 13 | + runs-on: ${{ matrix.os }} |
| 14 | + defaults: |
| 15 | + run: |
| 16 | + shell: bash -el {0} |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + - name: Setup miniconda |
| 20 | + uses: conda-incubator/setup-miniconda@v3 |
| 21 | + with: |
| 22 | + auto-update-conda: false |
| 23 | + auto-activate-base: false |
| 24 | + show-channel-urls: true |
| 25 | + - name: Create conda environment |
| 26 | + run: | |
| 27 | + conda create -c python-for-hpc -c conda-forge --override-channels -n test-llvmlite-pyomp \ |
| 28 | + compilers llvmdev=14.0.6 numpy=1.24 lark-parser cffi python=3.10 \ |
| 29 | + llvm-openmp-dev=14.0.6 |
| 30 | + - name: Build llvmlite PyOMP |
| 31 | + run: | |
| 32 | + conda init |
| 33 | + conda activate test-llvmlite-pyomp |
| 34 | + export PYTHONNOUSERSITE=1 |
| 35 | + export LLVMLITE_CXX_STATIC_LINK=1 |
| 36 | + export LLVMLITE_SHARED=1 |
| 37 | + python setup.py build install |
| 38 | + - name: Build Numba PyOMP |
| 39 | + run: | |
| 40 | + conda init |
| 41 | + conda activate test-llvmlite-pyomp |
| 42 | + git clone https://github.com/Python-for-HPC/numbaWithOpenmp.git |
| 43 | + cd numbaWithOpenmp |
| 44 | + git checkout develop |
| 45 | + python setup.py build_static build_ext build install --single-version-externally-managed --record=record.txt |
| 46 | + - name: Test Numba PyOMP Host |
| 47 | + env: |
| 48 | + TEST_DEVICES: 1 |
| 49 | + RUN_TARGET: 0 |
| 50 | + run: | |
| 51 | + # Must be in a different directory to run tests. |
| 52 | + pushd ${RUNNER_WORKSPACE} |
| 53 | + conda init |
| 54 | + conda activate test-llvmlite-pyomp |
| 55 | + python -m numba.runtests -v -- numba.tests.test_openmp |
| 56 | + popd |
| 57 | + - name: Test Numba PyOMP Device target host device(1) |
| 58 | + env: |
| 59 | + TEST_DEVICES: 1 |
| 60 | + RUN_TARGET: 1 |
| 61 | + run: | |
| 62 | + # Must be in a different directory to run tests. |
| 63 | + pushd ${RUNNER_WORKSPACE} |
| 64 | + conda init |
| 65 | + conda activate test-llvmlite-pyomp |
| 66 | + python -m numba.runtests -v -- numba.tests.test_openmp.TestOpenmpTarget |
| 67 | + popd |
0 commit comments