File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -142,15 +142,39 @@ jobs:
142142 steps :
143143 - name : GH Runner bug workaround
144144 run : sysctl -w vm.mmap_rnd_bits=28
145+
145146 - name : Checkout code
146147 uses : actions/checkout@v4
147148 with : { 'fetch-depth': 0 }
148- - name : Test release
149+
150+ - name : Install zstd (for faster caching)
151+ run : apt-get update && apt-get install -y zstd
152+
153+ - name : Restore .build
154+ if : ${{ !(github.run_attempt > 1) }} # Because maybe the cache is causing issues
155+ id : " restore-cache"
156+ uses : actions/cache/restore@v4
157+ with :
158+ path : .build
159+ key : " spi-release-build-${{ runner.os }}-${{ github.event.after }}"
160+ restore-keys : " spi-release-build-${{ runner.os }}-"
161+
162+ - name : Build release
149163 run : |
150164 # Since we're only pinging the version api endpoint, no database is needed and
151165 # we can just copy the development template to ensure the db env variables are set.
152166 cp .env.development.template .env.development
153167 swift build -c release --static-swift-stdlib -Xlinker -ljemalloc --enable-experimental-prebuilts
168+
169+ - name : Cache .build
170+ if : steps.restore-cache.outputs.cache-hit != 'true'
171+ uses : actions/cache/save@v4
172+ with :
173+ path : .build
174+ key : " spi-release-build-${{ runner.os }}-${{ github.event.after }}"
175+
176+ - name : Test release
177+ run : |
154178 $(swift build --show-bin-path -c release)/Run serve --port 8080 --hostname 0.0.0.0 &
155179 sleep 10
156180 echo Probing api/version...
You can’t perform that action at this time.
0 commit comments