]> git.ozlabs.org Git - ppp.git/blob - .github/workflows/buildroot.yaml
Improved Buildroot CI build speed by providing precompiled Buildroot images. (#332)
[ppp.git] / .github / workflows / buildroot.yaml
1 name: Buildroot
2 on: [push, pull_request]
3
4 jobs:
5   buildroot:
6     name: Buildroot
7     runs-on: ubuntu-20.04
8     strategy:
9       matrix:
10         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]
11         libc_name: [glibc, uclibc, musl]
12     env:
13       PPP_CI_VERSION: v1.0
14       BUILDROOT_DIRECTORY_NAME: buildroot-${{ matrix.defconfig_name }}-${{ matrix.libc_name }}
15     steps:
16       - name: Retrieve prebuilt Buildroot image...
17         working-directory: /home/runner
18         run: |
19           wget https://github.com/ppp-project/ppp-ci/releases/download/${{ env.PPP_CI_VERSION }}/${{ env.BUILDROOT_DIRECTORY_NAME }}.tar.zst
20           tar -xf ${{ env.BUILDROOT_DIRECTORY_NAME }}.tar.zst
21       - name: Select latest PPP upstream version
22         working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }}/package/pppd
23         run: |
24           # Get package sources from head of current branch
25           sed -i "/PPPD_VERSION =/c\\PPPD_VERSION = ${GITHUB_SHA}" pppd.mk
26       - name: Trigger a PPP package rebuild
27         working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }}/output/build
28         run: rm -rf pppd*
29       - name: Build
30         working-directory: /home/runner/${{ env.BUILDROOT_DIRECTORY_NAME }}
31         run: make