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.
This commit is contained in:
Steven Dee (Jōshin) 2025-04-17 13:45:52 -07:00
parent 66d1050af6
commit 03e07bfe4b
No known key found for this signature in database

View file

@ -1,5 +1,8 @@
name: build
env:
COSMOCC_VERSION: 3.9.2
on:
push:
branches:
@ -19,7 +22,20 @@ jobs:
matrix:
mode: ["", tiny, rel, tinylinux, optlinux]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: .cosmocc/${{ env.COSMOCC_VERSION }}
key: cosmocc-${{ env.COSMOCC_VERSION }}
- uses: actions/cache@v4
with:
path: o
key: o-${{ matrix.mode }}-${{ env.COSMOCC_VERSION }}
restore-keys: |
o-${{ matrix.mode }}-
o-
- name: support ape bins 1
run: sudo cp build/bootstrap/ape.elf /usr/bin/ape