ci: add github workflow for smoke-building on pushes and PRs #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Kas | |
on: | |
pull_request: | |
branches: ["master", "kirkstone"] | |
push: | |
branches: ["master", "kirkstone"] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
kas: | |
- kas-poky-snapd.aarch64.yml | |
- kas-poky-snapd.x86_64.yml | |
# TODO: use large runners when available | |
runs-on: [self-hosted, Linux] | |
timeout-minutes: 240 | |
name: ${{ matrix.kas }} | |
env: | |
# On non-ephemeral workers, downloads and sstate is cached. | |
DL_DIR: /srv/meta-snapd/downloads | |
SSTATE_DIR: /srv/meta-snapd/sstate-cache | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo -E DEBIAN_FRONTEND=noninteractive apt install -y kas chrpath diffstat bzip2 cpp g++ gcc lz4 make rpcsvc-proto | |
kas --version | |
- name: Cache meta-layers | |
uses: actions/cache@v4 | |
with: | |
path: layers | |
key: master-layers | |
save-always: true | |
- name: Run kas checkout | |
run: | | |
kas checkout ${{ matrix.kas }} | |
- name: Run kas build | |
# This hack makes DL_DIR and SSTATE_DIR overrides compatible with kas 2.6.3 in Ubuntu 22.04 | |
run: | | |
kas shell kas-poky-snapd.yml -c 'printf "DL_DIR = \"%s\"\n" "$DL_DIR" >>conf/local.conf && printf "SSTATE_DIR = \"%s\"\n" "$SSTATE_DIR" >>conf/local.conf && bitbake snapd-demo-image' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: deploy-${{ matrix.kas }} | |
path: build/tmp/deploy/ | |
if-no-files-found: warn | |
retention-days: 1 | |
compression-level: 0 |