chore(action): update cibuildwheel arguments passing (#1757)

chore(action): update cibw arguments passing

Only pass arguments that were set to cibuildwheel.
This commit is contained in:
Matthieu Darbois
2024-02-16 23:49:21 -05:00
committed by GitHub
parent 32343a3cf1
commit 53e2c74ab0
2 changed files with 39 additions and 12 deletions
+33
View File
@@ -85,6 +85,39 @@ jobs:
env:
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
- name: Run a sample build (GitHub Action, only)
uses: ./
with:
package-dir: sample_proj
output-dir: wheelhouse_only
only: cp312-${{ runner.os == 'Linux' && 'manylinux_x86_64' || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }}
- name: Create custom configuration file
shell: bash
run: |
cat > sample_proj/cibw.toml <<EOF
[tool.cibuildwheel]
# Only build on CPython 3.12 on native arch
archs = ["native"]
build = "cp312-*"
# Skip musllinux
skip = "*-musllinux*"
EOF
- name: Run a sample build (GitHub Action, config-file)
uses: ./
with:
package-dir: sample_proj
output-dir: wheelhouse_config_file
config-file: sample_proj/cibw.toml
- name: Check Action artefacts
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
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}