Skip to content

preliminary; added first pragma omp #104

preliminary; added first pragma omp

preliminary; added first pragma omp #104

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- master
tags:
- '*'
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU for aarch64 compilation on Linux
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Install conda on Windows
if: runner.os == 'Windows'
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
channels: conda-forge, anaconda, defaults
auto-activate-base: true
activate-environment: ""
- name: Install OpenBlas on Windows
if: runner.os == 'Windows'
run: conda install -y openblas
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_mac_openmp_wheels:
name: Build wheels on ${{ matrix.os }} with openMP
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14] # doesn't seem to work on the other mac
steps:
- uses: actions/checkout@v4
# see https://discourse.cmake.org/t/how-to-find-openmp-with-clang-on-macos/8860
# and https://gist.github.com/scivision/16c2ca1dc250f54d34f1a1a35596f4a0
- name: Install openMP (runtime) on MacOS
if: runner.os == 'macOS'
run: |
brew install libomp
- name: Build wheels
env:
# need to tell delocate-wheel not to try to package back-ward compatible
CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=14.0
# for some reason env variable doesn't seem to be recognized
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "echo $MACOSX_DEPLOYMENT_TARGET && delocate-wheel --require-target-macos-version 14.0 --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
# this is $(brew --prefix)/opt/libomp
OpenMP_ROOT: /opt/homebrew/opt/libomp
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}-openmp
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist, build_mac_openmp_wheels]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
# we use skip-existing below, easier
# if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
# To test:
# with:
# repository-url: https://test.pypi.org/legacy/