diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index 7a474ff2cd..7b801ef2ff 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -104,7 +104,7 @@ jobs: # NOTE: must be in sync with `save` below and with `restore-cache` in `update-stage0.yml` path: | .ccache - ${{ matrix.name == 'Linux Lake (cached)' && 'build/stage1/**/*.trace + ${{ matrix.name == 'Linux Lake' && 'build/stage1/**/*.trace build/stage1/**/*.olean* build/stage1/**/*.ilean build/stage1/**/*.ir @@ -166,6 +166,22 @@ jobs: # contortion to support empty OPTIONS with old macOS bash cmake .. --preset ${{ matrix.CMAKE_PRESET || 'release' }} -B . ${{ matrix.CMAKE_OPTIONS }} ${OPTIONS[@]+"${OPTIONS[@]}"} -DLEAN_INSTALL_PREFIX=$PWD/.. time make $TARGET_STAGE -j$NPROC + # Should be done as early as possible and in particular *before* "Check rebootstrap" which + # changes the state of stage1/ + - name: Save Cache + if: steps.restore-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + # NOTE: must be in sync with `restore` above + path: | + .ccache + ${{ matrix.name == 'Linux Lake' && 'build/stage1/**/*.trace + build/stage1/**/*.olean* + build/stage1/**/*.ilean + build/stage1/**/*.ir + build/stage1/**/*.c + build/stage1/**/*.c.o*' || '' }} + key: ${{ steps.restore-cache.outputs.cache-primary-key }} - name: Install run: | make -C build/$TARGET_STAGE install @@ -253,22 +269,3 @@ jobs: progbin="$(file $c | sed "s/.*execfn: '\([^']*\)'.*/\1/")" echo bt | $GDB/bin/gdb -q $progbin $c || true done - - name: Save Cache - if: always() && steps.restore-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - # NOTE: must be in sync with `restore` above - path: | - .ccache - ${{ matrix.name == 'Linux Lake (cached)' && 'build/stage1/**/*.trace - build/stage1/**/*.olean* - build/stage1/**/*.ilean - build/stage1/**/*.ir - build/stage1/**/*.c - build/stage1/**/*.c.o*' || '' }} - key: ${{ steps.restore-cache.outputs.cache-primary-key }} - - name: Upload Build Artifact - if: always() && matrix.name == 'Linux Lake (cached)' - uses: actions/upload-artifact@v4 - with: - path: build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 861fb43306..eb21083f35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -194,13 +194,6 @@ jobs: "test-speedcenter": large && level >= 2, "CMAKE_OPTIONS": "-DUSE_LAKE=ON", }, - { - "name": "Linux Lake (cached)", - "os": "ubuntu-latest", - "check-level": (isPr || isPushToMaster) ? 0 : 2, - "secondary": true, - "CMAKE_OPTIONS": "-DUSE_LAKE=ON", - }, { "name": "Linux Reldebug", "os": "ubuntu-latest", diff --git a/.github/workflows/update-stage0.yml b/.github/workflows/update-stage0.yml index 5d72debe66..45b2b86582 100644 --- a/.github/workflows/update-stage0.yml +++ b/.github/workflows/update-stage0.yml @@ -57,15 +57,20 @@ jobs: uses: actions/cache/restore@v4 with: # NOTE: must be in sync with `restore-cache` in `build-template.yml` - # TODO: actually switch to USE_LAKE once it caches more; for now it just caches more often than any other build type so let's use its cache path: | .ccache + build/stage1/**/*.trace + build/stage1/**/*.olean* + build/stage1/**/*.ilean + build/stage1/**/*.ir + build/stage1/**/*.c + build/stage1/**/*.c.o* key: Linux Lake-build-v3-${{ github.sha }} # fall back to (latest) previous cache restore-keys: | Linux Lake-build-v3 - if: env.should_update_stage0 == 'yes' - run: cmake --preset release + run: cmake --preset release -DUSE_LAKE=ON shell: 'nix develop -c bash -euxo pipefail {0}' - if: env.should_update_stage0 == 'yes' run: make -j$NPROC -C build/release update-stage0-commit