- uses: cracicorp/setup@v1
- name: install system dependencies
# The deps come from the quick installation guide + we add `python3-websockets`
# so that we don't need to run `bitbake-setup install-buildtools`.
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential chrpath cpio debianutils diffstat file gawk gcc git \
iputils-ping libacl1 libcrypt-dev locales python3 python3-git \
python3-jinja2 python3-pexpect python3-pip python3-subunit \
python3-websockets socat texinfo unzip wget xz-utils zstd
if ! sudo grep -q '^en_US.UTF-8 UTF-8$' /etc/locale.gen; then
echo 'en_US.UTF-8 UTF-8' | sudo tee -a /etc/locale.gen >/dev/null
- name: create build directory
mkdir -p "$GITHUB_WORKSPACE/yocto"
working-directory: ${{ github.workspace }}/yocto
stat -c '%d %n' "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE/yocto"
YOCTO_DIR="$GITHUB_WORKSPACE/yocto"
BUILD_DIR="$YOCTO_DIR/bitbake-builds/poky-master/build"
[ -d bitbake ] || git clone https://git.openembedded.org/bitbake
./bitbake/bin/bitbake-setup settings set --global default top-dir-prefix "$YOCTO_DIR"
./bitbake/bin/bitbake-setup settings set --global default top-dir-name bitbake-builds
[ -f "$BUILD_DIR/init-build-env" ] ||
./bitbake/bin/bitbake-setup init --non-interactive poky-master poky distro/poky machine/qemux86-64
. "$BUILD_DIR/init-build-env"
# Specify SOURCE_MIRROR_URL to not use arbitrary mirrors which will not make it
# through the CRACI proxy. Ignore some tests that fail due to a bug in bitbake.
cat >> "$BUILD_DIR/conf/local.conf" <<'EOF'
SOURCE_MIRROR_URL = "https://downloads.yoctoproject.org/mirror/sources/"
BB_ALLOWED_NETWORKS = "downloads.yoctoproject.org"
INSANE_SKIP:util-linux-ptest += "buildpaths"