Replace most mentions of Ubuntu 20.04 with 22.04 #3857
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "test-p4c-debian" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
merge_group: | |
branches: [main] | |
# Cancel any preceding run on the pull request. | |
concurrency: | |
group: test-p4c-debian-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
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 | |
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 22.04, GCC) | |
run: | | |
tools/ci-build.sh | |
- name: Run tests (Ubuntu 22.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' | |
# Build with GCC and test Tofino backend on Ubuntu 22.04. | |
test-ubuntu22-tofino: | |
runs-on: ubuntu-22.04 | |
env: | |
CTEST_PARALLEL_LEVEL: 4 | |
IMAGE_TYPE: test | |
BUILD_GENERATOR: Ninja | |
ENABLE_GTESTS: ON | |
ENABLE_TOFINO: ON | |
ENABLE_TEST_TOOLS: ON | |
ENABLE_BMV2: OFF | |
ENABLE_EBPF: OFF | |
ENABLE_UBPF: OFF | |
ENABLE_DPDK: OFF | |
ENABLE_P4TC: OFF | |
ENABLE_P4FMT: OFF | |
ENABLE_P4TEST: OFF | |
ENABLE_P4C_GRAPHS: OFF | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: test-${{ runner.os }}-gcc | |
max-size: 1000M | |
- name: Build (Ubuntu 22.04, GCC) | |
run: | | |
tools/ci-build.sh | |
- name: Run tests (Ubuntu 22.04) | |
run: ctest --output-on-failure --schedule-random -R tofino | |
working-directory: ./build |