Update to SFML 3.0.2 #17
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-sdist: | |
| name: Build sdist | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build frontend | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build twine | |
| - name: Build sdist | |
| run: python -m build --sdist | |
| - name: Validate sdist | |
| run: | | |
| python .github/scripts/validate-dist.py dist/*.tar.gz | |
| python -m twine check dist/*.tar.gz | |
| - name: Upload sdist artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| build-linux-wheels: | |
| name: Build Linux wheels | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install cibuildwheel | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install cibuildwheel==2.23.3 | |
| - name: Build wheels | |
| env: | |
| CIBW_ARCHS_LINUX: x86_64 | |
| CIBW_BEFORE_ALL_LINUX: >- | |
| bash /project/.github/scripts/build-sfml-unix.sh 3.0.2 /project/.deps/sfml-3.0.2-install 1 | |
| CIBW_ENVIRONMENT_LINUX: >- | |
| SFML_HEADERS=/project/.deps/sfml-3.0.2-install/include | |
| SFML_LIBRARIES=/project/.deps/sfml-3.0.2-install/lib | |
| PKG_CONFIG_PATH=/project/.deps/sfml-3.0.2-install/lib/pkgconfig | |
| LD_LIBRARY_PATH=/project/.deps/sfml-3.0.2-install/lib | |
| CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair -w {dest_dir} {wheel} | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| - name: Validate Linux wheels | |
| run: | | |
| python .github/scripts/validate-dist.py wheelhouse/*.whl | |
| python -m pip install twine | |
| python -m twine check wheelhouse/*.whl | |
| - name: Upload Linux wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-linux | |
| path: wheelhouse/*.whl | |
| build-macos-wheels: | |
| name: Build macOS wheels | |
| runs-on: macos-15 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install cibuildwheel | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install cibuildwheel==2.23.3 | |
| - name: Build wheels | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: "15.0" | |
| CIBW_ARCHS_MACOS: arm64 | |
| CIBW_BEFORE_ALL_MACOS: >- | |
| bash .github/scripts/build-sfml-unix.sh 3.0.2 ${{ github.workspace }}/.deps/sfml-3.0.2-install 1 | |
| CIBW_BEFORE_BUILD_MACOS: python -m pip install delocate | |
| CIBW_ENVIRONMENT_MACOS: >- | |
| MACOSX_DEPLOYMENT_TARGET=15.0 | |
| SFML_HEADERS=${{ github.workspace }}/.deps/sfml-3.0.2-install/include | |
| SFML_LIBRARIES=${{ github.workspace }}/.deps/sfml-3.0.2-install/lib | |
| DYLD_LIBRARY_PATH=${{ github.workspace }}/.deps/sfml-3.0.2-install/lib | |
| PKG_CONFIG_PATH=${{ github.workspace }}/.deps/sfml-3.0.2-install/lib/pkgconfig | |
| CIBW_REPAIR_WHEEL_COMMAND_MACOS: delocate-wheel --wheel-dir {dest_dir} {wheel} | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| - name: Validate macOS wheels | |
| run: | | |
| python .github/scripts/validate-dist.py wheelhouse/*.whl | |
| python -m pip install twine | |
| python -m twine check wheelhouse/*.whl | |
| - name: Upload macOS wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-macos | |
| path: wheelhouse/*.whl | |
| build-windows-wheels: | |
| name: Build Windows wheels | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install cibuildwheel | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install cibuildwheel==2.23.3 | |
| - name: Get CMake | |
| id: get-cmake | |
| uses: lukka/get-cmake@latest | |
| - name: Build wheels | |
| env: | |
| CMAKE_EXE: ${{ steps.get-cmake.outputs.cmake-path }} | |
| CIBW_ARCHS_WINDOWS: AMD64 | |
| CIBW_BEFORE_ALL_WINDOWS: >- | |
| C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -ExecutionPolicy Bypass -File .github/scripts/build-sfml-windows.ps1 -Version 3.0.2 -Prefix C:/cibw-sfml-3.0.2 -Architecture x64 | |
| CIBW_BEFORE_BUILD_WINDOWS: python -m pip install delvewheel | |
| CIBW_ENVIRONMENT_WINDOWS: >- | |
| SFML_HEADERS='C:/cibw-sfml-3.0.2/include' | |
| SFML_LIBRARIES='C:/cibw-sfml-3.0.2/lib' | |
| CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: python -m delvewheel repair --add-path C:/cibw-sfml-3.0.2/bin -w {dest_dir} {wheel} | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| - name: Validate Windows wheels | |
| run: | | |
| python .github/scripts/validate-dist.py wheelhouse/*.whl | |
| python -m pip install twine | |
| python -m twine check wheelhouse/*.whl | |
| - name: Upload Windows wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-windows | |
| path: wheelhouse/*.whl | |
| verify-release-artifacts: | |
| name: Verify release artifacts | |
| needs: | |
| - build-sdist | |
| - build-linux-wheels | |
| - build-macos-wheels | |
| - build-windows-wheels | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Download distribution artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Install validation tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install twine | |
| - name: Validate all release artifacts | |
| run: | | |
| python .github/scripts/validate-dist.py dist/* | |
| python -m twine check dist/* | |
| publish-testpypi: | |
| name: Publish to TestPyPI | |
| needs: | |
| - verify-release-artifacts | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') && (contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc')) }} | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download distribution artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish distributions | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist | |
| repository-url: https://test.pypi.org/legacy/ | |
| publish-pypi: | |
| name: Publish to PyPI | |
| needs: | |
| - verify-release-artifacts | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, 'a') && !contains(github.ref_name, 'b') && !contains(github.ref_name, 'rc') }} | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download distribution artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish distributions | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist |