Skip to content

Commit 0fb2376

Browse files
committed
Fix cross-platform wheel smoke tests
1 parent 0e14f19 commit 0fb2376

2 files changed

Lines changed: 38 additions & 10 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
name: Build ${{ matrix.platform }} ${{ matrix.target }}
1313
runs-on: ${{ matrix.platform }}
1414
strategy:
15+
fail-fast: false
1516
matrix:
1617
include:
1718
- platform: macos-15
@@ -44,12 +45,25 @@ jobs:
4445
manylinux: ${{ matrix.manylinux }}
4546
command: build
4647
args: --release --locked --compatibility pypi --out dist
47-
- shell: bash
48+
- name: Create wheel smoke-test environment
49+
run: python -m venv wheel-venv
50+
- name: Test wheel on POSIX
51+
if: runner.os != 'Windows'
52+
working-directory: wheel-venv
53+
shell: bash
4854
run: |
49-
python -m venv wheel-venv
50-
wheel-venv/bin/python -m pip install dist/*.whl || wheel-venv/Scripts/python -m pip install dist/*.whl
51-
wheel-venv/bin/python -c "import sid; import sid._snippet" || wheel-venv/Scripts/python -c "import sid; import sid._snippet"
52-
wheel-venv/bin/python -m pip check || wheel-venv/Scripts/python -m pip check
55+
bin/python -m pip install ../dist/*.whl
56+
bin/python -c "import sid; import sid._snippet"
57+
bin/python -m pip check
58+
- name: Test wheel on Windows
59+
if: runner.os == 'Windows'
60+
working-directory: wheel-venv
61+
shell: pwsh
62+
run: |
63+
$wheel = (Get-ChildItem ../dist/*.whl).FullName
64+
.\Scripts\python.exe -m pip install $wheel
65+
.\Scripts\python.exe -c "import sid; import sid._snippet"
66+
.\Scripts\python.exe -m pip check
5367
- uses: actions/upload-artifact@v4
5468
with:
5569
name: wheel-${{ matrix.platform }}-${{ matrix.target }}

‎.github/workflows/wheels.yml‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
name: ${{ matrix.platform }} ${{ matrix.target }}
2121
runs-on: ${{ matrix.platform }}
2222
strategy:
23+
fail-fast: false
2324
matrix:
2425
include:
2526
- platform: macos-15
@@ -52,12 +53,25 @@ jobs:
5253
manylinux: ${{ matrix.manylinux }}
5354
command: build
5455
args: --release --locked --compatibility pypi --out dist
55-
- shell: bash
56+
- name: Create wheel smoke-test environment
57+
run: python -m venv wheel-venv
58+
- name: Test wheel on POSIX
59+
if: runner.os != 'Windows'
60+
working-directory: wheel-venv
61+
shell: bash
5662
run: |
57-
python -m venv wheel-venv
58-
wheel-venv/bin/python -m pip install dist/*.whl || wheel-venv/Scripts/python -m pip install dist/*.whl
59-
wheel-venv/bin/python -c "import sid; import sid._snippet" || wheel-venv/Scripts/python -c "import sid; import sid._snippet"
60-
wheel-venv/bin/python -m pip check || wheel-venv/Scripts/python -m pip check
63+
bin/python -m pip install ../dist/*.whl
64+
bin/python -c "import sid; import sid._snippet"
65+
bin/python -m pip check
66+
- name: Test wheel on Windows
67+
if: runner.os == 'Windows'
68+
working-directory: wheel-venv
69+
shell: pwsh
70+
run: |
71+
$wheel = (Get-ChildItem ../dist/*.whl).FullName
72+
.\Scripts\python.exe -m pip install $wheel
73+
.\Scripts\python.exe -c "import sid; import sid._snippet"
74+
.\Scripts\python.exe -m pip check
6175
- uses: actions/upload-artifact@v4
6276
with:
6377
name: wheel-${{ matrix.platform }}-${{ matrix.target }}

0 commit comments

Comments
 (0)