96 lines
2.5 KiB
YAML
96 lines
2.5 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_call:
|
|
|
|
# Cancel active CI runs for a PR before starting another run
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash # https://github.com/beeware/briefcase/pull/912
|
|
|
|
env:
|
|
FORCE_COLOR: "1"
|
|
|
|
jobs:
|
|
pre-commit:
|
|
name: Pre-commit checks
|
|
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
|
|
|
|
unit-tests:
|
|
name: Unit tests
|
|
needs: [ pre-commit ]
|
|
runs-on: ${{ matrix.runs-on }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
name: [ "macOS (x86_64)", "macOS (arm64)", "iOS", "Linux (x86_64)", "Linux (arm64)" ] # Android, Windows (x86_64), Windows (arm64)
|
|
include:
|
|
- name: macOS (x86_64)
|
|
platform: macos
|
|
runs-on: macos-13
|
|
archs: auto
|
|
- name: macOS (arm64)
|
|
platform: macos
|
|
runs-on: macos-latest
|
|
archs: auto,universal2
|
|
- name: iOS
|
|
platform: ios
|
|
runs-on: macos-latest
|
|
archs: auto
|
|
- name: Linux (x86_64)
|
|
platform: linux
|
|
runs-on: ubuntu-24.04
|
|
archs: auto
|
|
- name: Linux (arm64)
|
|
platform: linux
|
|
runs-on: ubuntu-24.04-arm
|
|
archs: auto
|
|
# - name: Android
|
|
# platform: android
|
|
# runs-on: macos-latest
|
|
# archs: auto
|
|
# - name: Windows (x86_64)
|
|
# platform: windows
|
|
# runs-on: windows-latest
|
|
# archs: auto
|
|
# - name: Windows (arm64)
|
|
# platform: windows
|
|
# runs-on: windows-latest-arm??
|
|
# archs: auto
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5.4.0
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Install cibuildwheel
|
|
run: |
|
|
python -m pip install -U pip
|
|
# Use a branch while iOS support is in development and test-sources is unpublished.
|
|
# python -m pip install cibuildwheel==3.0.0
|
|
python -m pip install git+https://github.com/freakboy3742/cibuildwheel.git@ios-support
|
|
|
|
- name: Build wheels
|
|
run: python -m cibuildwheel
|
|
env:
|
|
CIBW_PLATFORM: ${{ matrix.platform }}
|
|
CIBW_ARCHS: ${{ matrix.archs }}
|
|
CIBW_BUILD: "cp*"
|
|
|
|
- uses: actions/upload-artifact@v4.6.0
|
|
with:
|
|
name: wheels-${{ matrix.name }}
|
|
path: ./wheelhouse/*.whl
|