Add CI cache

This commit is contained in:
Luke Street
2025-08-14 08:57:21 -06:00
parent 58288b37ea
commit 1350a5b542
2 changed files with 18 additions and 102 deletions
+18 -23
View File
@@ -19,28 +19,36 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
# Normalize file mod times
- name: restore timestamps
uses: chetan/git-restore-mtime-action@v2
# 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 any cached files
# Restore cached files
- name: Cache build
uses: actions/cache@v4
with:
path: build/${{ matrix.version }}
key: ${{ runner.os }}-${{ matrix.version }}-${{ hashFiles('configure.py', '.ninja_deps', 'build_scripts/**') }}
restore-keys: |
${{ runner.os }}-${{ matrix.version }}-
path: |
build
.ninja_deps
.ninja_log
include/PR/abi.h
include/PR/gbi.h
include/PR/gs2dex.h
include/PR/mbi.h
include/PR/ultratypes.h
include/compiler/gcc/stdlib.h
key: ${{ runner.os }}-${{ matrix.version }}
# Build the project
- name: Build
@@ -50,19 +58,6 @@ jobs:
ninja all_source build/${{ matrix.version }}/progress.json \
build/${{ matrix.version }}/report.json
# Upload progress if we're on the main branch
- name: Upload progress
if: github.ref == 'refs/heads/master'
continue-on-error: true
env:
PROGRESS_SLUG: animalcrossing
PROGRESS_API_KEY: ${{ secrets.PROGRESS_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # for accessing github endpoints
run: |
python tools/upload_progress.py -b https://progress.decomp.club/ \
-p $PROGRESS_SLUG -v ${{ matrix.version }} \
build/${{ matrix.version }}/progress.json
# Upload map files
- name: Upload map
uses: actions/upload-artifact@v4