Partially revert dynamic version support #200
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build distribution files | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| sdist: | |
| name: Source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Install build-time dependencies | |
| run: pip install --group dist | |
| - name: Build sdist | |
| run: python -m build --sdist | |
| - name: Test sdist | |
| run: | | |
| SDIST=$(ls dist/*.tar.gz) | |
| pip install $SDIST[test] | |
| pytest | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: package-sdist | |
| path: dist/*.tar.gz | |
| wheels: | |
| name: Binary wheels | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - windows-11-arm # Windows arm64 wheels | |
| - windows-latest # Windows x86-64 wheels | |
| - ubuntu-24.04 # Linux x86-64 wheels | |
| - ubuntu-24.04-arm # Linux arm64 wheels | |
| - macos-15-intel # macOS x86-64 wheels | |
| - macos-15 # macOS arm64 wheels | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Install build-time dependencies | |
| run: pip install --group dist | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| if: runner.os == 'Windows' | |
| with: | |
| arch: ${{ runner.arch }} | |
| - name: Enable Xcode SDK | |
| if: runner.os == 'macOS' | |
| # See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable | |
| # See https://stackoverflow.com/a/65277351 about SDKROOT variable | |
| run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "$GITHUB_ENV" | |
| - name: Build wheels | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| env: | |
| CIBW_BUILD_VERBOSITY: 1 | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: package-wheels-${{matrix.os}} | |
| path: ./wheelhouse/*.whl |