Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-yocto: cleanup sstate-cache #45

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 10 additions & 46 deletions .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,12 @@ on:
- main

jobs:
kas-lock:
runs-on: [self-hosted, x86]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run kas lock
run: |
kas dump --update --lock --inplace ci/base.yml

- uses: actions/upload-artifact@v4
with:
name: kas-lock
path: ci/*.lock.yml

yocto-check-layer:
needs: kas-lock
runs-on: [self-hosted, x86]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/download-artifact@v4
with:
name: kas-lock
path: ci/*.lock.yml

- name: Run yocto-check-layer
run: |
ci/yocto-check-layer.sh

compile:
needs: kas-lock
env:
CACHE_DIR: /srv/gh-runners/quic-yocto
DL_DIR: ${{ env.CACHE_DIR }}/downloads
SSTATE_DIR: ${{ env.CACHE_DIR }}/sstate-cache
KAS_WORK_DIR: ${{ env.GITHUB_WORKSPACE }}/../kas
strategy:
fail-fast: true
matrix:
Expand All @@ -56,16 +27,9 @@ jobs:
with:
fetch-depth: 0

- uses: actions/download-artifact@v4
with:
name: kas-lock
path: ci/*.lock.yml

- name: Kas build
- name: Cleanup sstate-cache
run: |
export CACHE_DIR=/srv/gh-runners/quic-yocto
export DL_DIR=${CACHE_DIR}/downloads
export SSTATE_DIR=${CACHE_DIR}/sstate-cache
export KAS_WORK_DIR=$PWD/../kas
mkdir $KAS_WORK_DIR
kas build ci/mirror.yml:ci/${{ matrix.machine }}.yml
SSTATE_CACHE_MANAGEMENT="${PWD}/poky/scripts/sstate-cache-management.py --cache-dir ${{ env.SSTATE_DIR }} --remove-duplicated --remove-orphans --debug"
#FIXME: only to check, when done remove the "echo no" and add the "--yes" arg
SSTATE_CACHE_MANAGEMENT="echo no | $SSTATE_CACHE_MANAGEMENT"
kas shell ci/${{ matrix.machine }}.yml --command "$SSTATE_CACHE_MANAGEMENT"
Loading