Skip to content

Commit

Permalink
more ubuntu24.04 on yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-GS committed Jun 5, 2024
1 parent 558c85a commit 14a3167
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-reuse-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ on:
# options:
# - ubuntu-20.04
# - ubuntu-22.04
# - ubuntu-24.04
# - macos-12
arch:
required: false
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
matrix:
config: ['Debug', 'Release']
plat: [linux, android]
os: ['ubuntu-20.04', 'ubuntu-22.04']
os: ['ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04']
arch: [x86, x64]
tls: [openssl, openssl3]
systemcrypto: ['', '-UseSystemOpenSSLCrypto']
Expand All @@ -127,6 +127,11 @@ jobs:
os: 'ubuntu-22.04'
tls: 'openssl'
systemcrypto: '-UseSystemOpenSSLCrypto'
# No openssl system crypto on ubuntu-24.04
- plat: linux
os: 'ubuntu-24.04'
tls: 'openssl'
systemcrypto: '-UseSystemOpenSSLCrypto'
# linux xdp is for ubuntu22.04 only for now
- plat: android
xdp: "-UseXdp"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docker-publish-xcomp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
- .github/workflows/docker-publish-xcomp.yml
- .docker/ubuntu-20.04/*
- .docker/ubuntu-22.04/*
- .docker/ubuntu-24.04/*
pull_request:
branches: [ main ]
paths:
- .github/workflows/docker-publish-xcomp.yml
- .docker/ubuntu-20.04/*
- .docker/ubuntu-22.04/*
- .docker/ubuntu-24.04/*

permissions: read-all

Expand All @@ -27,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ['20.04', '22.04']
version: ['20.04', '22.04', '24.04']
target: ['x86_64', 'arm']

name: Build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
vec: [
{ plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
{ plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
{ plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
]
uses: ./.github/workflows/build-reuse-unix.yml
with:
Expand Down Expand Up @@ -74,6 +75,7 @@ jobs:
{ plat: "windows", os: "windows-2022", arch: "x64", tls: "openssl3" },
{ plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
{ plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
{ plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
{ plat: "macos", os: "macos-12", arch: "universal", tls: "openssl" },
]
runs-on: ${{ matrix.vec.os }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/package-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
{ config: "Release", os: "ubuntu-22.04", arch: "arm", tls: "openssl3" },
{ config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "openssl3" },
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
{ config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "openssl3" },
{ config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "openssl3" },
{ config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
]
uses: ./.github/workflows/package-reuse-linux.yml
with:
Expand All @@ -52,6 +55,7 @@ jobs:
vec: [
{ config: "Release", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
{ config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
]
steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
# TODO: I don't think this actually testing XDP, since there is no unix XDP builds above.
# { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", sanitize: "-Sanitize", build: "-Test", xdp: "-UseXdp" },
{ config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl", build: "-Test" },
{ config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl3", build: "-Test" },
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", sanitize: "-Sanitize", build: "-Test" },
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", build: "-Test", xdp: "-UseXdp" },
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test", xdp: "-UseXdp" },
]
uses: ./.github/workflows/build-reuse-unix.yml
with:
Expand Down Expand Up @@ -102,6 +103,7 @@ jobs:
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test", xdp: "-UseXdp" },
{ config: "Debug", plat: "windows", os: "windows-2019", arch: "x64", tls: "openssl", build: "-Test" },
{ config: "Debug", plat: "windows", os: "windows-2019", arch: "x64", tls: "openssl3", build: "-Test" },
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", sanitize: "-Sanitize", build: "-Test" },
Expand Down
2 changes: 1 addition & 1 deletion docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ $ pwsh ./scripts/build.ps1 -UseXdp

`./scripts/prepare-machine.ps1` internally does the below commands. This might break your environment.
```sh
# for libxdp v1.4.2
# for libxdp v1.4.2 on Ubuntu 22.04. Ubuntu 24.04 doesn't need this step
sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y

# install runtime dependencies
Expand Down
19 changes: 12 additions & 7 deletions scripts/prepare-machine.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ Set-StrictMode -Version 'Latest'
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
$ProgressPreference = 'SilentlyContinue'

if ($IsLinux -and $UseXdp) {
$IsUbuntu2404 = (Get-Content -Path /etc/os-release | Select-String -Pattern "24.04") -ne $null
if (!$IsUbuntu2404 -and !$ForceXdpInstall) {
$IsUbuntu2404 = $false
if ($IsLinux) {
$IsUbuntu2404 = (Get-Content -Path /etc/os-release | Select-String -Pattern "24.04") -ne $null
if ($UseXdp -and !$IsUbuntu2404 -and !$ForceXdpInstall) {
Write-Host "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Write-Host "Linux XDP installs dependencies from Ubuntu 24.04 packages, which should affect your environment"
Write-Host "You need to understand the impact of this on your environment before proceeding"
Expand Down Expand Up @@ -530,8 +531,10 @@ if ($IsLinux) {
# XDP dependencies
if ($UseXdp) {
sudo apt-get -y install --no-install-recommends libc6-dev-i386 # for building xdp programs
sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y
sudo apt-get update -y
if (!$IsUbuntu2404) {
sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y
sudo apt-get update -y
}
sudo apt-get -y install libxdp-dev libbpf-dev
sudo apt-get -y install libnl-3-dev libnl-genl-3-dev libnl-route-3-dev zlib1g-dev zlib1g pkg-config m4 clang libpcap-dev libelf-dev
}
Expand All @@ -544,8 +547,10 @@ if ($IsLinux) {
sudo apt-get install -y liblttng-ust-dev
sudo apt-get install -y gdb
if ($UseXdp) {
sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y
sudo apt-get update -y
if (!$IsUbuntu2404) {
sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y
sudo apt-get update -y
}
sudo apt-get install -y libxdp1 libbpf1
sudo apt-get install -y libnl-3-200 libnl-route-3-200 libnl-genl-3-200
sudo apt-get install -y iproute2 iptables
Expand Down

0 comments on commit 14a3167

Please sign in to comment.