]> git.ozlabs.org Git - ppp.git/blob - .github/workflows/buildroot.yaml
e38656252b01c6c397d628a930cda99dc360444b
[ppp.git] / .github / workflows / buildroot.yaml
1 name: Buildroot
2 on: [push]
3
4 jobs:
5   buildroot:
6     runs-on: ubuntu-latest
7     strategy:
8       matrix:
9         defconfig_name: [qemu_x86_defconfig, qemu_x86_64_defconfig]
10         libc_name: [glibc, uclibc]
11     steps:
12       - name: Checkout Buildroot sources
13         run: git clone --depth=1 --branch=2020.11.1 https://git.busybox.net/buildroot
14       - name: Select latest PPP version
15         working-directory: buildroot/package/pppd
16         run: |
17           # Allow package to build when musl libc is selected
18           sed -i '/depends on !BR2_TOOLCHAIN_USES_MUSL/d' Config.in
19           # Upstream version always needs OpenSSL
20           sed -i '/select BR2_PACKAGE_OPENSSL/c\\select BR2_PACKAGE_OPENSSL' Config.in
21           # Do not check for package hash, so there is no need to compute it
22           rm pppd.hash
23           # Buildroot patch is already applied upstream
24           rm -f 0001-pppd-Fix-bounds-check.patch
25           # Get package sources from head of master branch
26           sed -i "/PPPD_VERSION =/c\\PPPD_VERSION = ${GITHUB_SHA}" pppd.mk
27           sed -i '/PPPD_SITE =/c\\PPPD_SITE = https://github.com/paulusmack/ppp' pppd.mk
28           sed -i '9iPPPD_SITE_METHOD = git' pppd.mk
29       - name: Enable PPP build
30         working-directory: buildroot
31         run: |
32           # Enable all Buildroot PPP options as everything is built by upstream build system
33           echo "BR2_PACKAGE_PPPD=y" >> configs/${{ matrix.defconfig_name }}
34           echo "BR2_PACKAGE_PPPD_FILTER=y" >> configs/${{ matrix.defconfig_name }}
35           echo "BR2_PACKAGE_PPPD_RADIUS=y" >> configs/${{ matrix.defconfig_name }}
36           echo "BR2_PACKAGE_PPPD_OVERWRITE_RESOLV_CONF=y" >> configs/${{ matrix.defconfig_name }}
37       - name: Configure Buildroot
38         working-directory: buildroot
39         run: make ${{ matrix.defconfig_name }}
40       - name: Build
41         working-directory: buildroot
42         run: make