X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=.github%2Fworkflows%2Fbuildroot.yaml;h=a131f94b5e176ac3a9eb7f5d3e49096ad750bf03;hb=20fa5e803ff90eb9c90055afd679d1f2c00932bf;hp=a80353b4d2f6d64a0839f7ea2c06b73ae2fd0f73;hpb=01312898eedc2c1e97bdf525381b0987c8e8b0b1;p=ppp.git diff --git a/.github/workflows/buildroot.yaml b/.github/workflows/buildroot.yaml index a80353b..a131f94 100644 --- a/.github/workflows/buildroot.yaml +++ b/.github/workflows/buildroot.yaml @@ -1,29 +1,31 @@ name: Buildroot -on: [push] +on: [push, pull_request] jobs: - matrix_build: - runs-on: ubuntu-latest + buildroot: + name: Buildroot + runs-on: ubuntu-20.04 strategy: matrix: - defconfig_name: [qemu_x86_defconfig, qemu_x86_64_defconfig] + 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] + env: + PPP_CI_VERSION: v1.0 + BUILDROOT_DIRECTORY_NAME: buildroot-${{ matrix.defconfig_name }}-${{ matrix.libc_name }} steps: - - name: Checkout Buildroot sources - run: git clone --depth=1 --branch=2020.11.1 https://git.busybox.net/buildroot - - name: Select latest PPP version - working-directory: buildroot/package/pppd + - name: Retrieve prebuilt Buildroot image... + working-directory: /home/runner run: | - # Allow package to build when musl libc is selected - sed -i '/depends on !BR2_TOOLCHAIN_USES_MUSL/d' Config.in - # Do not check for package hash, so there is no need to compute it - rm pppd.hash - # Get package sources from head of master branch - sed -i '/PPPD_VERSION =/c\\PPPD_VERSION = master' pppd.mk - sed -i '/PPPD_SITE =/c\\PPPD_SITE = https://github.com/paulusmack/ppp' pppd.mk - sed -i '9iPPPD_MUSL_SITE_METHOD = git' pppd.mk - - name: Enable PPP build - working-directory: buildroot + wget https://github.com/ppp-project/ppp-ci/releases/download/${{ env.PPP_CI_VERSION }}/${{ env.BUILDROOT_DIRECTORY_NAME }}.tar.zst + tar -xf ${{ env.BUILDROOT_DIRECTORY_NAME }}.tar.zst + - name: Select latest PPP upstream version + working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }}/package/pppd run: | - echo "BR2_PACKAGE_PPPD=y" >> configs/${{ matrix.defconfig_name }} - # TODO enable other PPP package options if needed - cat configs/${{ matrix.defconfig_name }} + # Get package sources from head of current branch + sed -i "/PPPD_VERSION =/c\\PPPD_VERSION = ${GITHUB_SHA}" pppd.mk + - name: Trigger a PPP package rebuild + working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }}/output/build + run: rm -rf pppd* + - name: Build + working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }} + run: make