From 6c22d20e08f99b5334b88794b2de46691ea3667b Mon Sep 17 00:00:00 2001 From: Matthew Middlehurst Date: Thu, 28 Nov 2024 18:38:47 +0200 Subject: [PATCH] [MNT] Trying to diagnose ubuntu workflow failures (#2413) * fix main workflow conditions * try downgrade ubuntu * latest image * swap space * linux only * periodic and release also --- .github/workflows/fast_release.yml | 4 ++-- .github/workflows/issue_assigned.yml | 2 +- .github/workflows/issue_comment_edited.yml | 2 +- .github/workflows/issue_comment_posted.yml | 2 +- .../workflows/periodic_github_maintenace.yml | 2 +- .github/workflows/periodic_tests.yml | 20 ++++++++++++------- .github/workflows/pr_core_dep_import.yml | 2 +- .github/workflows/pr_examples.yml | 6 +++--- .github/workflows/pr_opened.yml | 2 +- .github/workflows/pr_precommit.yml | 2 +- .github/workflows/pr_pytest.yml | 16 ++++++++++----- .github/workflows/pr_typecheck.yml | 2 +- .github/workflows/precommit_autoupdate.yml | 2 +- .github/workflows/release.yml | 14 +++++++++---- .github/workflows/scorecard.yml | 2 +- .github/workflows/update_contributors.yml | 2 +- .readthedocs.yml | 2 +- 17 files changed, 51 insertions(+), 33 deletions(-) diff --git a/.github/workflows/fast_release.yml b/.github/workflows/fast_release.yml index 10d803bf6a..8127170713 100644 --- a/.github/workflows/fast_release.yml +++ b/.github/workflows/fast_release.yml @@ -6,7 +6,7 @@ on: jobs: build-project: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -28,7 +28,7 @@ jobs: retention-days: 5 upload-wheels: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/download-artifact@v4 diff --git a/.github/workflows/issue_assigned.yml b/.github/workflows/issue_assigned.yml index 16e642cf66..589ea7ec98 100644 --- a/.github/workflows/issue_assigned.yml +++ b/.github/workflows/issue_assigned.yml @@ -10,7 +10,7 @@ concurrency: jobs: remove-good-first-issue: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Create app token diff --git a/.github/workflows/issue_comment_edited.yml b/.github/workflows/issue_comment_edited.yml index 9ad02e69ae..1fe3283946 100644 --- a/.github/workflows/issue_comment_edited.yml +++ b/.github/workflows/issue_comment_edited.yml @@ -11,7 +11,7 @@ concurrency: jobs: pr-welcome-edited: if: ${{ github.event.issue.pull_request }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Create app token diff --git a/.github/workflows/issue_comment_posted.yml b/.github/workflows/issue_comment_posted.yml index b4ceed7a5e..752db0e385 100644 --- a/.github/workflows/issue_comment_posted.yml +++ b/.github/workflows/issue_comment_posted.yml @@ -6,7 +6,7 @@ on: jobs: self-assign: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/periodic_github_maintenace.yml b/.github/workflows/periodic_github_maintenace.yml index ff1bfc864a..5c9d099170 100644 --- a/.github/workflows/periodic_github_maintenace.yml +++ b/.github/workflows/periodic_github_maintenace.yml @@ -12,7 +12,7 @@ permissions: jobs: stale_branches: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Create app token diff --git a/.github/workflows/periodic_tests.yml b/.github/workflows/periodic_tests.yml index ac81989b27..998ec1c887 100644 --- a/.github/workflows/periodic_tests.yml +++ b/.github/workflows/periodic_tests.yml @@ -12,7 +12,7 @@ concurrency: jobs: check-manifest: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -29,7 +29,7 @@ jobs: extra_args: check-manifest --hook-stage manual pre-commit: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -46,7 +46,7 @@ jobs: extra_args: --all-files run-notebook-examples: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -84,7 +84,7 @@ jobs: key: numba-run-notebook-examples-${{ runner.os }}-3.10-${{ env.CURRENT_DATE }} test-core-imports: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -109,7 +109,7 @@ jobs: run: python aeon/testing/tests/test_core_imports.py test-no-soft-deps: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -154,7 +154,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, macOS-14, windows-2022 ] + os: [ ubuntu-24.04, macOS-14, windows-2022 ] python-version: [ "3.9", "3.10", "3.11", "3.12" ] steps: @@ -166,6 +166,12 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Set swap space + if: runner.os == 'Linux' + uses: pierotofy/set-swap-space@v1.0 + with: + swap-size-gb: 10 + - name: Use numba cache to set env variables but not restore cache uses: ./.github/actions/numba_cache with: @@ -195,7 +201,7 @@ jobs: key: numba-pytest-${{ runner.os }}-${{ matrix.python-version}}-${{ env.CURRENT_DATE }} codecov: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/pr_core_dep_import.yml b/.github/workflows/pr_core_dep_import.yml index 19fb56e294..1042610d1a 100644 --- a/.github/workflows/pr_core_dep_import.yml +++ b/.github/workflows/pr_core_dep_import.yml @@ -18,7 +18,7 @@ concurrency: jobs: test-core-imports: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/pr_examples.yml b/.github/workflows/pr_examples.yml index 6a4be9a7fc..5679830cf9 100644 --- a/.github/workflows/pr_examples.yml +++ b/.github/workflows/pr_examples.yml @@ -19,7 +19,7 @@ concurrency: jobs: run-notebook-examples: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -30,7 +30,7 @@ jobs: with: python-version: "3.10" - - if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no numba cache') }} + - if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no numba cache') }} name: Restore numba cache uses: ./.github/actions/numba_cache with: @@ -46,5 +46,5 @@ jobs: command: python -m pip install .[all_extras,binder,dev] - name: Run example notebooks - run: .github/utilities/run_examples.sh ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'full examples run') }} + run: .github/utilities/run_examples.sh ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'full examples run') }} shell: bash diff --git a/.github/workflows/pr_opened.yml b/.github/workflows/pr_opened.yml index b4ed6034fc..db957aa0e6 100644 --- a/.github/workflows/pr_opened.yml +++ b/.github/workflows/pr_opened.yml @@ -12,7 +12,7 @@ permissions: jobs: # based on the scikit-learn 1.3.1 PR labelers labeler: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/pr_precommit.yml b/.github/workflows/pr_precommit.yml index 598807161e..2f63ef2ba7 100644 --- a/.github/workflows/pr_precommit.yml +++ b/.github/workflows/pr_precommit.yml @@ -14,7 +14,7 @@ concurrency: jobs: pre-commit: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Create app token diff --git a/.github/workflows/pr_pytest.yml b/.github/workflows/pr_pytest.yml index abbb0f596f..4370bf7221 100644 --- a/.github/workflows/pr_pytest.yml +++ b/.github/workflows/pr_pytest.yml @@ -18,7 +18,7 @@ concurrency: jobs: test-no-soft-deps: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -29,7 +29,7 @@ jobs: with: python-version: "3.10" - - if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no numba cache') }} + - if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no numba cache') }} name: Restore numba cache uses: ./.github/actions/numba_cache with: @@ -56,7 +56,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, macOS-14, windows-2022 ] + os: [ ubuntu-24.04, macOS-14, windows-2022 ] python-version: [ "3.9", "3.10", "3.11", "3.12" ] # skip python versions unless the PR has the 'full pytest actions' label pr-testing: @@ -74,7 +74,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - - if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no numba cache') }} + - name: Set swap space + if: runner.os == 'Linux' + uses: pierotofy/set-swap-space@v1.0 + with: + swap-size-gb: 10 + + - if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no numba cache') }} name: Restore numba cache uses: ./.github/actions/numba_cache with: @@ -100,7 +106,7 @@ jobs: # run the code coverage job if a PR has the 'codecov actions' label if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'codecov actions') }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/pr_typecheck.yml b/.github/workflows/pr_typecheck.yml index 6e093b4996..7f0f80a856 100644 --- a/.github/workflows/pr_typecheck.yml +++ b/.github/workflows/pr_typecheck.yml @@ -18,7 +18,7 @@ jobs: typecheck: # run the code coverage job if a PR has the '' label if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run typecheck test') }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/precommit_autoupdate.yml b/.github/workflows/precommit_autoupdate.yml index 1feb1931ad..cc4e2896ab 100644 --- a/.github/workflows/precommit_autoupdate.yml +++ b/.github/workflows/precommit_autoupdate.yml @@ -8,7 +8,7 @@ on: jobs: pre-commit-auto-update: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48ab75cafe..3b80dee509 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: jobs: check-manifest: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -23,7 +23,7 @@ jobs: build-project: needs: check-manifest - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -51,7 +51,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, macOS-14, windows-2022 ] + os: [ ubuntu-24.04, macOS-14, windows-2022 ] python-version: [ "3.9", "3.10", "3.11", "3.12" ] steps: @@ -61,6 +61,12 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Set swap space + if: runner.os == 'Linux' + uses: pierotofy/set-swap-space@v1.0 + with: + swap-size-gb: 10 + - uses: actions/download-artifact@v4 with: name: dist @@ -93,7 +99,7 @@ jobs: upload-wheels: needs: test-wheels - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/download-artifact@v4 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index d1919ada8e..95435746d4 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -13,7 +13,7 @@ permissions: read-all jobs: analysis: name: Scorecard analysis - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: # Needed to upload the results to code-scanning dashboard. security-events: write diff --git a/.github/workflows/update_contributors.yml b/.github/workflows/update_contributors.yml index 314c6946af..2d80324ec7 100644 --- a/.github/workflows/update_contributors.yml +++ b/.github/workflows/update_contributors.yml @@ -9,7 +9,7 @@ on: jobs: generate-markdown-and-commit: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.readthedocs.yml b/.readthedocs.yml index 1b016c167c..9005cc0fc1 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,7 +11,7 @@ python: - docs build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: python: "3.10"