Skip to content

Commit e90ddf0

Browse files
committed
Cache .cosmocc and o for github workflows
Uses GitHub’s actions/cache@v4 to store the cosmocc distribution and the output directory between runs of the build workflow, with the version of cosmocc as the cache key. Upgrades to actions/checkout@v4.
1 parent fbc4fcb commit e90ddf0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: build
22

3+
env:
4+
COSMOCC_VERSION: 3.9.2
5+
36
on:
47
push:
58
branches:
@@ -19,7 +22,17 @@ jobs:
1922
matrix:
2023
mode: ["", tiny, rel, tinylinux, optlinux]
2124
steps:
22-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
26+
27+
- uses: actions/cache@v4
28+
with:
29+
path: .cosmocc/$COSMOCC_VERSION
30+
key: cosmocc-$COSMOCC_VERSION
31+
32+
- uses: actions/cache@v4
33+
with:
34+
path: o
35+
key: o-$COSMOCC_VERSION
2336

2437
- name: support ape bins 1
2538
run: sudo cp build/bootstrap/ape.elf /usr/bin/ape

0 commit comments

Comments
 (0)