-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from RICCIARDI-Adrien/ci_use_improved_buildro…
…ot_images CI: use improved buildroot images.
- Loading branch information
Showing
1 changed file
with
30 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,42 @@ | ||
name: Buildroot | ||
on: | ||
workflow_run: | ||
workflows: [Linux] | ||
types: | ||
- completed | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
buildroot: | ||
# Only run this job if the triggering job (Linux) passed | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
defconfig_name: [qemu_x86_defconfig, qemu_x86_64_defconfig, raspberrypi4_defconfig, raspberrypi4_64_defconfig, qemu_ppc64le_pseries_defconfig, qemu_mips32r2_malta_defconfig, qemu_mips64_malta_defconfig] | ||
libc_name: [glibc, uclibc, musl] | ||
defconfig_name: | ||
- qemu_x86_defconfig | ||
- qemu_x86_64_defconfig | ||
- raspberrypi4_defconfig | ||
- raspberrypi4_64_defconfig | ||
- qemu_ppc64le_pseries_defconfig | ||
- qemu_mips32r2_malta_defconfig | ||
- qemu_mips64_malta_defconfig | ||
- qemu_riscv32_virt_defconfig | ||
- qemu_riscv64_virt_defconfig | ||
libc_name: | ||
- glibc | ||
- uclibc | ||
- musl | ||
env: | ||
CI_VERSION: v1.0 | ||
BUILDROOT_DIRECTORY_NAME: buildroot-${{ matrix.defconfig_name }}-${{ matrix.libc_name }} | ||
steps: | ||
- name: Checkout Buildroot sources | ||
# Builroot 2021.02 is the first stable version to natively support radvd 2.19, this avoids a lot of package modifications | ||
run: git clone --depth=1 --branch=2021.02 https://git.busybox.net/buildroot | ||
- name: Select latest radvd development version | ||
working-directory: buildroot/package/radvd | ||
- name: Retrieve prebuilt Buildroot image | ||
working-directory: /home/runner | ||
run: | | ||
# Do not check for package hash, so there is no need to compute it | ||
rm radvd.hash | ||
# Get package sources from head of master branch | ||
sed -i "/RADVD_VERSION =/c\\RADVD_VERSION = ${GITHUB_SHA}" radvd.mk | ||
sed -i '/RADVD_SITE =/c\\RADVD_SITE = https://github.com/radvd-project/radvd' radvd.mk | ||
sed -i '9iRADVD_SITE_METHOD = git' radvd.mk | ||
# Autotools "configure" script is missing, tell Buildroot to generate it before building | ||
sed -i '18iRADVD_AUTORECONF = YES' radvd.mk | ||
- name: Enable radvd build | ||
working-directory: buildroot | ||
wget https://github.com/radvd-project/radvd-ci/releases/download/${{ env.CI_VERSION }}/${{ env.BUILDROOT_DIRECTORY_NAME }}.tar.zst | ||
tar --zstd --strip-components=2 -xf ${{ env.BUILDROOT_DIRECTORY_NAME }}.tar.zst | ||
- name: Select the latest radvd upstream version | ||
working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }}/package/radvd | ||
run: | | ||
echo "BR2_PACKAGE_RADVD=y" >> configs/${{ matrix.defconfig_name }} | ||
- name: Select glibc | ||
if: ${{ matrix.libc_name == 'glibc' }} | ||
working-directory: buildroot | ||
run: echo "BR2_TOOLCHAIN_BUILDROOT_GLIBC=y" >> configs/${{ matrix.defconfig_name }} | ||
- name: Select uClibc | ||
if: ${{ matrix.libc_name == 'uclibc' }} | ||
working-directory: buildroot | ||
run: echo "BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y" >> configs/${{ matrix.defconfig_name }} | ||
- name: Select musl | ||
if: ${{ matrix.libc_name == 'musl' }} | ||
working-directory: buildroot | ||
run: echo "BR2_TOOLCHAIN_BUILDROOT_MUSL=y" >> configs/${{ matrix.defconfig_name }} | ||
- name: Configure Buildroot | ||
working-directory: buildroot | ||
run: make ${{ matrix.defconfig_name }} | ||
# Get package sources from head of current branch | ||
sed -i "/RADVD_VERSION =/c\\RADVD_VERSION = ${GITHUB_SHA}" radvd.mk | ||
- name: Trigger a radvd package rebuild | ||
working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }}/output/build | ||
run: rm -rf radvd* | ||
- name: Build | ||
working-directory: buildroot | ||
working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }} | ||
run: make |