From e9961ef1b9a1f7c1d51c66c8e2e1e413f1c53f5b Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 7 Sep 2026 12:45:53 +0800 Subject: [PATCH 1/2] CI: Minor polishments to the Docker workflow --- .github/workflows/docker.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fad863c86a8..3a3ef95650c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -27,9 +27,12 @@ on: defaults: run: - # default to use bash shell shell: bash +permissions: + contents: read + actions: read + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} @@ -40,6 +43,7 @@ jobs: runs-on: ubuntu-latest container: image: ${{ matrix.image }} + timeout-minutes: 30 env: # directories @@ -47,10 +51,8 @@ jobs: INSTALLDIR: ${{ github.workspace }}/gmt-install-dir # disable auto-display of GMT plots GMT_END_SHOW: off - # Compile only - BUILD_DOCS : false - PACKAGE : false - RUN_TESTS : false + # Compile only. Used by ci/config-gmt-unix.sh + RUN_TESTS: false strategy: fail-fast: false @@ -78,21 +80,19 @@ jobs: apt reinstall -y ca-certificates update-ca-certificates # Install gh from binary deb package - curl -LO https://github.com/cli/cli/releases/download/v2.49.0/gh_2.49.0_linux_amd64.deb - apt install ./gh_2.49.0_linux_amd64.deb + curl -LO https://github.com/cli/cli/releases/download/v2.100.0/gh_2.100.0_linux_amd64.deb + apt install -y ./gh_2.100.0_linux_amd64.deb elif [[ "$os" = "fedora" ]]; then dnf install -y --disablerepo=fedora-cisco-openh264 \ - cmake ninja-build \ - libcurl-devel netcdf-devel gdal-devel gdal \ + cmake gcc git ninja-build \ + libcurl-devel netcdf-devel gdal-devel \ fftw3-devel pcre2-devel lapack-devel openblas-devel glib2-devel \ - ghostscript openssl gh + ghostscript gh fi - name: Checkout uses: actions/checkout@v6.0.2 - # Fix the git error: - # "failed to run git: fatal: detected dubious ownership in repository at '/__w/gmt/gmt'" - name: Fixup git run: git config --global --add safe.directory $GITHUB_WORKSPACE From b9542bc96fba6f27f96b21cae948a11fdb326a12 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 7 Sep 2026 12:53:38 +0800 Subject: [PATCH 2/2] Minor updates --- .github/workflows/docker.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3a3ef95650c..a6ace3b8907 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -68,8 +68,8 @@ jobs: steps: - name: Install GMT dependencies run: | - os=$(grep -E "^ID=" /etc/os-release | cut -d= -f2) - if [[ "$os" = "ubuntu" || "$os" = "debian" ]]; then + . /etc/os-release + if [[ "$ID" = "ubuntu" || "$ID" = "debian" ]]; then apt-get update DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get install -y tzdata apt-get install -y --no-install-recommends --no-install-suggests \ @@ -79,12 +79,12 @@ jobs: ghostscript curl git apt reinstall -y ca-certificates update-ca-certificates - # Install gh from binary deb package + # Install gh from binary deb package. curl -LO https://github.com/cli/cli/releases/download/v2.100.0/gh_2.100.0_linux_amd64.deb apt install -y ./gh_2.100.0_linux_amd64.deb - elif [[ "$os" = "fedora" ]]; then + elif [[ "$ID" = "fedora" ]]; then dnf install -y --disablerepo=fedora-cisco-openh264 \ - cmake gcc git ninja-build \ + gcc git cmake ninja-build \ libcurl-devel netcdf-devel gdal-devel \ fftw3-devel pcre2-devel lapack-devel openblas-devel glib2-devel \ ghostscript gh