Skip to content

Commit

Permalink
CI: Use 'gh run download' to download GMT caches (#8450)
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman authored May 6, 2024
1 parent 64a8c73 commit 0eb4197
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 45 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@ jobs:
uses: actions/[email protected]

- name: Setup vcpkg (Windows)
uses: dawidd6/[email protected]
with:
workflow: ci-caches.yml
name: vcpkg-cache
path: C:\vcpkg\installed\
run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/
if: runner.os == 'Windows'
env:
GH_TOKEN: ${{ github.token }}

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
Expand Down Expand Up @@ -124,18 +122,11 @@ jobs:
if: runner.os == 'Windows'

- 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/
gh run download -n gmt-cache -D ~/.gmt/static/
ls -lRh ~/.gmt/static/
env:
GH_TOKEN: ${{ github.token }}

- name: Install GMT
run: |
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ jobs:
uses: actions/[email protected]

- name: Setup vcpkg (Windows)
uses: dawidd6/[email protected]
with:
workflow: ci-caches.yml
name: vcpkg-cache
path: C:\vcpkg\installed\
run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/
if: runner.os == 'Windows'
env:
GH_TOKEN: ${{ github.token }}

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
Expand Down Expand Up @@ -120,18 +118,11 @@ jobs:
if: runner.os == 'Windows'

- 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/
gh run download -n gmt-cache -D ~/.gmt/static/
ls -lRh ~/.gmt/static/
env:
GH_TOKEN: ${{ github.token }}

- name: Build documentation
run: |
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ jobs:
uses: actions/[email protected]

- name: Setup vcpkg (Windows)
uses: dawidd6/[email protected]
with:
workflow: ci-caches.yml
name: vcpkg-cache
path: C:\vcpkg\installed\
run: gh run download -n vcpkg-cache -D C:/vcpkg/installed/
if: runner.os == 'Windows'
env:
GH_TOKEN: ${{ github.token }}

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
Expand Down Expand Up @@ -130,18 +128,11 @@ jobs:
if: runner.os == 'Windows'

- 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/
gh run download -n gmt-cache -D ~/.gmt/static/
ls -lRh ~/.gmt/static/
env:
GH_TOKEN: ${{ github.token }}

# Pull baseline image data from dvc remote (DAGsHub)
- name: Pull baseline image data from dvc remote
Expand Down

0 comments on commit 0eb4197

Please sign in to comment.