Reorganize GitHub Actions test matrix #434
Workflow file for this run
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: psf/black@stable | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: pip install --upgrade build twine | |
- name: Build package | |
run: python -m build | |
- name: Check package | |
run: twine check --strict dist/* | |
- name: Publish to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
test: | |
strategy: | |
matrix: | |
include: | |
# All supported Ubuntu LTS with system python | |
# Be careful when removing EOL versions so that we still test our oldest supported python at least somewhere | |
- { os: ubuntu-20.04, python: "3.8" } | |
- { os: ubuntu-22.04, python: "3.10" } | |
- { os: ubuntu-24.04, python: "3.12" } | |
# All supported Visual Studio on Windows Server 2019 | |
- { os: windows-2019, python: "3.12", visual-studio: 2017 } | |
- { os: windows-2019, python: "3.12", visual-studio: 2019 } | |
- { os: windows-2019, python: "3.12", visual-studio: 2022 } | |
# All supported Visual Studio on Windows Server 2022 | |
- { os: windows-2022, python: "3.12", visual-studio: 2017 } | |
- { os: windows-2022, python: "3.12", visual-studio: 2019 } | |
- { os: windows-2022, python: "3.12", visual-studio: 2022 } | |
# All supported Visual Studio on Windows Server 2025 | |
# TODO: Waiting for https://github.com/actions/runner-images/issues/10806 | |
# - { os: windows-2022, python: "3.12", visual-studio: 2017 } | |
# - { os: windows-2022, python: "3.12", visual-studio: 2019 } | |
# - { os: windows-2022, python: "3.12", visual-studio: 2022 } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install | |
run: pip install . --user | |
- name: Build prerequisites | |
run: ue4-docker build --target=build-prerequisites --visual-studio ${{ matrix.visual-studio || '2017' }} | |
- name: Run diagnostics | |
run: ue4-docker diagnostics all |