From 220263b76a5b99e806fc71987213ea26893032d6 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 2 Apr 2026 10:29:26 +0800 Subject: [PATCH 1/2] CI: Use ubuntu-slim for lightweight workflows --- .github/workflows/cache_data.yaml | 2 +- .github/workflows/cache_dvc.yaml | 2 +- .github/workflows/check-links.yml | 2 +- .github/workflows/dvc-diff.yml | 2 +- .github/workflows/format-command.yml | 2 +- .github/workflows/publish-to-pypi.yml | 6 +++--- .github/workflows/release-baseline-images.yml | 2 +- .github/workflows/slash-command-dispatch.yml | 2 +- .github/workflows/style_checks.yaml | 2 +- .github/workflows/type_checks.yml | 2 +- .github/workflows/welcome.yml | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 57d82f4ab49..752fec43125 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -30,7 +30,7 @@ permissions: {} jobs: gmt_cache: name: Cache GMT artifacts - runs-on: macos-latest + runs-on: macos-slim defaults: run: shell: bash -l {0} diff --git a/.github/workflows/cache_dvc.yaml b/.github/workflows/cache_dvc.yaml index 7ece3438156..f5a0dc2ce82 100644 --- a/.github/workflows/cache_dvc.yaml +++ b/.github/workflows/cache_dvc.yaml @@ -28,7 +28,7 @@ permissions: {} jobs: dvc_cache: name: Cache DVC baseline images - runs-on: ubuntu-latest + runs-on: ubuntu-slim defaults: run: shell: bash -l {0} diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index f8a4cdbd469..f4e18cc28fc 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -21,7 +21,7 @@ permissions: jobs: check_links: name: Check Links - runs-on: ubuntu-latest + runs-on: ubuntu-slim if: github.repository == 'GenericMappingTools/pygmt' steps: diff --git a/.github/workflows/dvc-diff.yml b/.github/workflows/dvc-diff.yml index e496352ac4c..62c5de36db1 100644 --- a/.github/workflows/dvc-diff.yml +++ b/.github/workflows/dvc-diff.yml @@ -21,7 +21,7 @@ permissions: jobs: dvc-diff: name: DVC image diff - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Checkout diff --git a/.github/workflows/format-command.yml b/.github/workflows/format-command.yml index 13f84716b9a..25b54d2b3b3 100644 --- a/.github/workflows/format-command.yml +++ b/.github/workflows/format-command.yml @@ -14,7 +14,7 @@ jobs: format: permissions: contents: write # for Git to git push - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: # Generate token from GenericMappingTools bot - uses: actions/create-github-app-token@v3.0.0 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 90050ad5096..7e7f510ef42 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -39,7 +39,7 @@ permissions: {} jobs: build: name: Build distribution 📦 - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Checkout @@ -82,7 +82,7 @@ jobs: if: github.repository == 'GenericMappingTools/pygmt' needs: - build - runs-on: ubuntu-latest + runs-on: ubuntu-slim environment: name: testpypi url: https://test.pypi.org/project/pygmt @@ -106,7 +106,7 @@ jobs: if: github.repository == 'GenericMappingTools/pygmt' && startsWith(github.ref, 'refs/tags/') needs: - build - runs-on: ubuntu-latest + runs-on: ubuntu-slim environment: name: pypi url: https://pypi.org/project/pygmt/ diff --git a/.github/workflows/release-baseline-images.yml b/.github/workflows/release-baseline-images.yml index b0fb833ef81..c42a2dba895 100644 --- a/.github/workflows/release-baseline-images.yml +++ b/.github/workflows/release-baseline-images.yml @@ -14,7 +14,7 @@ on: jobs: upload-baseline: name: Upload baseline images - runs-on: ubuntu-latest + runs-on: ubuntu-slim if: github.repository == 'GenericMappingTools/pygmt' permissions: diff --git a/.github/workflows/slash-command-dispatch.yml b/.github/workflows/slash-command-dispatch.yml index 6c449202067..6a1a51e53a5 100644 --- a/.github/workflows/slash-command-dispatch.yml +++ b/.github/workflows/slash-command-dispatch.yml @@ -18,7 +18,7 @@ jobs: contents: write # for executing the repository_dispatch event pull-requests: write # for peter-evans/slash-command-dispatch to create PR reaction if: ${{ github.event.issue.pull_request }} - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Slash Command Dispatch uses: peter-evans/slash-command-dispatch@9bdcd7914ec1b75590b790b844aa3b8eee7c683a # v5.0.2 diff --git a/.github/workflows/style_checks.yaml b/.github/workflows/style_checks.yaml index 547a174e63e..bba294500a6 100644 --- a/.github/workflows/style_checks.yaml +++ b/.github/workflows/style_checks.yaml @@ -21,7 +21,7 @@ permissions: {} jobs: style_check: name: Style Checks - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: # Checkout current git repository diff --git a/.github/workflows/type_checks.yml b/.github/workflows/type_checks.yml index 537f114ddb8..2256d2c64f1 100644 --- a/.github/workflows/type_checks.yml +++ b/.github/workflows/type_checks.yml @@ -30,7 +30,7 @@ permissions: {} jobs: static_check: name: Static Type Check - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: # Checkout current git repository diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index ae9724d953d..76f11dbec18 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -22,7 +22,7 @@ jobs: greeting: name: Greet First-Time Contributors if: github.event_name == 'issues' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/first-interaction@v3.1.0 From 842e0759c417f36c02de08a72122e2aa4afb21e6 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 2 Apr 2026 16:21:15 +0800 Subject: [PATCH 2/2] Revert changes in .github/workflows/publish-to-pypi.yml --- .github/workflows/publish-to-pypi.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 7e7f510ef42..90050ad5096 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -39,7 +39,7 @@ permissions: {} jobs: build: name: Build distribution 📦 - runs-on: ubuntu-slim + runs-on: ubuntu-latest steps: - name: Checkout @@ -82,7 +82,7 @@ jobs: if: github.repository == 'GenericMappingTools/pygmt' needs: - build - runs-on: ubuntu-slim + runs-on: ubuntu-latest environment: name: testpypi url: https://test.pypi.org/project/pygmt @@ -106,7 +106,7 @@ jobs: if: github.repository == 'GenericMappingTools/pygmt' && startsWith(github.ref, 'refs/tags/') needs: - build - runs-on: ubuntu-slim + runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/project/pygmt/