diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21c775201..d42adcc4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 <&1 shell: bash if: runner.os != 'Windows' # Windows needs powershell to interact nicely with Meson - # $PSNativeCommandArgumentPassing was introduced in pwsh 7.3 and the - # legacy behaviour is needed for backwards compatibility with how this - # was called in the past. - run: > - if ($PSNativeCommandArgumentPassing) { - $PSNativeCommandArgumentPassing = 'Legacy' - }; & "${{ steps.python.outputs.python-path }}" -m pipx run --spec "${{ github.action_path }}" cibuildwheel "${{ inputs.package-dir }}" - --output-dir '"${{ inputs.output-dir }}"' - --config-file '"${{ inputs.config-file }}"' - --only '"${{ inputs.only }}"' + ${{ inputs.output-dir != '' && format('--output-dir "{0}"', inputs.output-dir) || ''}} + ${{ inputs.config-file != '' && format('--config-file "{0}"', inputs.config-file) || ''}} + ${{ inputs.only != '' && format('--only "{0}"', inputs.only) || ''}} shell: pwsh if: runner.os == 'Windows'