-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,8 @@ | |
# installed by fetching the latest source codes from the GMT master branch and | ||
# compiling. | ||
# | ||
# It is triggered when a pull request is marked as "ready as review", or labeled with | ||
# 'run/test-gmt-dev'. It is also scheduled to run on Monday, Wednesday, and Friday on | ||
# the main branch. | ||
# It is triggered in a pull request if labeled with 'run/test-gmt-dev'. | ||
# It is also scheduled to run on Monday, Wednesday, and Friday on the main branch. | ||
# | ||
name: GMT Dev Tests | ||
|
||
|
@@ -81,34 +80,62 @@ jobs: | |
pcre | ||
zlib | ||
# Build and install latest GMT from GitHub | ||
- name: Install GMT ${{ matrix.gmt_git_ref }} branch (Linux/macOS) | ||
run: curl https://raw.githubusercontent.com/GenericMappingTools/gmt/master/ci/build-gmt.sh | bash | ||
# Checkout current the GMT source codes | ||
- name: Checkout the GMT source codes | ||
uses: actions/[email protected] | ||
with: | ||
repository: 'GenericMappingTools/gmt' | ||
ref: ${{ matrix.gmt_git_ref }} | ||
path: 'gmt' | ||
|
||
- name: Make the ConfigUser.cmake file | ||
run: | | ||
cd gmt/ | ||
if [ "${RUNNER_OS}" == "macOS"]; then # Can't make macOS support OpenMP now | ||
ENABLE_OPENMP=TRUE | ||
ENABLE_THREAD=TRUE | ||
else | ||
ENABLE_OPENMP=FALSE | ||
ENABLE_THREADS=FALSE | ||
fi | ||
cat >> cmake/ConfigUser.cmake << EOF | ||
set (CMAKE_INSTALL_PREFIX ${{ env.GMT_INSTALL_DIR }}) | ||
set (CMAKE_BUILD_TYPE Release) | ||
set (GMT_ENABLE_OPENMP ${ENABLE_OPENMP}) | ||
set (GMT_USE_THREADS ${ENABLE_THREADS}) | ||
EOF | ||
if [ "${RUNNER_OS}" == "Windows" ]; then | ||
echo "set (CMAKE_PREFIX_PATH ${{ env.MAMBA_ROOT_PREFIX }}\envs\pygmt\Library)" >> cmake/ConfigUser.cmake | ||
fi | ||
cat cmake/ConfigUser.cmake | ||
- name: Compile and install GMT ${{ matrix.gmt_git_ref }} branch (Linux) | ||
run: | | ||
cd gmt/ | ||
mkdir build | ||
cd build | ||
cmake -G Ninja .. | ||
cmake --build . | ||
cmake --build . --target install | ||
cd .. | ||
rm -rf gmt/ | ||
env: | ||
GMT_GIT_REF: ${{ matrix.gmt_git_ref }} | ||
GMT_INSTALL_DIR: ${{ runner.temp }}/gmt-install-dir | ||
if: runner.os != 'Windows' | ||
if: runner.os != 'Linux' | ||
|
||
- name: Install GMT ${{ matrix.gmt_git_ref }} branch (Windows) | ||
- name: Compile and install GMT ${{ matrix.gmt_git_ref }} branch (Windows) | ||
shell: cmd | ||
run: | | ||
git clone --depth=1 --single-branch --branch ${{ env.GMT_GIT_REF }} https://github.com/GenericMappingTools/gmt | ||
cd gmt/ | ||
mkdir build | ||
cd build | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
cmake -G Ninja .. ^ | ||
-DCMAKE_INSTALL_PREFIX=${{ env.GMT_INSTALL_DIR }} ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_PREFIX_PATH=${{ env.MAMBA_ROOT_PREFIX }}\envs\pygmt\Library ^ | ||
-DGMT_ENABLE_OPENMP=TRUE ^ | ||
-DGMT_USE_THREADS=TRUE | ||
cmake -G Ninja .. | ||
cmake --build . | ||
cmake --build . --target install | ||
cd .. | ||
rm -rf gmt/ | ||
env: | ||
GMT_GIT_REF: ${{ matrix.gmt_git_ref }} | ||
GMT_INSTALL_DIR: ${{ runner.temp }}/gmt-install-dir | ||
if: runner.os == 'Windows' | ||
|
||
|
@@ -122,7 +149,7 @@ jobs: | |
--extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ | ||
numpy pandas xarray netCDF4 packaging \ | ||
build contextily dvc geopandas ipython pyarrow rioxarray \ | ||
'pytest>=6.0' pytest-cov pytest-doctestplus pytest-mpl \ | ||
pytest pytest-cov pytest-doctestplus pytest-mpl \ | ||
sphinx-gallery | ||
# Show installed pkg information for postmortem diagnostic | ||
|