diff --git a/.github.example/workflows/build.yml b/.github.example/workflows/build.yml index e713413..8593298 100644 --- a/.github.example/workflows/build.yml +++ b/.github.example/workflows/build.yml @@ -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