Skip to content

Commit b8e2bdf

Browse files
authored
Add a CI job testing GMT master branch on Windows (#756)
This PR tests PyGMT with GMT master branch on Windows, using the GMT dev versions from conda-forge.
1 parent f7c930a commit b8e2bdf

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.github/workflows/ci_tests_dev.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
python-version: [3.9]
23-
os: [ubuntu-20.04, macOS-10.15]
23+
os: [ubuntu-20.04, macOS-10.15, windows-latest]
2424
gmt_git_ref: [master]
25-
env:
26-
# LD_LIBRARY_PATH: ${{ github.workspace }}/gmt/lib:$LD_LIBRARY_PATH
27-
GMT_INSTALL_DIR: ${{ github.workspace }}/gmt-install-dir
28-
GMT_LIBRARY_PATH: ${{ github.workspace }}/gmt-install-dir/lib
2925
defaults:
3026
run:
3127
shell: bash -l {0}
@@ -57,10 +53,16 @@ jobs:
5753
run: conda install cmake libblas libcblas liblapack fftw gdal ghostscript libnetcdf hdf5 zlib curl pcre ipython pytest pytest-cov pytest-mpl
5854

5955
# Build and install latest GMT from GitHub
60-
- name: Install GMT ${{ matrix.gmt_git_ref }} branch
56+
- name: Install GMT ${{ matrix.gmt_git_ref }} branch (Linux/macOS)
6157
run: curl https://raw.githubusercontent.com/GenericMappingTools/gmt/master/ci/build-gmt.sh | bash
6258
env:
6359
GMT_GIT_REF: ${{ matrix.gmt_git_ref }}
60+
GMT_INSTALL_DIR: ${{ github.workspace }}/gmt-install-dir
61+
if: runner.os != 'Windows'
62+
63+
- name: Install GMT dev version from conda-forge (Windows)
64+
run: conda install -c conda-forge/label/dev gmt
65+
if: runner.os == 'Windows'
6466

6567
# Download cached remote files (artifacts) from GitHub
6668
- name: Download remote data from GitHub
@@ -86,8 +88,16 @@ jobs:
8688
pip install dist/*
8789
8890
# Run the tests
89-
- name: Test with pytest
91+
- name: Test with pytest (Linux/macOS)
92+
run: make test PYTEST_EXTRA="-r P"
93+
env:
94+
GMT_LIBRARY_PATH: ${{ github.workspace }}/gmt-install-dir/lib
95+
if: runner.os != 'Windows'
96+
97+
# Run the tests
98+
- name: Test with pytest (Windows)
9099
run: make test PYTEST_EXTRA="-r P"
100+
if: runner.os == 'Windows'
91101

92102
# Upload diff images on test failure
93103
- name: Upload diff images if any test fails

MAINTENANCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ On the *master* branch, the workflow also handles the documentation deployment:
6060
*master* branch onto the `dev` folder of the *gh-pages* branch.
6161
* Updated the `latest` documentation link to the new release.
6262

63-
2. `ci_tests_dev.yaml` (GMT Latest Tests on Linux/macOS).
63+
2. `ci_tests_dev.yaml` (GMT Latest Tests on Linux/macOS/Windows).
6464

6565
This is only triggered when a review is requested or re-requested on a PR.
6666
It is also scheduled to run daily on the *master* branch.

0 commit comments

Comments
 (0)