mirror of
https://github.com/encounter/dtk-template.git
synced 2025-10-05 16:59:36 +00:00
Add build cache to CI workflow
NOTE: This requires an update to your build container. See
e132563a5a
This normalizes file modtimes with git-restore-mtime, and caches
the build directory. Subsequent runs will only rebuild the files
that have changed.
This commit is contained in:
parent
5e2fa2a574
commit
b4be7cfa39
@ -22,15 +22,30 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
# Set Git config
|
||||
- name: Git config
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
# Normalize file mod times
|
||||
- name: Restore timestamps
|
||||
run: uv run https://raw.githubusercontent.com/MestreLion/git-tools/refs/tags/v2022.12/git-restore-mtime
|
||||
|
||||
# Copy the original files to the workspace
|
||||
- name: Prepare
|
||||
run: cp -R /orig .
|
||||
run: cp -a /orig .
|
||||
|
||||
# Restore cached files
|
||||
- name: Cache build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
build
|
||||
.ninja_deps
|
||||
.ninja_log
|
||||
key: ${{ runner.os }}-${{ matrix.version }}
|
||||
|
||||
# Build the project
|
||||
- name: Build
|
||||
|
Loading…
x
Reference in New Issue
Block a user