diff options
author | Denys Fedoryshchenko <denys.f@collabora.com> | 2024-05-27 02:01:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-27 02:01:56 +0300 |
commit | bf7b43e7d10d2a5719438a27cb8a3400ce52e06e (patch) | |
tree | 567b3a8e8379d196554593c322e534311a6621ff | |
parent | 61fe62707c3eee66d9c228f7e0f2126575b83692 (diff) | |
parent | bf00b2eb73e8411360292337fa2f889b38788acb (diff) | |
download | accel-ppp-bf7b43e7d10d2a5719438a27cb8a3400ce52e06e.tar.gz accel-ppp-bf7b43e7d10d2a5719438a27cb8a3400ce52e06e.zip |
Merge pull request #143 from svlobanov/gh-ubuntu-24-04
ci: use ubuntu 24.04 as default runner in github
-rw-r--r-- | .github/workflows/build-and-run.yml | 40 | ||||
-rw-r--r-- | .github/workflows/run-tests.yml | 26 |
2 files changed, 34 insertions, 32 deletions
diff --git a/.github/workflows/build-and-run.yml b/.github/workflows/build-and-run.yml index 2fbc9388..d788eda3 100644 --- a/.github/workflows/build-and-run.yml +++ b/.github/workflows/build-and-run.yml @@ -13,19 +13,18 @@ jobs: strategy: fail-fast: false matrix: - distro: ["ubuntu-22.04", "ubuntu-20.04"] + include: + - distro: ubuntu-20.04 + pkg-distro: ubuntu20.04 + cpack-type: Ubuntu20 + - distro: ubuntu-22.04 + pkg-distro: ubuntu22.04 + cpack-type: Ubuntu22 + - distro: ubuntu-24.04 + pkg-distro: ubuntu24.04 + cpack-type: Ubuntu24 runs-on: ${{ matrix.distro }} steps: - - name: Set vars for Ubuntu 20.04 - if: ${{ matrix.distro == 'ubuntu-20.04' }} - run: | - echo "DISTRO=ubuntu20.04" >> $GITHUB_ENV - echo "CPACK_TYPE=Ubuntu20" >> $GITHUB_ENV - - name: Set vars for Ubuntu 22.04 - if: ${{ matrix.distro == 'ubuntu-22.04' }} - run: | - echo "DISTRO=ubuntu22.04" >> $GITHUB_ENV - echo "CPACK_TYPE=Ubuntu20" >> $GITHUB_ENV - name: Set common vars run: | echo UNAME_R=`uname -r` >> $GITHUB_ENV @@ -33,7 +32,8 @@ jobs: - name: Install build tools run: > sudo apt update && - sudo apt -y install git build-essential cmake gcc linux-headers-`uname -r` + NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true sudo -E apt -y install + git build-essential cmake gcc linux-headers-`uname -r` libpcre3-dev libssl-dev liblua5.1-0-dev kmod - name: Check out repository code uses: actions/checkout@v3 @@ -47,7 +47,7 @@ jobs: cmake -DBUILD_IPOE_DRIVER=TRUE -DBUILD_VLAN_MON_DRIVER=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DKDIR=/usr/src/linux-headers-`uname -r` -DLUA=TRUE -DSHAPER=FALSE -DRADIUS=TRUE - -DCPACK_TYPE=${{ env.CPACK_TYPE }} .. + -DCPACK_TYPE=${{ matrix.cpack-type }} .. - name: make working-directory: ./build run: make @@ -58,10 +58,10 @@ jobs: working-directory: ./build run: > mv -v accel-ppp.deb - accel-ppp_`git describe --tags --long | sed 's/^v//' | sed 's/-/+/' | sed 's/-/~/'`-1+${{ env.DISTRO }}_`uname -m`.deb + accel-ppp_`git describe --tags --long | sed 's/^v//' | sed 's/-/+/' | sed 's/-/~/'`-1+${{ matrix.pkg-distro }}_`uname -m`.deb - name: Install debian package working-directory: ./build - run: sudo apt -y install ./accel-ppp*.deb + run: NEEDRESTART_SUSPEND=1 sudo -E apt -y install ./accel-ppp*.deb - name: Copy default config run: sudo cp /etc/accel-ppp.conf.dist /etc/accel-ppp.conf - name: Start accel-ppp @@ -71,7 +71,7 @@ jobs: - name: Check accel-ppp stat run: accel-cmd show stat - name: Upload .deb package as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: deb-package-${{ matrix.distro }}-${{ env.UNAME_M }}-${{ env.UNAME_R }} path: build/accel-ppp_*.deb @@ -93,7 +93,7 @@ jobs: "ubuntu:22.04", "ubuntu:24.04" ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: image: ${{ matrix.distro }} steps: @@ -118,7 +118,7 @@ jobs: - 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 + NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt -y install git build-essential cmake gcc linux-headers-${{ env.HEADERS_SUFFIX }} libpcre3-dev libssl-dev liblua5.1-0-dev kmod - name: Get kernel name from headers @@ -163,7 +163,7 @@ jobs: - name: Check accel-ppp stat run: accel-cmd show stat - name: Upload .deb package as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: deb-package-${{ env.DISTRO }}-${{ env.UNAME_M }}-${{ env.KERNEL_NAME }} path: build/accel-ppp_*.deb @@ -218,7 +218,7 @@ jobs: run: accel-cmd show stat Build-in-Container-Alpine: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: image: alpine:latest steps: diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 95173b25..303dfd0a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,7 +10,7 @@ on: jobs: Test-in-Qemu: #if: ${{ false }} # disable for now - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: Test in Qemu (${{ matrix.distro }}) strategy: fail-fast: false @@ -53,14 +53,14 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 path: "accel-ppp" - name: Install qemu and required tools run: > sudo apt update && - sudo apt -y install qemu-system-x86 qemu-utils cloud-image-utils cpu-checker cloud-image-utils wget openssh-client screen + NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true sudo -E apt -y install qemu-system-x86 qemu-utils cloud-image-utils cpu-checker cloud-image-utils wget openssh-client screen - name: Check kvm support (fail is ok) run: sudo kvm-ok || exit 0 - name: Prepare cloud-init image disk @@ -193,23 +193,24 @@ jobs: strategy: fail-fast: false matrix: - distro: ["ubuntu-22.04", "ubuntu-20.04"] + distro: ["ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04"] runs-on: ${{ matrix.distro }} steps: - name: Install build tools (using apt) run: > sudo apt update && - sudo apt -y install git build-essential cmake gcc linux-headers-`uname -r` + NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true sudo -E apt -y install + git build-essential cmake gcc linux-headers-`uname -r` libpcre3-dev libssl-dev liblua5.1-0-dev kmod python3-pip iproute2 ppp pppoe isc-dhcp-client - name: Install testing tools (using pip) run: > - sudo pip3 install pytest pytest-dependency + sudo pip3 install pytest pytest-dependency || sudo pip3 install --break-system-packages pytest pytest-dependency - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -245,23 +246,24 @@ jobs: strategy: fail-fast: false matrix: - distro: ["ubuntu-22.04", "ubuntu-20.04"] + distro: ["ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04"] runs-on: ${{ matrix.distro }} steps: - name: Install build tools (using apt) run: > sudo apt update && - sudo apt -y install git build-essential cmake gcc linux-headers-`uname -r` + NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true sudo -E apt -y install + git build-essential cmake gcc linux-headers-`uname -r` libpcre3-dev libssl-dev liblua5.1-0-dev kmod python3-pip iproute2 ppp pppoe isc-dhcp-client - name: Install testing tools (using pip) run: > - sudo pip3 install pytest pytest-dependency gcovr + sudo pip3 install pytest pytest-dependency gcovr || sudo pip3 install --break-system-packages pytest pytest-dependency gcovr - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -305,7 +307,7 @@ jobs: - name: Upload coverage report # if: ${{ false }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-report-on-${{ matrix.distro }} path: tests/report/ |