Skip to content

.github: add workflow for builds #7

.github: add workflow for builds

.github: add workflow for builds #7

Workflow file for this run

name: Build ADI br2-external
on:
push:
pull_request:
env:
BR2_DL_DIR: $HOME/.buildroot-dl
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
defconfig:
- adi_sc598_ezkit_defconfig
steps:
- name: Checkout br2-external
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Buildroot dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential git gcc g++ make bc unzip file rsync \
cpio wget python3
- name: Prepare Buildroot download dir
run: mkdir -p "$BR2_DL_DIR"
- name: Cache Buildroot downloads
uses: actions/cache@v4
with:
path: ${{ env.BR2_DL_DIR }}
key: ${{ runner.os }}-buildroot-dl-${{ hashFiles('configs/**/*.fragment', 'configs/**/*.defconfig') }}
restore-keys: |
${{ runner.os }}-buildroot-dl-
- name: Build image for ${{ matrix.defconfig }}
run: |
cd buildroot
echo ">>> Selecting defconfig: ${{ matrix.defconfig }}"
make BR2_EXTERNAL="${GITHUB_WORKSPACE}" ${{ matrix.defconfig }}
# Merge your fragments if they exist
if [ -f "${GITHUB_WORKSPACE}/configs/buildroot.fragment" ] || \
[ -f "${GITHUB_WORKSPACE}/configs/debug.fragment" ]; then
support/kconfig/merge_config.sh .config \
"${GITHUB_WORKSPACE}/configs/buildroot.fragment" \
"${GITHUB_WORKSPACE}/configs/debug.fragment"
fi
make -j$(nproc)
- name: Upload Buildroot images for ${{ matrix.defconfig }}
if: success()
uses: actions/upload-artifact@v4
with:
name: images-${{ matrix.defconfig }}
path: buildroot/output/images
- name: Upload logs for ${{ matrix.defconfig }} (failure only)
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.defconfig }}
path: buildroot/output/build