Skip to content

Commit

Permalink
Fix Fedora CI build.
Browse files Browse the repository at this point in the history
Signed-off-by: fruffy <fruffy@nyu.edu>
  • Loading branch information
fruffy committed Oct 10, 2024
1 parent a1bb06b commit 39e36fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-test-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
container:
image: registry.fedoraproject.org/fedora:latest
options: --privileged
env:
IN_DOCKER: TRUE
env:
CTEST_PARALLEL_LEVEL: 4
steps:
Expand Down
19 changes: 14 additions & 5 deletions tools/install_fedora_deps.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash

set -e
# Script for building P4C on Fedora for continuous integration builds.

set -e # Exit on error.
set -x # Make command execution verbose

# In Docker builds, sudo is not available. So make it a noop.
if [ "$IN_DOCKER" == "TRUE" ]; then
echo "Executing within docker container."
function sudo() { command "$@"; }
fi

sudo dnf install -y -q \
automake \
Expand Down Expand Up @@ -47,12 +56,12 @@ sudo dnf install -y -q \
zlib-devel \
ninja-build

sudo pip3 install ply ptf scapy==2.5.0 wheel
pip3 install --user ply ptf scapy==2.5.0 wheel

# Install dependencies for the BMv2 PTF runner and P4Runtime.
sudo pip3 install --upgrade protobuf==3.20.3
sudo pip3 install --upgrade googleapis-common-protos==1.61.0
sudo pip3 install --upgrade grpcio==1.59.2
pip3 install --user --upgrade protobuf==3.20.3
pip3 install --user --upgrade googleapis-common-protos==1.61.0
pip3 install --user --upgrade grpcio==1.59.2

MAKEFLAGS="-j$(nproc)"
export MAKEFLAGS
Expand Down

0 comments on commit 39e36fa

Please sign in to comment.