Skip to content

Commit

Permalink
Use separate cache for kas-uefi-sb + build kas-uefi-sb in weekly work…
Browse files Browse the repository at this point in the history
…flow

Signed-off-by: Pawel Langowski <pawel.langowski@3mdeb.com>
  • Loading branch information
PLangowski committed Feb 7, 2025
1 parent 674aa80 commit 8f2f4ac
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ jobs:
if: ${{ inputs.cacheless }}
shell: bash
run: |
sed -i '/cache.yml/d' "${{ inputs.kas-path }}"
if [ ${{inputs.kas-path}} == "meta-dts/kas-uefi-sb.yml" ]; then
sed -i '/cache-uefi-sb.yml/d' "${{ inputs.kas-path }}"
else
sed -i '/cache.yml/d' "${{ inputs.kas-path }}"
fi
- name: Build DTS image
shell: bash
id: build_image
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,25 @@ concurrency:
group: run-only-one-workflow

jobs:
build-uefi-sb:
uses: ./.github/workflows/build.yml
with:
cacheless: true
kas-path: meta-dts/kas-uefi-sb.yml
move-build-artifacts:
needs: build-uefi-sb
runs-on:
labels: dts-builder
steps:
- name: Move UEFI SB build artifacts
run: |
mv build build-sb
build:
needs: move-build-artifacts
uses: ./.github/workflows/build.yml
with:
cacheless: true
kas-path: meta-dts/kas.yml

deploy-cache:
name: Deploy cache on cache.dasharo.com
needs: build
Expand All @@ -32,11 +45,14 @@ jobs:
shell: bash
run: |
ssh -i ~/.ssh/dts-ci-key builder@10.1.40.2 "mkdir -p cache/yocto/dts"
ssh -i ~/.ssh/dts-ci-key builder@10.1.40.2 "mkdir -p cache/yocto/dts/dts-uefi-sb"
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build/sstate-cache builder@10.1.40.2:cache/yocto/dts
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build-uefi-sb/sstate-cache builder@10.1.40.2:cache/yocto/dts/dts-uefi-sb
- name: Send downloads folder to cache.dasharo.com
shell: bash
run: |
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build/downloads builder@10.1.40.2:cache/yocto/dts
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build-uefi-sb/downloads builder@10.1.40.2:cache/yocto/dts/dts-uefi-sb
cleanup:
name: Cleanup
if: always()
Expand All @@ -48,4 +64,4 @@ jobs:
shell: bash
run: |
rm -rf ~/.ssh/dts-ci-key
rm -rf build
rm -rf build build-sb
2 changes: 1 addition & 1 deletion kas-uefi-sb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ header:
version: 11
includes:
- kas/common.yml
- kas/cache.yml
- kas/cache-uefi-sb.yml

distro: dts-sb-distro
machine: genericx86-64
Expand Down
13 changes: 13 additions & 0 deletions kas/cache-uefi-sb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
header:
version: 11

local_conf_header:
yocto-cache: |
SSTATE_MIRRORS ?= "file://.* http://${LOCAL_PREMIRROR_SERVER}/${PROJECT_NAME}/sstate-cache/PATH"
SOURCE_MIRROR_URL ?= "http://${LOCAL_PREMIRROR_SERVER}/${PROJECT_NAME}/downloads"
INHERIT += "own-mirrors"
LOCAL_PREMIRROR_SERVER ?= "cache.dasharo.com"
PROJECT_NAME ?= "yocto/dts/dts-uefi-sb"
BB_SIGNATURE_HANDLER = "OEBasicHash"
BB_HASHSERVE = ""

0 comments on commit 8f2f4ac

Please sign in to comment.