Skip to content

CI/CD πŸ“

CI/CD πŸ“ #849

name: CI/CD πŸ“
on:
schedule:
- cron: "55 4 * * *"
push:
branches: [ main ]
paths:
- 'src/**'
- 'test/**'
- setup.py
- setup.cfg
- pyproject.toml
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build_wheels:
name: Wheel cp${{ matrix.python }}-${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: [38, 39, 310, 311]
arch: [x86, arm]
include:
- os: ubuntu-latest
arch: x86
platform_id: manylinux_x86_64
cibw_arch: auto
# - os: ubuntu-latest
# arch: arm
# platform_id: manylinux_aarch64
# cibw_arch: aarch64
- os: macos-latest
arch: x86
platform_id: macosx_x86_64
cibw_arch: x86_64
- os: macos-latest
arch: arm
platform_id: macosx_arm64
cibw_arch: arm64
exclude:
- os: ubuntu-latest
arch: arm
steps:
- uses: actions/checkout@v3
- name: Get history and tags for SCM versioning
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up QEMU for ARM on Linux
if: matrix.arch == 'arm' && matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }}
CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }}
CIBW_TEST_SKIP: "*_aarch64, *macosx*, *_arm64, *_universal2:arm64"
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: nuspacesim-gh-pypi-artifact
path: wheelhouse/*.whl
retention-days: 1