mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-06 04:32:28 +00:00
Cache .cosmocc and o for github workflows (#1400)
Some checks failed
build / matrix_on_mode () (push) Has been cancelled
build / matrix_on_mode (optlinux) (push) Has been cancelled
build / matrix_on_mode (rel) (push) Has been cancelled
build / matrix_on_mode (tiny) (push) Has been cancelled
build / matrix_on_mode (tinylinux) (push) Has been cancelled
Some checks failed
build / matrix_on_mode () (push) Has been cancelled
build / matrix_on_mode (optlinux) (push) Has been cancelled
build / matrix_on_mode (rel) (push) Has been cancelled
build / matrix_on_mode (tiny) (push) Has been cancelled
build / matrix_on_mode (tinylinux) (push) Has been cancelled
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:
parent
66d1050af6
commit
9c68bc19b5
1 changed files with 25 additions and 2 deletions
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
|
@ -1,5 +1,8 @@
|
||||||
name: build
|
name: build
|
||||||
|
|
||||||
|
env:
|
||||||
|
COSMOCC_VERSION: 3.9.2
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
@ -19,10 +22,30 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
mode: ["", tiny, rel, tinylinux, optlinux]
|
mode: ["", tiny, rel, tinylinux, optlinux]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
# Full checkout needed for git-restore-mtime-bare.
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# TODO(jart): fork this action.
|
||||||
|
- uses: chetan/git-restore-mtime-action@v2
|
||||||
|
|
||||||
|
- 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 }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
o-${{ matrix.mode }}-${{ env.COSMOCC_VERSION }}-
|
||||||
|
o-${{ matrix.mode }}-
|
||||||
|
o-
|
||||||
|
|
||||||
- name: support ape bins 1
|
- name: support ape bins 1
|
||||||
run: sudo cp build/bootstrap/ape.elf /usr/bin/ape
|
run: sudo cp -a build/bootstrap/ape.elf /usr/bin/ape
|
||||||
|
|
||||||
- name: support ape bins 2
|
- name: support ape bins 2
|
||||||
run: sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
|
run: sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue