Skip to content

buildroot: update to upstream #3221

buildroot: update to upstream

buildroot: update to upstream #3221

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: ${{ 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
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-v1 ]; then
echo "Clearing old compiler cache..."
rm -rf ~/br-cache/ccache* || true
mkdir -p ~/br-cache/ccache
touch ~/br-cache/ccache-v1
fi
if [ ! -f ~/br-cache/dl-v1 ]; then
echo "Clearing old downloads cache..."
rm -rf ~/br-cache/dl* || true
mkdir -p ~/br-cache/dl
touch ~/br-cache/dl-v1
fi
- 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