Skip to content

Add -C[cpt] arg to grdmix (#8193) #2511

Add -C[cpt] arg to grdmix (#8193)

Add -C[cpt] arg to grdmix (#8193) #2511

Workflow file for this run

#
# Build GMT on different Linux distros, using dockers
#
name: Docker
on:
# pull_request:
push:
branches:
- master
- 6.[0-9]+
paths-ignore:
- 'doc/**'
- '!doc/**/CMakeLists.txt'
defaults:
run:
# default to use bash shell
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
docker:
name: ${{ matrix.image }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
env:
# directories
COASTLINEDIR: ${{ github.workspace }}/coastline
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
strategy:
fail-fast: false
matrix:
image:
# Ubuntu: https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions
- ubuntu:20.04 # CMake 3.16.3 + GNU 9.3.0; EOL: 2025-04-23
- ubuntu:22.04 # CMake 3.22.1 + GNU 11.2.0; EOL: 2027-04-21
- ubuntu:23.04 # CMake 3.25.1 + GNU 12.2.0; EOL: 2024-01-20
# Debian: https://en.wikipedia.org/wiki/Debian_version_history#Release_table
- debian:10 # CMake 3.13.4 + GNU 8.3.0; EOL: 2024-06-01
- debian:11 # CMake 3.18.4 + GNU 10.2.1; EOL: 2026-06-01
- debian:12 # CMake 3.25.1 + GNU 12.2.0; EOL: 2028-06-01
- debian:sid # rolling release with latest versions
# Fedora: https://en.wikipedia.org/wiki/Fedora_Linux_release_history
- fedora:37 # CMake 3.24.1 + GNU 12.2.1; EOL: 2023-11-14
- fedora:38 # CMake 3.26.2 + GNU 13.0.1; EOL: 2024-05-14
- fedora:rawhide # rolling release with latest versions
steps:
- name: Checkout
uses: actions/checkout@v3.6.0
- name: Install GMT dependencies
run: |
os=$(cat /etc/os-release | grep "^ID=" | awk -F= '{print $2}')
if [[ "$os" = "ubuntu" || "$os" = "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 \
build-essential cmake ninja-build libcurl4-gnutls-dev libnetcdf-dev \
ghostscript curl git \
libgdal-dev libfftw3-dev libpcre3-dev liblapack-dev libglib2.0-dev
elif [[ "$os" = "fedora" ]]; then
dnf install -y cmake libcurl-devel netcdf-devel gdal-devel \
ninja-build gdal pcre-devel fftw3-devel lapack-devel \
openblas-devel glib2-devel ghostscript
fi
- name: Cache GSHHG and DCW data
uses: actions/cache@v3
id: cache-coastline
with:
path: ${{ env.COASTLINEDIR }}
key: coastline-${{ hashFiles('ci/download-coastlines.sh') }}
- name: Download coastlines
run: bash ci/download-coastlines.sh
if: steps.cache-coastline.outputs.cache-hit != 'true'
- name: Configure GMT
run: bash ci/config-gmt-unix.sh
- name: Compile GMT
run: |
mkdir build
cd build
cmake -G Ninja ..
cmake --build .
- name: Download cached GMT remote data from GitHub Artifacts
uses: dawidd6/action-download-artifact@v2.28.0
with:
workflow: ci-caches.yml
name: gmt-cache
path: .gmt
# Move downloaded files to ~/.gmt directory and list them
- name: Move and list downloaded remote files
run: |
mkdir -p ~/.gmt
mv .gmt/* ~/.gmt
ls -lRh ~/.gmt
- name: Install GMT
run: |
cd build
cmake --build . --target install
# Add GMT PATH to bin
echo "${INSTALLDIR}/bin" >> $GITHUB_PATH
- name: Check a few simple commands
run: bash ci/simple-gmt-tests.sh