Skip to content

Commit

Permalink
ci: use jupyter cache in docs ci builds to speed up docs builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Sep 14, 2024
1 parent ff3550c commit f708610
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ jobs:
done
} | tee /tmp/comment
- name: restore cache of the previously rendered notebooks
uses: actions/cache/restore@v4
with:
key: docs-${{ github.base_ref }}
path: docs/**/.jupyter_cache

- name: build docs
run: nix develop --ignore-environment --keep HOME -c just docs-build-all

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/ibis-docs-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- name: get upstream commit
id: get-upstream-commit
run: |
set -euo pipefail
sha="$(git rev-parse HEAD~)"
echo "sha=${sha}" >> "$GITHUB_OUTPUT"
- name: restore cache of the previously rendered notebooks
uses: actions/cache/restore@v4
with:
key: docs-${{ steps.get-upstream-commit.outputs.sha }}
path: docs/**/.jupyter_cache

- name: run doctests
# keep HOME because duckdb (which we use for doctests) wants to use
# that for extensions
Expand All @@ -45,6 +59,12 @@ jobs:
- name: build docs
run: nix develop --ignore-environment --keep HOME -c just docs-render

- name: cache rendered notebooks
uses: actions/cache/save@v4
with:
key: docs-${{ github.sha }}
path: docs/**/.jupyter_cache

- name: build jupyterlite
run: nix develop --ignore-environment --keep HOME -c just build-jupyterlite

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ibis-docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- name: restore cache of the previously rendered notebooks
uses: actions/cache/restore@v4
with:
key: docs-${{ github.base_ref }}
path: docs/**/.jupyter_cache

- name: run doctest
# keep HOME because duckdb (which we use for doctests) wants to use
# that for extensions
Expand Down

0 comments on commit f708610

Please sign in to comment.