summaryrefslogtreecommitdiff
path: root/.github/workflows/build-and-run.yml
diff options
context:
space:
mode:
authorSergey V. Lobanov <sergey@lobanov.in>2023-10-06 22:48:59 +0200
committerSergey V. Lobanov <sergey@lobanov.in>2023-10-06 23:23:03 +0200
commit843de59cf8afc58edc603279b610d2b469c968a1 (patch)
tree5d12a23e72c719a8b5995c7b100867dc582a7ffa /.github/workflows/build-and-run.yml
parent2ce73b1e521ad9a79324ca48803149119fce6b79 (diff)
downloadaccel-ppp-843de59cf8afc58edc603279b610d2b469c968a1.tar.gz
accel-ppp-843de59cf8afc58edc603279b610d2b469c968a1.zip
ci: add build for mainline kernel
Diffstat (limited to '.github/workflows/build-and-run.yml')
-rw-r--r--.github/workflows/build-and-run.yml48
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/build-and-run.yml b/.github/workflows/build-and-run.yml
index 0fefd5e9..863be7f8 100644
--- a/.github/workflows/build-and-run.yml
+++ b/.github/workflows/build-and-run.yml
@@ -165,3 +165,51 @@ jobs:
name: deb-package-${{ env.DISTRO }}-${{ env.UNAME_M }}-${{ env.KERNEL_NAME }}
path: build/accel-ppp_*.deb
if-no-files-found: error
+
+ Build-in-Container-Mainline:
+ #if: ${{ false }} # disable for now
+ runs-on: ubuntu-latest
+ container:
+ image: ubuntu:devel
+ steps:
+ - name: Install build tools
+ run: >
+ apt update && apt -y upgrade && apt -y dist-upgrade &&
+ DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt -y install git build-essential cmake gcc
+ linux-headers-generic libpcre3-dev libssl-dev liblua5.1-0-dev kmod software-properties-common
+ pkexec dbus linux-base &&
+ add-apt-repository -y ppa:cappelikan/ppa && apt update &&
+ service dbus start &&
+ apt -y install mainline &&
+ mainline --include-rc install-latest &&
+ apt -y purge linux-headers-generic && apt -y autoremove
+ - name: Get kernel name from headers
+ run: >
+ echo KERNEL_NAME=`ls -1 /usr/src/ | grep 'linux-headers.*generic' |
+ sed 's/linux-headers-//'` >> $GITHUB_ENV;
+ cat $GITHUB_ENV
+ - name: Check out repository code
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name: mkdir build
+ run: mkdir build
+ - name: Disable git security warnings
+ run: git config --global --add safe.directory '*'
+ - name: cmake
+ working-directory: ./build
+ run: >
+ cmake -DBUILD_IPOE_DRIVER=TRUE -DBUILD_VLAN_MON_DRIVER=TRUE -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc
+ -DKDIR=/usr/src/linux-headers-${{ env.KERNEL_NAME }}
+ -DMODULES_KDIR=${{ env.KERNEL_NAME }}
+ -DLUA=TRUE -DSHAPER=FALSE -DRADIUS=TRUE ..
+ - name: make and install
+ working-directory: ./build
+ run: make && make install
+ - name: Start accel-ppp with default config
+ run: accel-pppd -d -c /etc/accel-ppp.conf.dist
+ - name: Sleep for 1 sec
+ run: sleep 1
+ - name: Check accel-ppp stat
+ run: accel-cmd show stat