From 4148c8ebadafca1d1b9e32a5948ba513de40687a Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Mon, 16 Nov 2026 11:31:17 -0300 Subject: [PATCH 1/2] Pin Linux CI runners to ubuntu-24.04 ubuntu-latest now resolves to ubuntu-26.04, which no longer ships Miniconda. ci/install-dependencies-linux.sh then fails with "conda: command not found", so the Tests, Build and Docs workflows break before building GMT. Pin those jobs to ubuntu-24.04 until the CI is migrated to setup-miniconda and validated on 26.04. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/build.yml | 4 ++-- .github/workflows/docs.yml | 6 +++--- .github/workflows/tests.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48bb3359b89..f12c3b317c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,13 +63,13 @@ jobs: matrix: include: - name: Linux - os: ubuntu-latest + os: ubuntu-24.04 - name: macOS os: macos-15-intel - name: Windows os: windows-latest - name: Linux (without optional dependencies) - os: ubuntu-latest + os: ubuntu-24.04 EXCLUDE_OPTIONAL : true steps: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e86ee0dda65..985a8f87559 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -50,7 +50,7 @@ jobs: matrix: include: - name: Linux - os: ubuntu-latest + os: ubuntu-24.04 - name: macOS os: macos-latest - name: Windows @@ -157,11 +157,11 @@ jobs: path: deploy # Download the entire history fetch-depth: 0 - if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest' + if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-24.04' - name: Deploy documentation to GitHub run: bash ci/deploy-gh-pages.sh - if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest' + if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-24.04' - name: Package GMT run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 58883731536..31712d23f56 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,7 +63,7 @@ jobs: matrix: include: - name: Linux - os: ubuntu-latest + os: ubuntu-24.04 - name: macOS os: macos-15-intel # macos-14 use M1 chips, which causes many failures - name: Windows From b721973b6d3e58a6ada2bd5c3be1ac1da8168c73 Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Mon, 16 Nov 2026 12:01:28 -0300 Subject: [PATCH 2/2] Use setup-micromamba on Linux instead of pinning ubuntu-24.04 Revert the ubuntu-24.04 pin and enable the existing setup-micromamba step for Linux as well as macOS, as suggested in review. The Linux install script now creates a micromamba environment the same way the macOS one does (see #9137), and adds pip for the docs job (see #9145), so it no longer depends on the Miniconda that ubuntu-26.04 dropped. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/build.yml | 8 ++++---- .github/workflows/docs.yml | 10 +++++----- .github/workflows/tests.yml | 4 ++-- ci/install-dependencies-linux.sh | 23 ++++++++++++----------- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f12c3b317c0..1e88d1359a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,13 +63,13 @@ jobs: matrix: include: - name: Linux - os: ubuntu-24.04 + os: ubuntu-latest - name: macOS os: macos-15-intel - name: Windows os: windows-latest - name: Linux (without optional dependencies) - os: ubuntu-24.04 + os: ubuntu-latest EXCLUDE_OPTIONAL : true steps: @@ -82,9 +82,9 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Setup micromamba (macOS) + - name: Setup micromamba uses: mamba-org/setup-micromamba@v3.2.1 - if: runner.os == 'macOS' + if: runner.os != 'Windows' - name: Install GMT dependencies run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 985a8f87559..8e8eaae7996 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -50,7 +50,7 @@ jobs: matrix: include: - name: Linux - os: ubuntu-24.04 + os: ubuntu-latest - name: macOS os: macos-latest - name: Windows @@ -66,9 +66,9 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Setup micromamba (macOS) + - name: Setup micromamba uses: mamba-org/setup-micromamba@v3.2.1 - if: runner.os == 'macOS' + if: runner.os != 'Windows' - name: Install GMT dependencies run: | @@ -157,11 +157,11 @@ jobs: path: deploy # Download the entire history fetch-depth: 0 - if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-24.04' + if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest' - name: Deploy documentation to GitHub run: bash ci/deploy-gh-pages.sh - if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-24.04' + if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest' - name: Package GMT run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 31712d23f56..db505af07ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,7 +63,7 @@ jobs: matrix: include: - name: Linux - os: ubuntu-24.04 + os: ubuntu-latest - name: macOS os: macos-15-intel # macos-14 use M1 chips, which causes many failures - name: Windows @@ -81,7 +81,7 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v3.2.1 - if: runner.os == 'macOS' + if: runner.os != 'Windows' - name: Install GMT dependencies run: | diff --git a/ci/install-dependencies-linux.sh b/ci/install-dependencies-linux.sh index 7068d372af9..8e436bb089f 100755 --- a/ci/install-dependencies-linux.sh +++ b/ci/install-dependencies-linux.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Bash script to install GMT dependencies on Ubuntu via apt-get and conda +# Bash script to install GMT dependencies on Ubuntu via apt-get and micromamba # # Environmental variables that can control the installation: # @@ -17,8 +17,8 @@ EXCLUDE_OPTIONAL=${EXCLUDE_OPTIONAL:-false} # packages installed via apt-get packages="build-essential cmake ninja-build libcurl4-gnutls-dev libnetcdf-dev curl git libgdal-dev" -# packages installed via conda -conda_packages="ghostscript=10.03.0" +# packages installed via micromamba +mamba_packages="ghostscript=10.03.0" # optional packages if [ "$EXCLUDE_OPTIONAL" = "false" ]; then @@ -28,28 +28,29 @@ fi # packages for running GMT tests if [ "$RUN_TESTS" = "true" ]; then packages+=" graphicsmagick gdal-bin texlive-latex-base texlive-binaries texlive-fonts-recommended" - conda_packages+=" dvc" + mamba_packages+=" dvc" fi # packages for building documentation if [ "$BUILD_DOCS" = "true" ]; then - conda_packages+=" pngquant sphinx dvc" + mamba_packages+=" pngquant sphinx dvc pip" fi # Install packages via apt-get sudo apt-get update sudo apt-get install -y --no-install-recommends --no-install-suggests $packages -# Install packages via conda -conda install ${conda_packages} -c conda-forge -echo "${CONDA}/bin" >> $GITHUB_PATH +# Install packages via micromamba into a dedicated environment +micromamba create --yes --name gmt ${mamba_packages} -c conda-forge +MAMBA_PREFIX="${MAMBA_ROOT_PREFIX}/envs/gmt" +echo "${MAMBA_PREFIX}/bin" >> $GITHUB_PATH -# Remove pcre-config from conda's path so cmake won't find the conda's one -rm -f ${CONDA}/bin/pcre-config ${CONDA}/bin/pcre2-config +# Remove pcre-config from micromamba's path so cmake won't find the micromamba's one +rm -f ${MAMBA_PREFIX}/bin/pcre-config ${MAMBA_PREFIX}/bin/pcre2-config # Install Sphinx extensions if [ "$BUILD_DOCS" = "true" ]; then - ${CONDA}/bin/python -m pip install --user -r doc/rst/requirements.txt + ${MAMBA_PREFIX}/bin/python -m pip install --user -r doc/rst/requirements.txt fi set +x +e