ci: rework tests to break out ios/android tests (#2519)
* ci: rework tests to break out ios/android tests Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestions from code review * ci: fix check for wheels Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Update .github/workflows/test.yml * tests: pass via flag instead of envvar Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * tests: apply to serial/parallel Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * tests: join together marks Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * tests: join together marks Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * ci: break up azure job Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * ci: use matrix for azure pipelines Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Try installing Java on macos as well * Revert "Try installing Java on macos as well" This reverts commit aedf0f5106d2467938705b85180a0b249d49b99d. * Try to get the most basic android test running first * Rename platform to test_select, move headers in run_tests Maybe it's a personal thing, but the header location was really making me have to think more than I needed to look at that file! * Only run docker unit tests on machines that are testing linux * Update the flag name in azure-pipelines too * Update azure-pipelines.yml --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com> Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
co-authored by
Copilot
Matthieu Darbois
Joe Rickerby
parent
63bdd4f043
commit
cade3864de
@@ -47,19 +47,44 @@ jobs:
|
||||
run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github
|
||||
|
||||
test:
|
||||
name: Test on ${{ matrix.os }} (${{ matrix.python_version }})
|
||||
name: Test on ${{ matrix.os }} (${{ matrix.python_version }}) ${{ matrix.test_select }}
|
||||
needs: lint
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-15]
|
||||
python_version: ['3.13']
|
||||
include:
|
||||
# Min Python
|
||||
- os: ubuntu-latest
|
||||
python_version: '3.11'
|
||||
# Max Python
|
||||
- os: ubuntu-latest
|
||||
python_version: '3.14'
|
||||
- os: ubuntu-latest
|
||||
python_version: '3.13'
|
||||
test_select: android
|
||||
- os: ubuntu-24.04-arm
|
||||
python_version: '3.13'
|
||||
- os: windows-latest
|
||||
python_version: '3.13'
|
||||
- os: windows-11-arm
|
||||
python_version: '3.13'
|
||||
- os: macos-13
|
||||
python_version: '3.13'
|
||||
- os: macos-15
|
||||
python_version: '3.13'
|
||||
- os: macos-13
|
||||
python_version: '3.13'
|
||||
test_select: ios
|
||||
- os: macos-15
|
||||
python_version: '3.13'
|
||||
test_select: ios
|
||||
- os: macos-13
|
||||
python_version: '3.13'
|
||||
test_select: android
|
||||
- os: macos-15
|
||||
python_version: '3.13'
|
||||
test_select: android
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
@@ -129,10 +154,12 @@ jobs:
|
||||
output-dir: wheelhouse
|
||||
env:
|
||||
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
|
||||
CIBW_BUILD_FRONTEND: 'build[uv]'
|
||||
CIBW_BUILD_FRONTEND: ${{ matrix.test_select && 'build' || 'build[uv]' }}
|
||||
CIBW_PLATFORM: ${{ matrix.test_select }}
|
||||
|
||||
- name: Run a sample build (GitHub Action, only)
|
||||
uses: ./
|
||||
if: matrix.test_select == ''
|
||||
with:
|
||||
package-dir: sample_proj
|
||||
output-dir: wheelhouse_only
|
||||
@@ -152,6 +179,8 @@ jobs:
|
||||
|
||||
- name: Run a sample build (GitHub Action, config-file)
|
||||
uses: ./
|
||||
env:
|
||||
CIBW_PLATFORM: ${{ matrix.test_select }}
|
||||
with:
|
||||
package-dir: sample_proj
|
||||
output-dir: wheelhouse_config_file
|
||||
@@ -161,9 +190,14 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
test $(find wheelhouse -name '*.whl' | wc -l) -ge 1
|
||||
test $(find wheelhouse_only -name '*.whl' | wc -l) -eq 1
|
||||
test $(find wheelhouse_config_file -name '*.whl' | wc -l) -eq 1
|
||||
|
||||
- name: Check Action artifacts (native build only)
|
||||
if: matrix.test_select == ''
|
||||
shell: bash
|
||||
run: |
|
||||
test $(find wheelhouse_only -name '*.whl' | wc -l) -eq 1
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||
@@ -171,7 +205,7 @@ jobs:
|
||||
|
||||
- name: Test cibuildwheel
|
||||
run: |
|
||||
uv run --no-sync bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
|
||||
uv run --no-sync bin/run_tests.py --test-select=${{ matrix.test_select || 'native' }} ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
|
||||
|
||||
emulated-archs:
|
||||
name: Get qemu emulated architectures
|
||||
|
||||
Reference in New Issue
Block a user