From a7a4b3143cf3427718046cccdbd2e6ed6491614c Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 11 Oct 2023 11:44:35 -0400 Subject: [PATCH] CI: Reduce build matrix, add test matrix [build wheels] --- .github/workflows/wheels.yml | 37 +++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 1838751d..93a622b9 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -58,13 +58,11 @@ jobs: fail-fast: false matrix: buildplat: + - [ubuntu-20.04, manylinux_x86_64] - [ubuntu-20.04, musllinux_x86_64] - [macos-12, macosx_*] - [windows-2019, win_amd64] - python: ["cp38", "cp39", "cp310", "cp311", "cp312"] - include: - # Manylinux builds are cheap, do all in one - - { buildplat: ["ubuntu-20.04", "manylinux_x86_64"], python: "*" } + python: ["cp312"] steps: - uses: actions/checkout@v3 @@ -108,9 +106,38 @@ jobs: - name: Run tests run: pytest -v --pyargs nitime + test-wheel: + name: Test wheel + needs: [build-wheel] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + steps: + - uses: actions/download-artifact@v3 + with: + path: dist/ + - name: Consolidate and list wheels + run: | + mkdir wheelhouse + mv dist/*/*.whl wheelhouse + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install wheel + run: pip install --find-links ./wheelhouse --pre nitime + - run: python -c 'import nitime; print(nitime.__version__)' + - name: Install pytest + run: pip install pytest + - name: Run tests + run: pytest -v --pyargs nitime + pre-publish: runs-on: ubuntu-latest - needs: [test-sdist, build-wheel] + needs: [test-sdist, test-wheel] steps: - uses: actions/download-artifact@v3 with: