Move CI to GH-Actions #8
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: Build CI wheels | |
on: | |
push: | |
branches: | |
- master | |
- rls-* | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- master | |
- rls-* | |
permissions: | |
contents: read | |
jobs: | |
build_sdist: | |
name: Build sdist | |
runs-on: ubuntu-latest | |
outputs: | |
SDIST_NAME: ${{ steps.sdist.outputs.SDIST_NAME }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: python -m pip install wheel build setuptools | |
- name: Build sdist | |
run: | | |
python -m build -s | |
- name: Upload sdist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sdist | |
path: dist/jupedsim-*.tar.gz | |
if-no-files-found: error | |
build_wheels: | |
needs: build_sdist | |
name: Build wheels on ${{ matrix.os }} for ${{ matrix.cibw_archs }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >- | |
delvewheel repair -w {dest_dir} {wheel} | |
CIBW_CONFIG_SETTINGS: setup-args="--vsenv" | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | |
MACOSX_DEPLOYMENT_TARGET: "10.12" | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
cibw_archs: "x86_64" | |
cibw_build: "cp310-*, cp311-*" | |
- os: windows-latest | |
cibw_archs: "auto64" | |
cibw_build: "cp310-*, cp311-*" | |
- os: macos-11 | |
cibw_archs: "x86_64 arm64" | |
cibw_build: "cp310-*, cp311-*" | |
steps: | |
- name: Download sdist | |
uses: actions/download-artifact@v3 | |
with: | |
name: sdist | |
path: dist/ | |
- name: Build wheels for CPython ${{ matrix.cibw_build }} | |
uses: pypa/[email protected] | |
with: | |
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }} | |
env: | |
CIBW_BUILD: ${{ matrix.cibw_build }} | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: ./wheelhouse/*.whl | |
if-no-files-found: error |