@@ -57,45 +57,36 @@ jobs:
5757 # fetch all history so that setuptools-scm works
5858 fetch-depth : 0
5959
60- # Generate token from GenericMappingTools bot
61- - name : Generate token from GenericMappingTools bot
62- uses : tibdex/github-app-token@v2
63- if : github.event_name == 'repository_dispatch'
64- id : generate-token
65- with :
66- app_id : ${{ secrets.APP_ID }}
67- private_key : ${{ secrets.APP_PRIVATE_KEY }}
68-
6960 # Checkout the pull request branch
7061 - name : Checkout
7162 uses : actions/checkout@v4.1.1
7263 if : github.event_name == 'repository_dispatch'
7364 with :
74- token : ${{ steps.generate-token.outputs.token }}
65+ token : ${{ secrets.GITHUB_TOKEN }}
7566 repository : ${{ github.event.client_payload.pull_request.head.repo.full_name }}
7667 ref : ${{ github.event.client_payload.pull_request.head.ref }}
7768 # fetch all history so that setuptools-scm works
7869 fetch-depth : 0
7970
8071 - name : Show job URL
8172 uses : peter-evans/create-or-update-comment@v3.1.0
82- if : github.event_name == 'repository_dispatch' && (matrix .os == 'ubuntu-latest')
73+ if : github.event_name == 'repository_dispatch' && runner .os == 'Linux'
8374 with :
84- token : ${{ steps.generate-token.outputs.token }}
75+ token : ${{ secrets.GITHUB_TOKEN }}
8576 repository : ${{ github.event.client_payload.github.payload.repository.full_name }}
8677 comment-id : ${{ github.event.client_payload.github.payload.comment.id }}
8778 body : https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
8879
8980 # Install Micromamba with conda-forge dependencies
9081 - name : Setup Micromamba
91- uses : mamba-org/setup-micromamba@v1.7.0
82+ uses : mamba-org/setup-micromamba@v1.7.3
9283 with :
9384 environment-name : pygmt
9485 condarc : |
9586 channels:
9687 - conda-forge
9788 - nodefaults
98- cache-downloads : true
89+ cache-downloads : false
9990 cache-environment : true
10091 create-args : >-
10192 python=3.12
@@ -120,7 +111,7 @@ jobs:
120111 run : curl https://raw.githubusercontent.com/GenericMappingTools/gmt/master/ci/build-gmt.sh | bash
121112 env :
122113 GMT_GIT_REF : ${{ matrix.gmt_git_ref }}
123- GMT_INSTALL_DIR : ${{ github.workspace }}/gmt-install-dir
114+ GMT_INSTALL_DIR : ${{ runner.temp }}/gmt-install-dir
124115 if : runner.os != 'Windows'
125116
126117 - name : Install GMT ${{ matrix.gmt_git_ref }} branch (Windows)
@@ -139,13 +130,15 @@ jobs:
139130 -DGMT_USE_THREADS=TRUE
140131 cmake --build .
141132 cmake --build . --target install
133+ cd ..
134+ rm -rf gmt/
142135 env :
143136 GMT_GIT_REF : ${{ matrix.gmt_git_ref }}
144- GMT_INSTALL_DIR : ${{ github.workspace }}/gmt-install-dir
137+ GMT_INSTALL_DIR : ${{ runner.temp }}/gmt-install-dir
145138 if : runner.os == 'Windows'
146139
147140 - name : Add GMT's bin to PATH
148- run : echo '${{ github.workspace }}/gmt-install-dir/bin' >> $GITHUB_PATH
141+ run : echo '${{ runner.temp }}/gmt-install-dir/bin' >> $GITHUB_PATH
149142
150143 # Install dependencies from PyPI
151144 - name : Install dependencies
@@ -163,13 +156,11 @@ jobs:
163156
164157 # Pull baseline image data from dvc remote (DAGsHub)
165158 - name : Pull baseline image data from dvc remote
166- run : |
167- dvc pull
168- ls -lhR pygmt/tests/baseline/
159+ run : dvc pull --verbose && ls -lhR pygmt/tests/baseline/
169160
170161 # Download cached remote files (artifacts) from GitHub
171162 - name : Download remote data from GitHub
172- uses : dawidd6/action-download-artifact@v2.28 .0
163+ uses : dawidd6/action-download-artifact@v3.0 .0
173164 with :
174165 workflow : cache_data.yaml
175166 workflow_conclusion : success
@@ -193,11 +184,11 @@ jobs:
193184 - name : Test with pytest
194185 run : make test PYTEST_EXTRA="-r P"
195186 env :
196- GMT_LIBRARY_PATH : ${{ github.workspace }}/gmt-install-dir/lib
187+ GMT_LIBRARY_PATH : ${{ runner.temp }}/gmt-install-dir/lib
197188
198189 # Upload diff images on test failure
199190 - name : Upload diff images if any test fails
200- uses : actions/upload-artifact@v3
191+ uses : actions/upload-artifact@v4
201192 if : ${{ failure() }}
202193 with :
203194 name : artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}
0 commit comments