Fit 3-D subplot panels, and their heading, inside the figure (#4450) #3276
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Run full tests | |
| # | |
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 6.[0-9]+ | |
| paths: | |
| - 'src/**' | |
| - 'test/**' | |
| - 'doc/examples/**' | |
| - 'doc/scripts/**' | |
| - '.github/workflows/tests.yml' | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'test/**' | |
| - 'doc/examples/**' | |
| - 'doc/scripts/**' | |
| - '.github/workflows/tests.yml' | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| # default to use bash shell | |
| shell: bash -el {0} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| jobs: | |
| test: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| # directories | |
| COASTLINEDIR: ${{ github.workspace }}/coastline | |
| INSTALLDIR: ${{ github.workspace }}/gmt-install-dir | |
| # disable auto-display of GMT plots | |
| GMT_END_SHOW: off | |
| # Run full tests | |
| BUILD_DOCS : false | |
| PACKAGE : false | |
| RUN_TESTS : true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Linux | |
| os: ubuntu-latest | |
| - name: macOS | |
| os: macos-15-intel # macos-14 use M1 chips, which causes many failures | |
| - name: Windows | |
| os: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| - name: Setup vcpkg (Windows) | |
| run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/ | |
| if: runner.os == 'Windows' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Setup micromamba | |
| uses: mamba-org/setup-micromamba@v3.1.0 | |
| if: runner.os == 'macOS' | |
| - name: Install GMT dependencies | |
| run: | | |
| # $RUNNER_OS can be Linux, macOS or Windows | |
| # The following command converts $RUNNER_OS to lowercase | |
| os=$(echo "$RUNNER_OS" | tr '[:upper:]' '[:lower:]') | |
| bash ci/install-dependencies-${os}.sh | |
| env: | |
| EXCLUDE_OPTIONAL: ${{ matrix.EXCLUDE_OPTIONAL }} | |
| - name: Add Ghostscript registry so that GraphicsMagick can find it [Windows] | |
| shell: pwsh | |
| run: | | |
| New-Item -Path "HKLM:\Software\GPL Ghostscript" | |
| New-Item -Path "HKLM:\Software\GPL Ghostscript\10.03.0" | |
| New-ItemProperty -Path "HKLM:\Software\GPL Ghostscript\10.03.0" -Name GS_DLL -PropertyType String -Value "C:\Miniconda\Library\bin\gsdll64.dll" | |
| New-ItemProperty -Path "HKLM:\Software\GPL Ghostscript\10.03.0" -Name GS_LIB -PropertyType String -Value "C:\Miniconda\Library\bin;C:\Miniconda\Library\lib;C\Miniconda\Library\Font;C:\Miniconda\Library\fonts" | |
| if: runner.os == 'Windows' | |
| - name: Download GSHHG and DCW data | |
| run: gh run download -n coastline-cache -D coastline | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Configure GMT | |
| run: | | |
| if [ "$RUNNER_OS" != "Windows" ]; then | |
| bash ci/config-gmt-unix.sh | |
| else | |
| bash ci/config-gmt-windows.sh | |
| fi | |
| - name: Compile GMT (Linux/macOS) | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -G Ninja .. | |
| cmake --build . | |
| if: runner.os != 'Windows' | |
| - name: Setup MSVC (Windows) | |
| if: runner.os == 'Windows' | |
| uses: TheMrMilchmann/setup-msvc-dev@v4.1.0 | |
| with: | |
| arch: x64 | |
| - name: Compile and Install GMT (Windows) | |
| if: runner.os == 'Windows' | |
| shell: cmd | |
| run: | | |
| mkdir build | |
| cd build | |
| setlocal enabledelayedexpansion | |
| set "INSTALLDIR=%INSTALLDIR:\=/%" | |
| set "WINVCPKGROOT=%VCPKG_INSTALLATION_ROOT:/=\%" | |
| cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=!WINVCPKGROOT!\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release | |
| cmake --build . | |
| cmake --build . --target install | |
| set "WININSTALLDIR=!INSTALLDIR:/=\!" | |
| echo !WININSTALLDIR!\bin>> %GITHUB_PATH% | |
| endlocal | |
| - name: Pull baseline image data from dvc remote | |
| id: dvc-pull | |
| continue-on-error: true | |
| run: | | |
| dvc remote modify origin url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/gmt.dvc --local | |
| dvc pull --remote origin --no-run-cache --force | |
| env: | |
| DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }} | |
| - name: Download DVC cache from GitHub Artifacts and restore baseline image data | |
| if: steps.dvc-pull.outcome == 'failure' | |
| run: | | |
| rm -rf .dvc/cache | |
| gh run download -n dvc-cache -D .dvc/cache/ | |
| dvc checkout --force | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Install GMT (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| run: | | |
| cd build | |
| cmake --build . --target install | |
| # Add GMT PATH to bin | |
| echo "${INSTALLDIR}/bin" >> $GITHUB_PATH | |
| - name: Download cached GMT remote data from GitHub Artifacts | |
| run: gh run download -n gmt-cache -D ~/.gmt/static/ | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Check a few simple commands | |
| run: bash ci/simple-gmt-tests.sh | |
| - name: Check a few simple commands (Windows) | |
| shell: cmd | |
| run: call ci/simple-gmt-tests.bat | |
| if: runner.os == 'Windows' | |
| - name: Run full tests | |
| run: | | |
| set -x -e | |
| cd build | |
| # Disable MinGW's path conversion, see #1035. | |
| if [ "$RUNNER_OS" == "Windows" ]; then export MSYS_NO_PATHCONV=1; fi | |
| # Run tests | |
| ctest ${CTEST_ARGS} || ctest ${CTEST_ARGS} --rerun-failed || ctest ${CTEST_ARGS} --rerun-failed | |
| # show the slowest tests | |
| sort -k3nr Testing/Temporary/CTestCostData.txt > /tmp/cost.txt | |
| head -n 30 /tmp/cost.txt | awk 'NF==3 {printf("%50-s %d %5.1f\n", $1, $2, $3)}' | |
| env: | |
| CTEST_ARGS : "--output-on-failure --force-new-ctest-process -j4 --timeout 480" | |
| - name: Run DOS batch examples (Windows) | |
| shell: cmd | |
| run: | | |
| cd doc/examples | |
| call do_examples.bat | |
| if: runner.os == 'Windows' | |
| - name: Upload build directory if failed | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: BuildDirectory-${{ runner.os }} | |
| path: build/ | |
| if: failure() | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6.0.1 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| fail_ci_if_error: false | |
| gcov: true | |
| if: always() |