-
Notifications
You must be signed in to change notification settings - Fork 348
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
5 changed files
with
69 additions
and
83 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
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 |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
# Create CI caches for: | ||
# | ||
# 1. GMT remote data for building documentation and running tests | ||
# 2. vcpkg libraries on Windows | ||
# 2. GMT GSHHG and DCW datasets | ||
# 3. vcpkg libraries on Windows | ||
# | ||
name: GMT CI Caches | ||
|
||
|
@@ -105,8 +106,28 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gmt-cache | ||
path: | | ||
~/.gmt/static | ||
path: ~/.gmt/static | ||
|
||
coastline_cache: | ||
name: Cache GSHHG and DCW datasets | ||
runs-on: ubuntu-latest | ||
env: | ||
COASTLINEDIR: ${{ github.workspace }}/coastline | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Download GSHHG and DCW datasets | ||
run: bash ci/download-coastlines.sh | ||
env: | ||
COASTLINEDIR: ${{ env.COASTLINEDIR }} | ||
|
||
- name: Upload artifacts to GitHub | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coastline-cache | ||
path: ${{ env.COASTLINEDIR }} | ||
|
||
vcpkg_cache: | ||
name: Cache vcpkg libraries | ||
|
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 |
---|---|---|
|
@@ -67,9 +67,6 @@ jobs: | |
- fedora:rawhide # rolling release with latest versions | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install GMT dependencies | ||
run: | | ||
os=$(cat /etc/os-release | grep "^ID=" | awk -F= '{print $2}') | ||
|
@@ -83,24 +80,30 @@ jobs: | |
ghostscript curl git | ||
apt reinstall -y ca-certificates | ||
update-ca-certificates | ||
# Install gh from binary deb package | ||
curl -LO https://github.com/cli/cli/releases/download/v2.49.0/gh_2.49.0_linux_amd64.deb | ||
apt install ./gh_2.49.0_linux_amd64.deb | ||
elif [[ "$os" = "fedora" ]]; then | ||
dnf install -y \ | ||
cmake ninja-build \ | ||
libcurl-devel netcdf-devel gdal-devel gdal \ | ||
fftw3-devel pcre-devel lapack-devel openblas-devel glib2-devel \ | ||
ghostscript openssl | ||
ghostscript openssl gh | ||
fi | ||
- name: Cache GSHHG and DCW data | ||
uses: actions/cache@v4 | ||
id: cache-coastline | ||
with: | ||
path: ${{ env.COASTLINEDIR }} | ||
key: coastline-${{ hashFiles('ci/download-coastlines.sh') }} | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Download coastlines | ||
run: bash ci/download-coastlines.sh | ||
if: steps.cache-coastline.outputs.cache-hit != 'true' | ||
- name: Fixup git | ||
run: | | ||
# Fix the git error: | ||
# "failed to run git: fatal: detected dubious ownership in repository at '/__w/gmt/gmt'" | ||
git config --global --add safe.directory /__w/gmt/gmt | ||
- name: Download GSHHG and DCW data | ||
run: gh run download -n coastline-cache -D coastline | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- name: Configure GMT | ||
run: bash ci/config-gmt-unix.sh | ||
|
@@ -116,18 +119,9 @@ jobs: | |
echo "${INSTALLDIR}/bin" >> $GITHUB_PATH | ||
- name: Download cached GMT remote data from GitHub Artifacts | ||
uses: dawidd6/[email protected] | ||
with: | ||
workflow: ci-caches.yml | ||
name: gmt-cache | ||
path: gmt-cache | ||
|
||
# Move downloaded files to ~/.gmt directory and list them | ||
- name: Move and list downloaded remote files | ||
run: | | ||
mkdir -p ~/.gmt/static/ | ||
mv gmt-cache/* ~/.gmt/static/ | ||
ls -lRh ~/.gmt/static/ | ||
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 |
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
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