Skip to content

Commit

Permalink
.github/workflows/build: use pengutronix-hosted runner
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Luebbe <[email protected]>
  • Loading branch information
jluebbe committed Aug 23, 2024
1 parent e23b837 commit 001173f
Showing 1 changed file with 33 additions and 12 deletions.
45 changes: 33 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: build

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
push: {}
pull_request: {}
# allow rebuilding without a push
workflow_dispatch: {}

jobs:
build:
name: meta-rauc Build
runs-on: ubuntu-20.04
timeout-minutes: 720
# run on self-hosted runner for the main repo or if vars.BUILD_RUNS_ON is set
runs-on: >-
${{
(vars.BUILD_RUNS_ON != '' && fromJSON(vars.BUILD_RUNS_ON)) ||
(github.repository == 'rauc/meta-rauc' && fromJSON('["self-hosted", "forrest", "build"]')) ||
'ubuntu-20.04'
}}
# abort if it seems that we're rebuilding too much
timeout-minutes: 120
steps:
- name: Install required packages
run: |
Expand All @@ -30,9 +34,16 @@ jobs:
run: |
source poky/oe-init-build-env build
bitbake-layers add-layer ../meta-rauc
echo 'INHERIT += "rm_work"' >> conf/local.conf
if [ -f ~/.yocto/auto.conf ]; then
cp ~/.yocto/auto.conf conf/
else
echo 'SSTATE_MIRRORS = "file://.* https://github-runner.pengutronix.de/sstate-cache/PATH"' >> conf/auto.conf
echo 'BB_SIGNATURE_HANDLER = "OEBasicHash"' >> conf/auto.conf
echo 'BB_HASHSERVE = ""' >> conf/auto.conf
echo 'OPKGBUILDCMD = "opkg-build -Z gzip -a -1n"' >> conf/auto.conf
echo 'INHERIT += "rm_work"' >> conf/auto.conf
fi
echo 'DISTRO_FEATURES:remove = "alsa bluetooth usbgadget usbhost wifi nfs zeroconf pci 3g nfc x11 opengl ptest wayland vulkan"' >> conf/local.conf
echo 'SSTATE_MIRRORS = "file://.* http://195.201.147.117/sstate-cache/PATH"' >> conf/local.conf
- name: Build rauc, rauc-native
run: |
source poky/oe-init-build-env build
Expand All @@ -58,3 +69,13 @@ jobs:
source poky/oe-init-build-env build
bitbake-layers add-layer ../meta-openembedded/meta-python
bitbake rauc-hawkbit
- name: Cache Data
env:
CACHE_KEY: ${{ secrets.YOCTO_CACHE_KEY }}
if: ${{ env.CACHE_KEY }}
run: |
mkdir -p ~/.ssh
echo "$CACHE_KEY" >> ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
rsync -rvx --ignore-existing build/downloads yocto-cache: || true
rsync -rvx --ignore-existing build/sstate-cache yocto-cache: || true

0 comments on commit 001173f

Please sign in to comment.