Skip to content

Commit

Permalink
Complete build
Browse files Browse the repository at this point in the history
  • Loading branch information
whatever4711 committed Apr 5, 2024
1 parent 9a476ee commit 7bcf3db
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 70 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build-archs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ jobs:
with:
context: .
file: p4.dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
build-args: |
image=unibaktr/alpine
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down Expand Up @@ -96,7 +94,7 @@ jobs:
with:
context: .
file: grpc.dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
platforms: linux/amd64,linux/arm64
build-args: |
image=${{ env.REGISTRY }}/${{ env.REPO }}/p4:${{ env.BRANCH_NAME }}
push: true
Expand Down Expand Up @@ -141,7 +139,7 @@ jobs:
with:
context: .
file: grpc.dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
platforms: linux/amd64,linux/arm64
build-args: |
image=${{ env.REGISTRY }}/${{ env.REPO }}/grpc:${{ env.BRANCH_NAME }}
push: true
Expand Down
32 changes: 16 additions & 16 deletions bmv.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ ARG image=unibaktr/ubuntu
FROM $image
WORKDIR /

# RUN git clone https://github.com/p4lang/behavioral-model && \
# cd behavioral-model && \
# sed -i 's/sudo//g' ci/install-thrift.sh && bash ci/install-thrift.sh && \
# sed -i 's/sudo//g' ci/install-nanomsg.sh && bash ci/install-nanomsg.sh && \
# ldconfig && \
# sed -i 's/sudo//g' ci/install-nnpy.sh && bash ci/install-nnpy.sh && \
# ./autogen.sh && \
# ./configure --with-pi && \
# make -j$(nproc) && \
# make install && ldconfig
RUN git clone https://github.com/p4lang/behavioral-model && \
cd behavioral-model && \
sed -i 's/sudo//g' ci/install-thrift.sh && bash ci/install-thrift.sh && \
sed -i 's/sudo//g' ci/install-nanomsg.sh && bash ci/install-nanomsg.sh && \
ldconfig && \
sed -i 's/sudo//g' ci/install-nnpy.sh && bash ci/install-nnpy.sh && \
./autogen.sh && \
./configure --with-pi && \
make -j$(nproc) && \
make install && ldconfig

# RUN cd behavioral-model/tools && make install && \
# cd / && mv behavioral-model/tools . && \
# rm -Rf behavioral-model/
#
# RUN python3 -m pip install --no-cache-dir p4runtime
# git clone https://github.com/p4lang/tutorials.git && \
RUN cd behavioral-model/tools && make install && \
cd / && mv behavioral-model/tools . && \
rm -Rf behavioral-model/

RUN python3 -m pip install --no-cache-dir p4runtime
# git clone https://github.com/p4lang/tutorials.git
28 changes: 14 additions & 14 deletions grpc.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ ARG image=unibaktr/ubuntu
FROM $image
WORKDIR /tmp

# RUN git clone --depth=1 -b v1.43.2 https://github.com/google/grpc.git && \
# cd grpc && \
# git submodule update --init --recursive && \
# mkdir -p cmake/build && cd cmake/build && \
# cmake ../.. && make -j$(nproc) && \
# make install && ldconfig && \
# cd ../.. && rm -Rf grpc && \
# git clone https://github.com/p4lang/PI && \
# cd PI && \
# git submodule update --init && \
# ./autogen.sh && \
# ./configure --with-proto && make -j$(nproc) && \
# make install && ldconfig && \
# cd .. && rm -Rf PI
RUN git clone --depth=1 -b v1.43.2 https://github.com/google/grpc.git && \
cd grpc && \
git submodule update --init --recursive && \
mkdir -p cmake/build && cd cmake/build && \
cmake ../.. && make -j$(nproc) && \
make install && ldconfig && \
cd ../.. && rm -Rf grpc && \
git clone https://github.com/p4lang/PI && \
cd PI && \
git submodule update --init && \
./autogen.sh && \
./configure --with-proto && make -j$(nproc) && \
make install && ldconfig && \
cd .. && rm -Rf PI
70 changes: 35 additions & 35 deletions p4.dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
ARG image=unibaktr/ubuntu
FROM $image

# RUN apt update && \
# apt install -y \
# automake \
# bison \
# cmake \
# g++ \
# flex \
# git \
# libgc-dev \
# libgmp-dev \
# libpcap-dev \
# libboost-dev \
# libboost-test-dev \
# libboost-program-options-dev \
# libboost-system-dev \
# libboost-filesystem-dev \
# libboost-thread-dev \
# libboost-iostreams-dev \
# libboost-graph-dev \
# libevent-dev \
# libjudy-dev \
# libprotobuf-dev \
# libssl-dev \
# libtool \
# llvm \
# protobuf-compiler \
# wget && \
# apt clean && \
# rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/
RUN apt update && \
apt install -y \
automake \
bison \
cmake \
g++ \
flex \
git \
libgc-dev \
libgmp-dev \
libpcap-dev \
libboost-dev \
libboost-test-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-filesystem-dev \
libboost-thread-dev \
libboost-iostreams-dev \
libboost-graph-dev \
libevent-dev \
libjudy-dev \
libprotobuf-dev \
libssl-dev \
libtool \
llvm \
protobuf-compiler \
wget && \
apt clean && \
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/

WORKDIR /tmp

# RUN git clone --recursive https://github.com/p4lang/p4c.git && \
# cd p4c && mkdir build && cd build && \
# cmake .. && \
# make -j$(nproc) && \
# make install && ldconfig && \
# cd .. && rm -Rf p4c/
RUN git clone --recursive https://github.com/p4lang/p4c.git && \
cd p4c && mkdir build && cd build && \
cmake .. && \
make -j$(nproc) && \
make install && ldconfig && \
cd .. && rm -Rf p4c/

0 comments on commit 7bcf3db

Please sign in to comment.