Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace most mentions of Ubuntu 20.04 with 22.04 #5156

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
p4c-lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
IMAGE_TYPE: test
CMAKE_ONLY: ON
Expand All @@ -30,7 +30,7 @@ jobs:
key: apply-linters-${{ runner.os }}
max-size: 1000M

- name: Build (Ubuntu 20.04)
- name: Build (Ubuntu 22.04)
run: |
tools/ci-build.sh

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-static-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# Build a p4c release on Ubuntu 20.04.
# Build a p4c release on Ubuntu 22.04.
build-linux:
# Only run on pull requests with the "run-static" label.
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'run-static') }}
Expand All @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
dynamic: [{glibc: ON, stdlib: OFF}, {glibc: OFF, stdlib: ON}]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
IMAGE_TYPE: test
CMAKE_UNITY_BUILD: ON
Expand All @@ -46,7 +46,7 @@ jobs:
max-size: 1000M

- shell: bash
name: Build (Ubuntu 20.04)
name: Build (Ubuntu 22.04)
run: |
sudo -E tools/ci-build.sh
./tools/ci-check-static.sh ./build/p4c-bm2-ss ./build/p4c-dpdk ./build/p4c-ebpf \
Expand Down
56 changes: 14 additions & 42 deletions .github/workflows/ci-test-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,22 @@ concurrency:
jobs:
# Build with GCC and test P4C on Ubuntu 22.04.
test-ubuntu22:
name: test-ubuntu22 (Unity ${{ matrix.unity }}, GTest ${{ matrix.gtest }})
strategy:
fail-fast: false
matrix:
unity: [ON, OFF]
include:
- unity: ON
gtest: ON
- unity: OFF
gtest: OFF
runs-on: ubuntu-22.04
env:
CTEST_PARALLEL_LEVEL: 4
IMAGE_TYPE: test
ENABLE_GTESTS: ${{ matrix.gtest }}
CMAKE_UNITY_BUILD: ${{ matrix.unity }}
BUILD_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
Expand All @@ -30,7 +42,7 @@ jobs:
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: test-${{ runner.os }}-gcc
key: test-${{ matrix.unity }}-${{ runner.os }}-gcc
max-size: 1000M

- name: Build (Ubuntu 22.04, GCC)
Expand All @@ -41,6 +53,7 @@ jobs:
# Need to use sudo for the eBPF kernel tests and need to avoid p4tc_stf tests.
run: sudo -E ctest --output-on-failure --schedule-random -E "p4tc_samples_stf|p4tc_cleanup|p4tc_setup"
working-directory: ./build
if: matrix.unity == 'ON' && matrix.gtest == 'ON'

# Build with GCC and test Tofino backend on Ubuntu 22.04.
test-ubuntu22-tofino:
Expand Down Expand Up @@ -79,44 +92,3 @@ jobs:
- name: Run tests (Ubuntu 22.04)
run: ctest --output-on-failure --schedule-random -R tofino
working-directory: ./build

# Build with GCC and test P4C on Ubuntu 20.04.
test-ubuntu20:
name: test-ubuntu20 (Unity ${{ matrix.unity }}, GTest ${{ matrix.gtest }})
strategy:
fail-fast: false
matrix:
unity: [ON, OFF]
include:
- unity: ON
gtest: ON
- unity: OFF
gtest: OFF
runs-on: ubuntu-20.04
env:
CTEST_PARALLEL_LEVEL: 4
IMAGE_TYPE: test
ENABLE_GTESTS: ${{ matrix.gtest }}
CMAKE_UNITY_BUILD: ${{ matrix.unity }}
BUILD_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: test-${{ matrix.unity }}-${{ runner.os }}-gcc
max-size: 1000M

- name: Build (Ubuntu 20.04, GCC)
run: |
tools/ci-build.sh

- name: Run tests (Ubuntu 20.04)
# Need to use sudo for the eBPF kernel tests and need to avoid p4tc_stf tests.
run: sudo -E ctest --output-on-failure --schedule-random -E "p4tc_samples_stf|p4tc_cleanup|p4tc_setup"
working-directory: ./build
if: matrix.unity == 'ON' && matrix.gtest == 'ON'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "test-p4c-ubuntu-20.04-sanitizers"
name: "test-p4c-ubuntu-22.04-sanitizers"

on:
schedule:
Expand All @@ -10,11 +10,11 @@ on:
branches: [main]

jobs:
# Build with clang and test p4c on Ubuntu 20.04.
test-ubuntu20-clang-sanitizers:
# Build with clang and test p4c on Ubuntu 22.04.
test-ubuntu22-clang-sanitizers:
# Only run on pull requests with the "run-sanitizer" label.
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'run-sanitizer') }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
CTEST_PARALLEL_LEVEL: 2
IMAGE_TYPE: test
Expand All @@ -34,11 +34,11 @@ jobs:
key: test-${{ runner.os }}-clang
max-size: 1000M

- name: Build (Ubuntu 20.04, Clang, Sanitizers)
- name: Build (Ubuntu 22.04, Clang, Sanitizers)
run: |
tools/ci-build.sh

- name: Run tests (Ubuntu 20.04)
- name: Run tests (Ubuntu 22.04)
# Need to use sudo for the eBPF kernel tests.
run: sudo -E ctest --output-on-failure --schedule-random -E "p4tc_samples_stf|p4tc_cleanup|p4tc_setup"
working-directory: ./build
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ sudo dpkg -i /path/to/package.deb
```

2. Install [dependencies](#dependencies). You can find specific instructions
for Ubuntu 20.04 [here](#ubuntu-dependencies) and for macOS 11
for Ubuntu 22.04 [here](#ubuntu-dependencies) and for macOS 11
[here](#macos-dependencies). You can also look at the
[CI installation script](https://github.com/p4lang/p4c/blob/main/tools/ci-build.sh).

Expand Down Expand Up @@ -267,7 +267,7 @@ If you plan to contribute to P4C, you'll find more useful information

## Dependencies

Ubuntu 20.04 is the officially supported platform for P4C. There's also
Ubuntu 22.04 is the officially supported platform for P4C. There's also
unofficial support for macOS 11. Other platforms are untested; you can try to
use them, but YMMV.

Expand Down Expand Up @@ -332,7 +332,7 @@ git clone --depth 1 -b v2.3.4 https://github.com/jothepro/doxygen-awesome-css ./
```

`P4C` also depends on Google Protocol Buffers (Protobuf). `P4C` requires version
3.0 or higher, so the packaged version provided in Ubuntu 20.04 **should**
3.0 or higher, so the packaged version provided in Ubuntu 22.04 **should**
work. However, P4C typically installs its own version of Protobuf using CMake's `FetchContent` module
(at the moment, 3.25.3). If you are experiencing issues with the Protobuf version shipped with your OS distribution, we recommend that to install Protobuf 3.25.3 from source. You can find instructions
[here](https://github.com/protocolbuffers/protobuf/blob/v3.25.3/src/README.md).
Expand Down
Loading