Skip to content

bananapi: switch to skiff-init-squashfs #2850

bananapi: switch to skiff-init-squashfs

bananapi: switch to skiff-init-squashfs #2850

Workflow file for this run

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: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Update the submodule
run: |
cd $GITHUB_WORKSPACE
git submodule update --init --recursive
- name: Cache build cache and downloads
uses: actions/cache@v3
env:
cache-name: cache-buildroot
with:
path: ~/br-cache/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Clear caches if necessary
run: |
# necessary to save space
if [ ! -f ~/br-cache/ccache-v4 ]; then
echo "Clearing old compiler cache..."
rm -rf ~/br-cache/ccache* || true
mkdir -p ~/br-cache/ccache
touch ~/br-cache/ccache-v4
fi
if [ ! -f ~/br-cache/dl-v4 ]; then
echo "Clearing old downloads cache..."
rm -rf ~/br-cache/dl* || true
mkdir -p ~/br-cache/dl
touch ~/br-cache/dl-v4
fi
- name: Install buildroot apt deps
run: |
sudo apt-get install -y libelf-dev python3-magic
- 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: Build a Docker container image
run: |
cd $GITHUB_WORKSPACE
export TERM=xterm
export BR2_CCACHE_DIR=${HOME}/br-cache/ccache
export BR2_DL_DIR=${HOME}/br-cache/dl
export SKIFF_WORKSPACE=docker
export SKIFF_CONFIG=virt/docker,core/gentoo
make -s configure compile check
echo "Compilation complete, building Docker image..."
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
- uses: actions/upload-artifact@v3
with:
name: docker-image.tar
path: ${{ github.workspace }}/workflow-artifacts/docker-image.tar