Skip to content

Commit ddf53b0

Browse files
committed
fix: use stage0 lake (& split build to have it)
1 parent 54910b4 commit ddf53b0

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/build-template.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ jobs:
102102
if: matrix.cmultilib
103103
- name: Restore Cache
104104
id: restore-cache
105-
if: matrix.name != 'Linux Lake (Cached)'
106105
uses: actions/cache/restore@v4
107106
with:
108107
# NOTE: must be in sync with `save` below and with `restore-cache` in `update-stage0.yml`
@@ -132,11 +131,7 @@ jobs:
132131
else
133132
echo "TARGET_STAGE=stage1" >> $GITHUB_ENV
134133
fi
135-
- name: Download Lake Cache
136-
if: matrix.name == 'Linux Lake (Cached)'
137-
run: lake cache get --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }}
138-
continue-on-error: true
139-
- name: Build
134+
- name: Configure Build
140135
run: |
141136
ulimit -c unlimited # coredumps
142137
[ -d build ] || mkdir build
@@ -173,7 +168,14 @@ jobs:
173168
fi
174169
# contortion to support empty OPTIONS with old macOS bash
175170
cmake .. --preset ${{ matrix.CMAKE_PRESET || 'release' }} -B . ${{ matrix.CMAKE_OPTIONS }} ${OPTIONS[@]+"${OPTIONS[@]}"} -DLEAN_INSTALL_PREFIX=$PWD/..
176-
time make $TARGET_STAGE -j$NPROC
171+
- name: Build Stage 0
172+
run: time make stage0 -j$NPROC
173+
- name: Download Lake Cache
174+
if: matrix.name == 'Linux Lake (Cached)'
175+
run: build/stage0/bin/lake cache get --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }}
176+
continue-on-error: true
177+
- name: Build Stage ${{ env.TARGET_STAGE }}
178+
run: time make $TARGET_STAGE -j$NPROC
177179
# Should be done as early as possible and in particular *before* "Check rebootstrap" which
178180
# changes the state of stage1/
179181
- name: Save Cache
@@ -197,8 +199,8 @@ jobs:
197199
# shutdown
198200
if: matrix.name == 'Linux Lake' && !cancelled()
199201
run: |
200-
lake build -o build/lake-mappings.json
201-
lake cache put build/lake-mappings.json --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }}
202+
build/stage0/bin/lake build -o build/lake-mappings.jsonl
203+
build/stage0/bin/lake cache put build/lake-mappings.jsonl --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }}
202204
env:
203205
LAKE_CACHE_KEY: ${{ secrets.LAKE_CACHE_KEY }}
204206
LAKE_ARTIFACT_ENDPOINT: ${{ secrets.LAKE_ARTIFACT_ENDPOINT }}

0 commit comments

Comments
 (0)