Skip to content

Commit

Permalink
ci: use ubuntu 24.04 as default runner in github
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey V. Lobanov <[email protected]>
  • Loading branch information
svlobanov committed May 25, 2024
1 parent 61fe627 commit bf00b2e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build-and-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ 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
echo UNAME_M=`uname -m` >> $GITHUB_ENV;
- 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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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/
Expand Down

0 comments on commit bf00b2e

Please sign in to comment.