virt/incus: add support for running as incus container #3310
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: CI | |
# Controls when the action will run. | |
on: | |
push: | |
branches: [master, next, stable, staging] | |
pull_request: | |
branches: [master, next, stable, staging] | |
jobs: | |
build: | |
runs-on: ${{ matrix.build-os }} | |
strategy: | |
matrix: | |
build-os: [ubuntu-latest, ubuntu-22.04] | |
env: | |
'SKIFF_WORKSPACE': docker | |
'SKIFF_CONFIG': virt/docker,core/gentoo | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update the submodule | |
run: | | |
cd $GITHUB_WORKSPACE | |
git submodule update --init --recursive | |
- name: Cache build cache and downloads | |
uses: actions/cache@v4 | |
with: | |
path: ~/br-cache/ | |
# https://github.com/actions/toolkit/issues/505#issuecomment-1650290249 | |
key: buildroot-r1-h${{ hashFiles('buildroot/Makefile') }}-${{ matrix.build-os }} | |
restore-keys: | | |
buildroot-r1 | |
- name: Install buildroot apt deps | |
run: | | |
sudo apt-get install -y libelf-dev python3-magic python3-flake8 | |
- name: Print help and packages list | |
run: | | |
cd $GITHUB_WORKSPACE | |
make help | |
- name: Enable using a pre-built toolchain | |
run: | | |
cd $GITHUB_WORKSPACE | |
echo "BR2_TOOLCHAIN_EXTERNAL=y" > ./overrides/buildroot/toolchain | |
- name: Compile the OS | |
run: | | |
cd $GITHUB_WORKSPACE | |
export TERM=xterm | |
export BR2_CCACHE_DIR=${HOME}/br-cache/ccache | |
export BR2_DL_DIR=${HOME}/br-cache/dl | |
make -s configure compile check | |
- name: Build a Docker container image | |
run: | | |
cd $GITHUB_WORKSPACE | |
make cmd/virt/docker/buildimage | |
sleep 2 # docker sometimes does not tag right away | |
mkdir -p workflow-artifacts | |
docker save skiffos/skiffos:latest > ./workflow-artifacts/docker-image.tar | |
# Upload docker image | |
- name: Upload Docker container image artifact | |
if: matrix.build-os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docker-image.tar | |
path: ${{ github.workspace }}/workflow-artifacts/docker-image.tar | |