Skip to content

Commit 2dc2e6e

Browse files
committed
Test on Ubuntu/macOS/Windows
Also just use a default bash shell for every step.
1 parent b87de5d commit 2dc2e6e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/ci_tests.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,14 @@ jobs:
106106
fail-fast: false
107107
matrix:
108108
python-version: [3.7]
109-
os: [ubuntu-latest]
109+
os: [ubuntu-20.04, macOS-10.15, windows-2019]
110110
env:
111111
# LD_LIBRARY_PATH: ${{ github.workspace }}/gmt/lib:$LD_LIBRARY_PATH
112112
GMT_INSTALL_DIR: ${{ github.workspace }}/gmt-install-dir
113113
GMT_LIBRARY_PATH: ${{ github.workspace }}/gmt-install-dir/lib
114+
defaults:
115+
run:
116+
shell: bash -l {0}
114117

115118
steps:
116119
# Checkout current git repository
@@ -130,12 +133,10 @@ jobs:
130133

131134
# Install build dependencies from conda-forge
132135
- name: Install build dependencies
133-
shell: bash -l {0}
134136
run: conda install cmake libblas libcblas liblapack fftw gdal ghostscript libnetcdf hdf5 zlib curl pcre gshhg-gmt dcw-gmt pytest pytest-cov pytest-mpl
135137

136138
# Install GMT master branch
137139
- name: Install GMT from master
138-
shell: bash -l {0}
139140
run: curl https://raw.githubusercontent.com/GenericMappingTools/gmt/master/ci/build-gmt-master.sh | bash
140141

141142
# Cache the ${HOME}/.gmt directory, for docs and testing
@@ -151,12 +152,11 @@ jobs:
151152

152153
# Workaround for the timeouts of 'gmt which' on Linux and Windows
153154
- name: Download remote data using wget (Linux & Windows)
154-
shell: bash -l {0}
155155
run: |
156156
if [ "$RUNNER_OS" == "Windows" ]; then choco install wget; fi # install wget on Windows
157157
mkdir ~/.gmt ~/.gmt/cache ~/.gmt/server
158158
wget --no-check-certificate https://oceania.generic-mapping-tools.org/gmt_hash_server.txt -P ~/.gmt/server/
159-
for data in earth_relief_60m.grd earth_relief_30m.grd earth_relief_10m.grd; do
159+
for data in earth_relief_01d.grd earth_relief_30m.grd earth_relief_10m.grd; do
160160
wget --no-check-certificate https://oceania.generic-mapping-tools.org/${data} -P ~/.gmt/server/
161161
done
162162
for data in ridge.txt Table_5_11.txt tut_bathy.nc tut_quakes.ngdc tut_ship.xyz usgs_quakes_22.txt; do
@@ -166,18 +166,15 @@ jobs:
166166

167167
# Download remote files, if not already cached
168168
- name: Download remote data (macOS)
169-
shell: bash -l {0}
170169
run: gmt which -Gu @earth_relief_60m @earth_relief_30m @earth_relief_10m @ridge.txt @Table_5_11.txt @tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz @usgs_quakes_22.txt
171170
if: steps.cache2.outputs.cache-hit != 'true' && runner.os == 'macOS'
172171

173172
# Install the package that we want to test
174173
- name: Install the package
175-
shell: bash -l {0}
176174
run: |
177175
python setup.py sdist --formats=zip
178176
pip install dist/*
179177
180178
# Run the tests
181179
- name: Test with pytest
182-
shell: bash -l {0}
183180
run: make test PYTEST_EXTRA="-r P"

0 commit comments

Comments
 (0)