Skip to content

Commit

Permalink
ci: cache build state (#448)
Browse files Browse the repository at this point in the history
* ci: cache build state

* Update ci.yml

* Update ci.yml

* Update ci.yml
  • Loading branch information
jjm2473 authored Jan 21, 2025
1 parent 9a05545 commit e2300fb
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ jobs:
runs-on: ubuntu-latest
name: Build Meta
steps:
- name: Checkout
uses: actions/checkout@main
with:
path: 'meta'
fetch-depth: 5

- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -42,6 +36,23 @@ jobs:
sudo timedatectl set-timezone "$TZ"
# curl -fsSL https://raw.githubusercontent.com/P3TERX/dotfiles/master/.bashrc >> ~/.bashrc
- name: 'Restore state from cache'
id: build-cache
uses: actions/cache@v3
with:
path: |
meta/.git
cache
key: meta-build-cache-v1-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
meta-build-cache-v1-${{ github.ref_name }}-
enableCrossOsArchive: true

- name: Checkout
uses: actions/checkout@main
with:
path: 'meta'

- name: 'Restore SDK from cache'
id: sdk-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -95,6 +106,8 @@ jobs:
- name: Update feeds
run: |
[ -d cache/feeds ] || mkdir -p cache/feeds
ln -s `pwd`/cache/feeds ${SDK_NAME}/feeds
cd ${SDK_NAME} && ./scripts/feeds update compat meta
./scripts/feeds install -a -p compat -d y
./scripts/feeds install -a -p meta -d y
Expand Down

0 comments on commit e2300fb

Please sign in to comment.