Ci/gitea actions #1

Open
druppy wants to merge 11 commits from ci/gitea-actions into main
pull from: ci/gitea-actions
Showing only changes of commit 4a645bab2d - Show all commits
+11 -14
View File
@@ -2,16 +2,13 @@ name: Build RPi image
# Yocto (kas) build of rpilinux-image for raspberrypi4-64. # Yocto (kas) build of rpilinux-image for raspberrypi4-64.
# #
# Runner requirements (see chat/notes): # Runs on the dedicated host runner (label "yocto:host", Ryzen 9 box).
# - matches the instance runner's "ubuntu-latest" label (bare label = job # Everything persists in $YOCTO_HOME: extern/ (layer clones) + build/ (sstate)
# runs on the runner's machine, i.e. a host job). Yocto needs ~250GB # survive between runs -> incremental builds after the first.
# persistent disk, so the runner must actually be a machine (or a # $YOCTO_HOME defaults to $HOME/yocto-ci; override it via runner.envs
# container with a big persistent volume), not a throwaway sandbox. # (runner.envs.YOCTO_HOME=/data/yocto-ci) to put it on the big disk.
# - ~250GB free in $HOME, plus the poky host dependencies + node
# - runner.timeout >= 8h for the first build (runner default is 3h)
# #
# Upgrade path: register a dedicated runner with label "yocto:host" and # First build takes hours (poky fetch + full image) -> runner.timeout >= 8h.
# change runs-on below to "yocto".
on: on:
push: push:
@@ -28,7 +25,7 @@ permissions:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: yocto
timeout-minutes: 600 timeout-minutes: 600
steps: steps:
- uses: builtin:checkout - uses: builtin:checkout
@@ -52,7 +49,7 @@ jobs:
echo "::error::Missing host tools:$missing" echo "::error::Missing host tools:$missing"
echo "Install on the runner host, e.g.:" echo "Install on the runner host, e.g.:"
echo ' sudo apt-get install -y --no-install-recommends build-essential \ echo ' sudo apt-get install -y --no-install-recommends build-essential \
bison chrpath curl diffstat file gawk git libpython3-dev libssl-dev \ bison flex chrpath curl diffstat file gawk git libpython3-dev libssl-dev \
make python3 python3-venv python3-pip python3-dev rsync swig unzip \ make python3 python3-venv python3-pip python3-dev rsync swig unzip \
wget xz-utils zstd bzip2 nodejs npm' wget xz-utils zstd bzip2 nodejs npm'
exit 1 exit 1
@@ -61,7 +58,7 @@ jobs:
- name: Set up kas (persistent venv) - name: Set up kas (persistent venv)
run: | run: |
set -e set -e
export YOCTO_HOME="$HOME/yocto-ci" export YOCTO_HOME="${YOCTO_HOME:-$HOME/yocto-ci}"
mkdir -p "$YOCTO_HOME" mkdir -p "$YOCTO_HOME"
[ -d "$YOCTO_HOME/venv" ] || python3 -m venv "$YOCTO_HOME/venv" [ -d "$YOCTO_HOME/venv" ] || python3 -m venv "$YOCTO_HOME/venv"
"$YOCTO_HOME/venv/bin/pip" -q install -U kas "$YOCTO_HOME/venv/bin/pip" -q install -U kas
@@ -70,7 +67,7 @@ jobs:
- name: Sync to persistent project dir and build - name: Sync to persistent project dir and build
run: | run: |
set -euo pipefail set -euo pipefail
export YOCTO_HOME="$HOME/yocto-ci" export YOCTO_HOME="${YOCTO_HOME:-$HOME/yocto-ci}"
# Persistent project dir: keeps extern/ (layer clones) and build/ # Persistent project dir: keeps extern/ (layer clones) and build/
# (sstate + tmp) between runs -> incremental builds after the first. # (sstate + tmp) between runs -> incremental builds after the first.
rsync -a --delete \ rsync -a --delete \
@@ -83,7 +80,7 @@ jobs:
- name: Collect images - name: Collect images
run: | run: |
set -euo pipefail set -euo pipefail
export YOCTO_HOME="$HOME/yocto-ci" export YOCTO_HOME="${YOCTO_HOME:-$HOME/yocto-ci}"
cd "$YOCTO_HOME/yocto_rpi" cd "$YOCTO_HOME/yocto_rpi"
IMG_DIR="build/*/tmp/deploy/images/raspberrypi4-64" IMG_DIR="build/*/tmp/deploy/images/raspberrypi4-64"
ls -lh $IMG_DIR ls -lh $IMG_DIR