| 1 |
name: wheels |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
build_wheels: |
| 7 |
name: Build wheels on ${{ matrix.os }} |
| 8 |
runs-on: ${{ matrix.os }} |
| 9 |
strategy: |
| 10 |
matrix: |
| 11 |
os: [ubuntu-latest, ubuntu-24.04-arm, macos-14, macos-latest, windows-latest] |
| 12 |
fail-fast: false |
| 13 |
|
| 14 |
steps: |
| 15 |
- uses: actions/checkout@v4 |
| 16 |
with: |
| 17 |
submodules: "recursive" |
| 18 |
|
| 19 |
# Used to host cibuildwheel |
| 20 |
- uses: actions/setup-python@v5 |
| 21 |
with: |
| 22 |
python-version: "3.13" |
| 23 |
|
| 24 |
- name: Install cibuildwheel |
| 25 |
run: python -m pip install cibuildwheel |
| 26 |
|
| 27 |
- name: Install Ninja (Windows) |
| 28 |
if: runner.os == 'Windows' |
| 29 |
run: choco install ninja -y |
| 30 |
|
| 31 |
- name: Install Visual Studio Build Tools (Windows) |
| 32 |
if: runner.os == 'Windows' |
| 33 |
run: choco install visualstudio2022-workload-vctools -y |
| 34 |
|
| 35 |
- name: Install library dev packages (Linux) |
| 36 |
if: runner.os == 'Linux' |
| 37 |
run: | |
| 38 |
sudo apt update |
| 39 |
sudo apt-get install libegl1 libopengl0 libxml2 libxml2-dev libxslt1-dev libxslt1.1 libxslt-dev python3-dev |
| 40 |
|
| 41 |
- name: Build wheels |
| 42 |
shell: bash |
| 43 |
env: |
| 44 |
CIBW_TEST_COMMAND: "pytest {project}/test --ignore={project}/test/asammdf/gui" |
| 45 |
CIBW_CMAKE_GENERATOR: "Ninja" # force Ninja generator |
| 46 |
CMAKE_GENERATOR: "Ninja" |
| 47 |
run: python -m cibuildwheel --output-dir wheelhouse |
| 48 |
|
| 49 |
- uses: actions/upload-artifact@v4 |
| 50 |
with: |
| 51 |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} |
| 52 |
path: ./wheelhouse/*.whl |
| 53 |
|
| 54 |
build_sdist: |
| 55 |
name: Build source distribution |
| 56 |
runs-on: ubuntu-latest |
| 57 |
steps: |
| 58 |
- uses: actions/checkout@v4 |
| 59 |
with: |
| 60 |
submodules: "recursive" |
| 61 |
|
| 62 |
- uses: actions/setup-python@v5 |
| 63 |
with: |
| 64 |
python-version: "3.10" |
| 65 |
|
| 66 |
- name: Install deps |
| 67 |
run: python -m pip install build |
| 68 |
|
| 69 |
- name: Build sdist |
| 70 |
run: python -m build --sdist |
| 71 |
|
| 72 |
- uses: actions/upload-artifact@v4 |
| 73 |
with: |
| 74 |
path: dist/*.tar.gz |