Skip to content

Commit 3e342fe

Browse files
authored
Update submodules. (#65)
* Update submodules and runner version. * Try a different install approach.
1 parent 381c0d0 commit 3e342fe

File tree

5 files changed

+45
-26
lines changed

5 files changed

+45
-26
lines changed

.github/workflows/pytest.yaml

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
1-
name: test
2-
on: [push]
1+
name: "test-debian"
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
merge_group:
9+
branches: [master]
10+
11+
# Cancel any preceding run on the pull request.
12+
concurrency:
13+
group: test-p4c-debian-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
316
jobs:
4-
test:
5-
runs-on: ubuntu-18.04
17+
# Build with GCC and test P4C on Ubuntu 22.04.
18+
test-ubuntu22:
19+
runs-on: ubuntu-22.04
620
steps:
7-
- uses: actions/checkout@v1
8-
- name: ccache
9-
uses: hendrikmuhs/ccache-action@v1
10-
with:
11-
key: ${{ matrix.os }}
12-
max-size: 1000M
13-
- name: Install
14-
run: |
15-
./do_install.sh RUN_CI=ON
16-
- name: Test with CMake
17-
run: |
18-
cd modules/p4c/build
19-
ctest -j4 -R toz3-validate --output-on-failure --schedule-random
21+
- uses: actions/checkout@v4
22+
with:
23+
submodules: recursive
24+
fetch-depth: 0
25+
26+
- name: ccache
27+
uses: hendrikmuhs/[email protected]
28+
with:
29+
key: test-${{ runner.os }}-ubuntu22
30+
max-size: 1000M
31+
32+
- name: Install
33+
run: |
34+
./do_install.sh RUN_CI=ON
35+
36+
- name: Test with CMake
37+
run: |
38+
cd modules/p4c/build
39+
ctest -j4 -R toz3-validate --output-on-failure --schedule-random

do_install.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ sudo apt install -y bison \
3838
build-essential \
3939
cmake \
4040
git \
41+
ninja-build \
42+
clang \
43+
lld \
4144
flex \
4245
libboost-dev \
4346
libboost-graph-dev \
@@ -113,10 +116,6 @@ sudo make install
113116
cd ${SRC_DIR}
114117
fi
115118

116-
# If the behavioral model dependencies did not cover filesystem
117-
# This is needed for the validation binaries
118-
sudo apt install libboost-filesystem-dev
119-
120119
# grab the toz3 extension for the p4 compiler
121120
mkdir -p ${MODULE_DIR}/p4c/extensions
122121
# only install bludgeon if we are not running in CI
@@ -131,8 +130,8 @@ echo "Building P4C..."
131130
cd ${MODULE_DIR}/p4c
132131
mkdir -p build
133132
cd build
134-
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
135-
make -j `getconf _NPROCESSORS_ONLN`
133+
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCMAKE_LINKER=/usr/bin/lld -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja -DCMAKE_UNITY_BUILD=ON -DENABLE_TEST_TOOLS=OFF -DENABLE_GTESTS=OFF -DENABLE_EBPF=OFF -DENABLE_UBPF=OFF -DENABLE_DPDK=OFF -DENABLE_P4TC=OFF -DENABLE_P4FMT=OFF -DENABLE_P4C_GRAPHS=OFF
134+
cmake --build .
136135
cd ../..
137136

138137
echo "Gauntlet installation completed successfully."

modules/behavioral-model

Submodule behavioral-model updated 134 files

modules/p4c

Submodule p4c updated 1839 files

modules/toz3

Submodule toz3 updated 57 files

0 commit comments

Comments
 (0)