Skip to content

Commit 2071348

Browse files
Revert "Improve PI install: use stable branch, parallel build, fix Docker"
This reverts commit c0276ba.
1 parent c0276ba commit 2071348

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,17 @@ jobs:
4343
- name: Install PI library
4444
run: |
4545
git clone https://github.com/p4lang/PI.git /tmp/PI
46-
cd /tmp/PI
47-
git checkout stable
48-
git submodule update --init --recursive
49-
./autogen.sh
50-
./configure
51-
make -j$(nproc)
52-
sudo make install
53-
ls -l /usr/local/include/PI
46+
cd /tmp/PI && git submodule update --init --recursive
47+
cd /tmp/PI && ./autogen.sh && ./configure && make && sudo make install
48+
if [ ! -f /usr/local/include/PI/pi.h ]; then
49+
echo "PI headers not found after installation."
50+
exit 1
51+
fi
5452
- name: Build test Docker image
5553
env:
5654
CC: ${{ matrix.cc }}
5755
CXX: ${{ matrix.cxx }}
5856
run: |
59-
./autogen.sh && ./configure
6057
docker build -t bm --build-arg IMAGE_TYPE=test --build-arg CC=$CC --build-arg CXX=$CXX --build-arg GCOV=$GCOV .
6158
- name: Run tests with verbose output
6259
run: |
@@ -79,18 +76,14 @@ jobs:
7976
- name: Install PI library
8077
run: |
8178
git clone https://github.com/p4lang/PI.git /tmp/PI
82-
cd /tmp/PI
83-
git checkout stable
84-
git submodule update --init --recursive
85-
./autogen.sh
86-
./configure
87-
make -j$(nproc)
88-
sudo make install
89-
ls -l /usr/local/include/PI
79+
cd /tmp/PI && git submodule update --init --recursive
80+
cd /tmp/PI && ./autogen.sh && ./configure && make && sudo make install
81+
if [ ! -f /usr/local/include/PI/pi.h ]; then
82+
echo "PI headers not found after installation."
83+
exit 1
84+
fi
9085
- name: Build Dockerfile.noPI image
91-
run: |
92-
./autogen.sh && ./configure
93-
docker build -t bm-no-pi --build-arg IMAGE_TYPE=test -f Dockerfile.noPI .
86+
run: docker build -t bm-no-pi --build-arg IMAGE_TYPE=test -f Dockerfile.noPI .
9487
- name: Run tests with verbose output
9588
run: docker run --rm -w /behavioral-model bm-no-pi /bin/bash -c "make -j$(nproc) VERBOSE=1"
9689

@@ -109,14 +102,12 @@ jobs:
109102
- name: Install PI library
110103
run: |
111104
git clone https://github.com/p4lang/PI.git /tmp/PI
112-
cd /tmp/PI
113-
git checkout stable
114-
git submodule update --init --recursive
115-
./autogen.sh
116-
./configure
117-
make -j$(nproc)
118-
sudo make install
119-
ls -l /usr/local/include/PI
105+
cd /tmp/PI && git submodule update --init --recursive
106+
cd /tmp/PI && ./autogen.sh && ./configure && make && sudo make install
107+
if [ ! -f /usr/local/include/PI/pi.h ]; then
108+
echo "PI headers not found after installation."
109+
exit 1
110+
fi
120111
- name: Build BMv2
121112
run: |
122113
./autogen.sh

0 commit comments

Comments
 (0)