Drop support for Python 3.7 #602
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
# | |
# DO NOT MODIFY! AUTO-GENERATED FROM: | |
# .github/workflows/ci/workflow_template.yml | |
# | |
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
# Ignore continuous releases' tag. | |
- 'continuous' | |
pull_request: | |
defaults: | |
run: | |
# Powershell on Windows? No thank you... | |
shell: bash --noprofile --norc -eo pipefail .github/workflows/ci/helpers.sh . {0} | |
jobs: | |
# Job: Analyze {{{ | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Calculate skip cache keys | |
id: set_cache | |
run: | | |
job_cache_extra_deps=(); job_id=test_linux; job_name='Test (Linux)'; job_needs=(); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_linux_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_test_linux; job_skiplists=(job_test os_linux); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=Linux; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=(osx/deps.sh); job_id=test_macos; job_name='Test (macOS)'; job_needs=(); job_os=macOS; job_platform=macos-12; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_macos_py-3.9_macos-12; job_skip_cache_path=.skip_cache_test_macos; job_skiplists=(job_test os_macos); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=macOS; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=(); job_id=test_windows; job_name='Test (Windows)'; job_needs=(); job_os=Windows; job_platform=windows-2022; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_windows_py-3.9_windows-2022; job_skip_cache_path=.skip_cache_test_windows; job_skiplists=(job_test os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=Windows; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=(); job_id=test_python_38; job_name='Test (Python 3.8)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.8; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_38_py-3.8_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_38; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.8'; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=(); job_id=test_python_310; job_name='Test (Python 3.10)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.10; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_310_py-3.10_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_310; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.10'; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=(); job_id=test_qt_gui; job_name='Test (Qt GUI)'; job_needs=(); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/dist.txt reqs/dist_extra_gui_qt.txt reqs/test.txt); job_skip_cache_name=skip_test_qt_gui_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_test_qt_gui; job_skiplists=(job_test_gui_qt); job_test_args=test/gui_qt; job_type=test_gui_qt; job_variant='Qt GUI'; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=(); job_id=test_packaging; job_name='Test (Packaging)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.9; job_reqs=(reqs/packaging.txt reqs/setup.txt); job_skip_cache_name=skip_test_packaging_py-3.9_ubuntu-latest; job_skip_cache_path=.skip_cache_test_packaging; job_skiplists=(job_test_packaging); job_type=test_packaging; job_variant=Packaging; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=('reqs/dist_*.txt' linux/appimage/deps.sh); job_id=build_linux; job_name='Build (Linux)'; job_needs=(test_linux); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/build.txt reqs/setup.txt); job_skip_cache_name=skip_build_linux_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_build_linux; job_skiplists=(job_build os_linux); job_type=build; job_variant=Linux; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=('reqs/dist_*.txt' osx/deps.sh); job_id=build_macos; job_name='Build (macOS)'; job_needs=(test_macos); job_os=macOS; job_platform=macos-12; job_python=3.9; job_reqs=(reqs/build.txt reqs/setup.txt); job_skip_cache_name=skip_build_macos_py-3.9_macos-12; job_skip_cache_path=.skip_cache_build_macos; job_skiplists=(job_build os_macos); job_type=build; job_variant=macOS; analyze_set_job_skip_cache_key | |
job_cache_extra_deps=('reqs/dist_*.txt' windows/dist_deps.sh); job_id=build_windows; job_name='Build (Windows)'; job_needs=(test_windows); job_os=Windows; job_platform=windows-2022; job_python=3.9; job_reqs=(reqs/build.txt reqs/setup.txt); job_skip_cache_name=skip_build_windows_py-3.9_windows-2022; job_skip_cache_path=.skip_cache_build_windows; job_skiplists=(job_build os_windows); job_type=build; job_variant=Windows; analyze_set_job_skip_cache_key | |
- name: Check skip cache for Test (Linux) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_linux | |
key: 0_check_${{ steps.set_cache.outputs.test_linux_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.test_linux_skip_cache_key }} | |
- name: Check skip cache for Test (macOS) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_macos | |
key: 0_check_${{ steps.set_cache.outputs.test_macos_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.test_macos_skip_cache_key }} | |
- name: Check skip cache for Test (Windows) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_windows | |
key: 0_check_${{ steps.set_cache.outputs.test_windows_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.test_windows_skip_cache_key }} | |
- name: Check skip cache for Test (Python 3.8) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_python_38 | |
key: 0_check_${{ steps.set_cache.outputs.test_python_38_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.test_python_38_skip_cache_key }} | |
- name: Check skip cache for Test (Python 3.10) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_python_310 | |
key: 0_check_${{ steps.set_cache.outputs.test_python_310_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.test_python_310_skip_cache_key }} | |
- name: Check skip cache for Test (Qt GUI) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_qt_gui | |
key: 0_check_${{ steps.set_cache.outputs.test_qt_gui_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.test_qt_gui_skip_cache_key }} | |
- name: Check skip cache for Test (Packaging) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_packaging | |
key: 0_check_${{ steps.set_cache.outputs.test_packaging_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.test_packaging_skip_cache_key }} | |
- name: Check skip cache for Build (Linux) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_build_linux | |
key: 0_check_${{ steps.set_cache.outputs.build_linux_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.build_linux_skip_cache_key }} | |
- name: Check skip cache for Build (macOS) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_build_macos | |
key: 0_check_${{ steps.set_cache.outputs.build_macos_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.build_macos_skip_cache_key }} | |
- name: Check skip cache for Build (Windows) | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_build_windows | |
key: 0_check_${{ steps.set_cache.outputs.build_windows_skip_cache_key }}_${{ github.run_id }} | |
restore-keys: | |
0_${{ steps.set_cache.outputs.build_windows_skip_cache_key }} | |
- name: Set outputs | |
id: set_ouputs | |
env: | |
CONTINUOUS_RELEASE_BRANCH: ${{ secrets.CONTINUOUS_RELEASE_BRANCH }} | |
run: | | |
analyze_set_release_info | |
job_cache_extra_deps=(); job_id=test_linux; job_name='Test (Linux)'; job_needs=(); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_linux_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_test_linux; job_skiplists=(job_test os_linux); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=Linux; analyze_set_job_skip_job | |
job_cache_extra_deps=(osx/deps.sh); job_id=test_macos; job_name='Test (macOS)'; job_needs=(); job_os=macOS; job_platform=macos-12; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_macos_py-3.9_macos-12; job_skip_cache_path=.skip_cache_test_macos; job_skiplists=(job_test os_macos); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=macOS; analyze_set_job_skip_job | |
job_cache_extra_deps=(); job_id=test_windows; job_name='Test (Windows)'; job_needs=(); job_os=Windows; job_platform=windows-2022; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_windows_py-3.9_windows-2022; job_skip_cache_path=.skip_cache_test_windows; job_skiplists=(job_test os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=Windows; analyze_set_job_skip_job | |
job_cache_extra_deps=(); job_id=test_python_38; job_name='Test (Python 3.8)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.8; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_38_py-3.8_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_38; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.8'; analyze_set_job_skip_job | |
job_cache_extra_deps=(); job_id=test_python_310; job_name='Test (Python 3.10)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.10; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_310_py-3.10_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_310; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.10'; analyze_set_job_skip_job | |
job_cache_extra_deps=(); job_id=test_qt_gui; job_name='Test (Qt GUI)'; job_needs=(); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/dist.txt reqs/dist_extra_gui_qt.txt reqs/test.txt); job_skip_cache_name=skip_test_qt_gui_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_test_qt_gui; job_skiplists=(job_test_gui_qt); job_test_args=test/gui_qt; job_type=test_gui_qt; job_variant='Qt GUI'; analyze_set_job_skip_job | |
job_cache_extra_deps=(); job_id=test_packaging; job_name='Test (Packaging)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.9; job_reqs=(reqs/packaging.txt reqs/setup.txt); job_skip_cache_name=skip_test_packaging_py-3.9_ubuntu-latest; job_skip_cache_path=.skip_cache_test_packaging; job_skiplists=(job_test_packaging); job_type=test_packaging; job_variant=Packaging; analyze_set_job_skip_job | |
job_cache_extra_deps=('reqs/dist_*.txt' linux/appimage/deps.sh); job_id=build_linux; job_name='Build (Linux)'; job_needs=(test_linux); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/build.txt reqs/setup.txt); job_skip_cache_name=skip_build_linux_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_build_linux; job_skiplists=(job_build os_linux); job_type=build; job_variant=Linux; analyze_set_job_skip_job | |
job_cache_extra_deps=('reqs/dist_*.txt' osx/deps.sh); job_id=build_macos; job_name='Build (macOS)'; job_needs=(test_macos); job_os=macOS; job_platform=macos-12; job_python=3.9; job_reqs=(reqs/build.txt reqs/setup.txt); job_skip_cache_name=skip_build_macos_py-3.9_macos-12; job_skip_cache_path=.skip_cache_build_macos; job_skiplists=(job_build os_macos); job_type=build; job_variant=macOS; analyze_set_job_skip_job | |
job_cache_extra_deps=('reqs/dist_*.txt' windows/dist_deps.sh); job_id=build_windows; job_name='Build (Windows)'; job_needs=(test_windows); job_os=Windows; job_platform=windows-2022; job_python=3.9; job_reqs=(reqs/build.txt reqs/setup.txt); job_skip_cache_name=skip_build_windows_py-3.9_windows-2022; job_skip_cache_path=.skip_cache_build_windows; job_skiplists=(job_build os_windows); job_type=build; job_variant=Windows; analyze_set_job_skip_job | |
outputs: | |
is_release: ${{ steps.set_ouputs.outputs.is_release }} | |
release_type: ${{ steps.set_ouputs.outputs.release_type }} | |
test_linux_skip_job: ${{ steps.set_ouputs.outputs.test_linux_skip_job }} | |
test_linux_skip_cache_key: ${{ steps.set_cache.outputs.test_linux_skip_cache_key }} | |
test_macos_skip_job: ${{ steps.set_ouputs.outputs.test_macos_skip_job }} | |
test_macos_skip_cache_key: ${{ steps.set_cache.outputs.test_macos_skip_cache_key }} | |
test_windows_skip_job: ${{ steps.set_ouputs.outputs.test_windows_skip_job }} | |
test_windows_skip_cache_key: ${{ steps.set_cache.outputs.test_windows_skip_cache_key }} | |
test_python_38_skip_job: ${{ steps.set_ouputs.outputs.test_python_38_skip_job }} | |
test_python_38_skip_cache_key: ${{ steps.set_cache.outputs.test_python_38_skip_cache_key }} | |
test_python_310_skip_job: ${{ steps.set_ouputs.outputs.test_python_310_skip_job }} | |
test_python_310_skip_cache_key: ${{ steps.set_cache.outputs.test_python_310_skip_cache_key }} | |
test_qt_gui_skip_job: ${{ steps.set_ouputs.outputs.test_qt_gui_skip_job }} | |
test_qt_gui_skip_cache_key: ${{ steps.set_cache.outputs.test_qt_gui_skip_cache_key }} | |
test_packaging_skip_job: ${{ steps.set_ouputs.outputs.test_packaging_skip_job }} | |
test_packaging_skip_cache_key: ${{ steps.set_cache.outputs.test_packaging_skip_cache_key }} | |
build_linux_skip_job: ${{ steps.set_ouputs.outputs.build_linux_skip_job }} | |
build_linux_skip_cache_key: ${{ steps.set_cache.outputs.build_linux_skip_cache_key }} | |
build_macos_skip_job: ${{ steps.set_ouputs.outputs.build_macos_skip_job }} | |
build_macos_skip_cache_key: ${{ steps.set_cache.outputs.build_macos_skip_cache_key }} | |
build_windows_skip_job: ${{ steps.set_ouputs.outputs.build_windows_skip_job }} | |
build_windows_skip_cache_key: ${{ steps.set_cache.outputs.build_windows_skip_cache_key }} | |
release_skip_job: ${{ steps.set_ouputs.outputs.release_skip_job }} | |
# }}} | |
# Job: Test (Linux) {{{ | |
test_linux: | |
name: Test (Linux) | |
runs-on: ubuntu-22.04 | |
needs: [analyze, ] | |
if: >- | |
!cancelled() | |
&& needs.analyze.outputs.test_linux_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.9' 'ubuntu-22.04' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/dist.txt', 'reqs/test.txt') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt | |
# Test {{{ | |
- name: Run tests | |
run: run_tests -p no:pytest-qt --ignore=test/gui_qt | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_linux | |
key: 0_${{ needs.analyze.outputs.test_linux_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_test_linux'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Test (macOS) {{{ | |
test_macos: | |
name: Test (macOS) | |
runs-on: macos-12 | |
needs: [analyze, ] | |
if: >- | |
!cancelled() | |
&& needs.analyze.outputs.test_macos_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.9' 'macos-12' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/dist.txt', 'reqs/test.txt', 'osx/deps.sh') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
# To support older macOS versions, setup Python from an official installer. | |
- name: Setup Python | |
run: setup_osx_python '3.9' | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt | |
# Test {{{ | |
- name: Run tests | |
run: run_tests -p no:pytest-qt --ignore=test/gui_qt | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_macos | |
key: 0_${{ needs.analyze.outputs.test_macos_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_test_macos'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Test (Windows) {{{ | |
test_windows: | |
name: Test (Windows) | |
runs-on: windows-2022 | |
needs: [analyze, ] | |
if: >- | |
!cancelled() | |
&& needs.analyze.outputs.test_windows_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
# On Windows, ensure we use a tar compatible | |
# with the one used in the analyze job. | |
- name: Fix tar | |
run: rm C:/Windows/System32/tar | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.9' 'windows-2022' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/dist.txt', 'reqs/test.txt') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt | |
# Test {{{ | |
- name: Run tests | |
run: run_tests -p no:pytest-qt --ignore=test/gui_qt | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_windows | |
key: 0_${{ needs.analyze.outputs.test_windows_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_test_windows'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Test (Python 3.8) {{{ | |
test_python_38: | |
name: Test (Python 3.8) | |
runs-on: ubuntu-latest | |
needs: [analyze, ] | |
if: >- | |
!cancelled() | |
&& needs.analyze.outputs.test_python_38_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.8' 'ubuntu-latest' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/dist.txt', 'reqs/test.txt') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt | |
# Test {{{ | |
- name: Run tests | |
run: run_tests -p no:pytest-qt --ignore=test/gui_qt | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_python_38 | |
key: 0_${{ needs.analyze.outputs.test_python_38_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_test_python_38'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Test (Python 3.10) {{{ | |
test_python_310: | |
name: Test (Python 3.10) | |
runs-on: ubuntu-latest | |
needs: [analyze, ] | |
if: >- | |
!cancelled() | |
&& needs.analyze.outputs.test_python_310_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.10' 'ubuntu-latest' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/dist.txt', 'reqs/test.txt') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt | |
# Test {{{ | |
- name: Run tests | |
run: run_tests -p no:pytest-qt --ignore=test/gui_qt | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_python_310 | |
key: 0_${{ needs.analyze.outputs.test_python_310_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_test_python_310'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Test (Qt GUI) {{{ | |
test_qt_gui: | |
name: Test (Qt GUI) | |
runs-on: ubuntu-22.04 | |
needs: [analyze, ] | |
if: >- | |
!cancelled() | |
&& needs.analyze.outputs.test_qt_gui_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.9' 'ubuntu-22.04' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/dist.txt', 'reqs/dist_extra_gui_qt.txt', 'reqs/test.txt') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/dist_extra_gui_qt.txt -r reqs/test.txt | |
- name: Build UI | |
run: python setup.py build_ui | |
# Test {{{ | |
- name: Run tests | |
run: run_tests test/gui_qt | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_qt_gui | |
key: 0_${{ needs.analyze.outputs.test_qt_gui_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_test_qt_gui'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Test (Packaging) {{{ | |
test_packaging: | |
name: Test (Packaging) | |
runs-on: ubuntu-latest | |
needs: [analyze, ] | |
if: >- | |
!cancelled() | |
&& needs.analyze.outputs.test_packaging_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# We need the whole history for patching the version. | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.9' 'ubuntu-latest' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/packaging.txt', 'reqs/setup.txt') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/packaging.txt -r reqs/setup.txt | |
- name: Patch version | |
id: set_version | |
run: | | |
python setup.py patch_version | |
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT | |
# Test packaging {{{ | |
- name: Run packaging sanity checks | |
run: packaging_checks | |
- name: Archive artifact (sdist) | |
if: needs.analyze.outputs.is_release == 'yes' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Source | |
path: dist/*.tar.gz | |
- name: Archive artifact (wheel) | |
if: needs.analyze.outputs.is_release == 'yes' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Wheel | |
path: dist/*.whl | |
- name: Generate translations catalogs archive | |
if: needs.analyze.outputs.is_release == 'yes' | |
run: generate_translations_catalogs_archive | |
- name: Archive artifact (translations catalogs) | |
if: needs.analyze.outputs.is_release == 'yes' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Translations Catalogs | |
path: dist/*-messages.zip | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_test_packaging | |
key: 0_${{ needs.analyze.outputs.test_packaging_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_test_packaging'" | |
- name: List cache contents | |
run: list_cache | |
outputs: | |
version: ${{ steps.set_version.outputs.version }} | |
# }}} | |
# Job: Build (Linux) {{{ | |
build_linux: | |
name: Build (Linux) | |
runs-on: ubuntu-22.04 | |
needs: [analyze, test_linux] | |
if: >- | |
!cancelled() | |
&& (needs.test_linux.result == 'success' || needs.test_linux.result == 'skipped') | |
&& needs.analyze.outputs.build_linux_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# We need the whole history for patching the version. | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.9' 'ubuntu-22.04' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/build.txt', 'reqs/setup.txt', 'reqs/dist_*.txt', 'linux/appimage/deps.sh') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
- name: Install system dependencies | |
run: apt_get_install libdbus-1-dev libdbus-glib-1-dev libudev-dev libusb-1.0-0-dev | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt | |
- name: Patch version | |
id: set_version | |
run: | | |
python setup.py patch_version | |
# Build {{{ | |
- name: Build distribution (Linux AppImage) | |
run: python setup.py -q bdist_appimage --no-update-tools | |
- name: Archive artifact (Linux AppImage) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Linux AppImage | |
path: dist/*.AppImage | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_build_linux | |
key: 0_${{ needs.analyze.outputs.build_linux_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_build_linux'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Build (macOS) {{{ | |
build_macos: | |
name: Build (macOS) | |
runs-on: macos-12 | |
needs: [analyze, test_macos] | |
if: >- | |
!cancelled() | |
&& (needs.test_macos.result == 'success' || needs.test_macos.result == 'skipped') | |
&& needs.analyze.outputs.build_macos_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# We need the whole history for patching the version. | |
fetch-depth: 0 | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.9' 'macos-12' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/build.txt', 'reqs/setup.txt', 'reqs/dist_*.txt', 'osx/deps.sh') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
# To support older macOS versions, setup Python from an official installer. | |
- name: Setup Python | |
run: setup_osx_python '3.9' | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt | |
- name: Patch version | |
id: set_version | |
run: | | |
python setup.py patch_version | |
# Build {{{ | |
- name: Build distribution (macOS DMG) | |
run: python setup.py -q bdist_dmg | |
- name: Archive artifact (macOS DMG) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macOS DMG | |
path: dist/*.dmg | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_build_macos | |
key: 0_${{ needs.analyze.outputs.build_macos_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_build_macos'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Build (Windows) {{{ | |
build_windows: | |
name: Build (Windows) | |
runs-on: windows-2022 | |
needs: [analyze, test_windows] | |
if: >- | |
!cancelled() | |
&& (needs.test_windows.result == 'success' || needs.test_windows.result == 'skipped') | |
&& needs.analyze.outputs.build_windows_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# We need the whole history for patching the version. | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
# On Windows, ensure we use a tar compatible | |
# with the one used in the analyze job. | |
- name: Fix tar | |
run: rm C:/Windows/System32/tar | |
- name: Set cache name | |
id: set_cache | |
run: setup_cache_name '3.9' 'windows-2022' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/build.txt', 'reqs/setup.txt', 'reqs/dist_*.txt', 'windows/dist_deps.sh') }} | |
- name: Setup pip options | |
run: setup_pip_options | |
- name: Setup Python environment | |
run: setup_python_env -c reqs/constraints.txt -r reqs/build.txt -r reqs/setup.txt | |
- name: Patch version | |
id: set_version | |
run: | | |
python setup.py patch_version | |
# Build {{{ | |
- name: Build distributions (Windows) | |
run: | | |
# Note: we avoid using the WSL bash (which does not work). | |
bash="$(cygpath -w -a "$(which bash)")" | |
python setup.py -q bdist_win -t -z -i --bash="$bash" | |
- name: Archive artifact (Windows Installer) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Windows Installer | |
path: dist/*.exe | |
- name: Archive artifact (Windows ZIP) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Windows ZIP | |
path: dist/*.zip | |
# }}} | |
- name: Update skip cache 1 | |
uses: actions/cache@v3 | |
with: | |
path: .skip_cache_build_windows | |
key: 0_${{ needs.analyze.outputs.build_windows_skip_cache_key }} | |
- name: Update skip cache 2 | |
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_build_windows'" | |
- name: List cache contents | |
run: list_cache | |
# }}} | |
# Job: Release {{{ | |
release: | |
name: Release | |
environment: release | |
runs-on: ubuntu-latest | |
needs: [analyze, test_linux, test_macos, test_windows, test_python_38, test_python_310, test_qt_gui, test_packaging, build_linux, build_macos, build_windows] | |
if: >- | |
!cancelled() | |
&& needs.test_linux.result == 'success' | |
&& needs.test_macos.result == 'success' | |
&& needs.test_windows.result == 'success' | |
&& needs.test_python_38.result == 'success' | |
&& needs.test_python_310.result == 'success' | |
&& needs.test_qt_gui.result == 'success' | |
&& needs.test_packaging.result == 'success' | |
&& needs.build_linux.result == 'success' | |
&& needs.build_macos.result == 'success' | |
&& needs.build_windows.result == 'success' | |
&& needs.analyze.outputs.release_skip_job == 'no' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
run apt_get_install -qq pandoc | |
run "$python" -m pip install -c reqs/constraints.txt -r reqs/release.txt | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: dist | |
- name: Publish PyPI release | |
if: needs.analyze.outputs.release_type == 'tagged' | |
env: | |
TWINE_NON_INTERACTIVE: 1 | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
# Optional: twine will fallback to default if empty. | |
TWINE_REPOSITORY_URL: ${{ secrets.PYPI_URL }} | |
run: publish_pypi_release | |
- name: Publish GitHub release (${{ needs.analyze.outputs.release_type }}) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_TYPE: ${{ needs.analyze.outputs.release_type }} | |
RELEASE_VERSION: ${{ needs.test_packaging.outputs.version }} | |
run: publish_github_release | |
# }}} | |
# vim: foldmethod=marker foldlevel=0 |