From 467e822d8d2f33fb876c6bce14a3f6746bdd15e1 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 4 Mar 2025 17:55:13 +0100 Subject: [PATCH 1/3] Update GitHub Actions config Ubuntu 20.04 runners will be removed soon and may fail to start already (brownout) --- .github/workflows/container_tests.yml | 4 ++-- .github/workflows/container_tests_apptainer.yml | 4 ++-- .github/workflows/eb_command.yml | 6 +++--- .github/workflows/linting.yml | 8 ++++---- .github/workflows/unit_tests.yml | 8 ++++---- .github/workflows/unit_tests_python2.yml | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/container_tests.yml b/.github/workflows/container_tests.yml index 540fafcea1..60a17f17b9 100644 --- a/.github/workflows/container_tests.yml +++ b/.github/workflows/container_tests.yml @@ -17,10 +17,10 @@ jobs: python: [3.7] fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python}} architecture: x64 diff --git a/.github/workflows/container_tests_apptainer.yml b/.github/workflows/container_tests_apptainer.yml index f7040000f9..31ab71d392 100644 --- a/.github/workflows/container_tests_apptainer.yml +++ b/.github/workflows/container_tests_apptainer.yml @@ -18,10 +18,10 @@ jobs: apptainer: [1.0.0, 1.1.7] fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python}} architecture: x64 diff --git a/.github/workflows/eb_command.yml b/.github/workflows/eb_command.yml index 220258cd9f..c2896df1fc 100644 --- a/.github/workflows/eb_command.yml +++ b/.github/workflows/eb_command.yml @@ -11,16 +11,16 @@ concurrency: jobs: test-eb: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: python: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python}} architecture: x64 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index e7c25b22d7..402bf9da95 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -10,16 +10,16 @@ concurrency: jobs: python-linting: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] - + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 1546d20a97..1657cb7da7 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -11,7 +11,7 @@ concurrency: jobs: setup: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: lmod7: Lmod-7.8.22 lmod8: Lmod-8.7.6 @@ -22,7 +22,7 @@ jobs: - run: "true" build: needs: setup - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: python: [3.6] @@ -54,10 +54,10 @@ jobs: lc_all: C fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python}} architecture: x64 diff --git a/.github/workflows/unit_tests_python2.yml b/.github/workflows/unit_tests_python2.yml index 9ed3ae25d0..df8ac4c86f 100644 --- a/.github/workflows/unit_tests_python2.yml +++ b/.github/workflows/unit_tests_python2.yml @@ -11,7 +11,7 @@ concurrency: jobs: test_python2: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest container: # CentOS 7.9 container that already includes Lmod & co, # see https://github.com/easybuilders/easybuild-containers From 4d94a024118ff2e6217ec6d5355263f337cad736 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 5 Mar 2025 08:46:09 +0100 Subject: [PATCH 2/3] Use only available Python versions Not all Python versions are available on every OS. Update to use another Python version or a different OS. --- .github/workflows/eb_command.yml | 7 +++++-- .github/workflows/linting.yml | 8 ++++++-- .github/workflows/unit_tests.yml | 16 +++++----------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/eb_command.yml b/.github/workflows/eb_command.yml index c2896df1fc..c2f8794485 100644 --- a/.github/workflows/eb_command.yml +++ b/.github/workflows/eb_command.yml @@ -11,11 +11,14 @@ concurrency: jobs: test-eb: - runs-on: ubuntu-24.04 strategy: matrix: - python: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] + python: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13'] + include: + - python: 3.7 + os: ubuntu-22.04 fail-fast: false + runs-on: ${{matrix.os || 'ubuntu-24.04'}} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 402bf9da95..a0a9337eda 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -10,10 +10,14 @@ concurrency: jobs: python-linting: - runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] + python: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13'] + include: + - python: 3.7 + os: ubuntu-22.04 + fail-fast: false + runs-on: ${{matrix.os || 'ubuntu-24.04'}} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 1657cb7da7..bd06ab6da2 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -22,10 +22,11 @@ jobs: - run: "true" build: needs: setup - runs-on: ubuntu-24.04 + runs-on: ${{matrix.os || 'ubuntu-24.04'}} strategy: matrix: - python: [3.6] + python: [3.7] + os: [ubuntu-22.04] modules_tool: # use variables defined by 'setup' job above, see also # https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context @@ -37,8 +38,6 @@ jobs: lc_all: [""] include: # Test different Python 3 versions with Lmod 8.x - - python: 3.7 - modules_tool: ${{needs.setup.outputs.lmod8}} - python: 3.8 modules_tool: ${{needs.setup.outputs.lmod8}} - python: 3.9 @@ -47,11 +46,6 @@ jobs: modules_tool: ${{needs.setup.outputs.lmod8}} - python: '3.11' modules_tool: ${{needs.setup.outputs.lmod8}} - # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set - # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7) - - python: 3.6 - modules_tool: ${{needs.setup.outputs.lmod8}} - lc_all: C fail-fast: false steps: - uses: actions/checkout@v4 @@ -101,9 +95,9 @@ jobs: # and are only run after the PR gets merged GITHUB_TOKEN: ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}} run: | - # only install GitHub token when testing with Lmod 8.x + Python 3.6 or 3.9, to avoid hitting GitHub rate limit + # only install GitHub token when testing with Lmod 8.x + Python 3.7 or 3.9, to avoid hitting GitHub rate limit # tests that require a GitHub token are skipped automatically when no GitHub token is available - if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.[69] ]]; then + if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.[79] ]]; then if [ ! -z $GITHUB_TOKEN ]; then SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())" python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')" From 36fec3e031a8e4632e5514404f991f671246f4d7 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 5 Mar 2025 09:47:29 +0100 Subject: [PATCH 3/3] Remove Python 3.12 & 3.13 due to missing distutils --- .github/workflows/eb_command.yml | 2 +- .github/workflows/linting.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eb_command.yml b/.github/workflows/eb_command.yml index c2f8794485..386d4b9eb1 100644 --- a/.github/workflows/eb_command.yml +++ b/.github/workflows/eb_command.yml @@ -13,7 +13,7 @@ jobs: test-eb: strategy: matrix: - python: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13'] + python: [3.8, 3.9, '3.10', '3.11'] include: - python: 3.7 os: ubuntu-22.04 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index a0a9337eda..c48cefeac6 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -12,7 +12,7 @@ jobs: python-linting: strategy: matrix: - python: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13'] + python: [3.8, 3.9, '3.10', '3.11'] include: - python: 3.7 os: ubuntu-22.04