Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #179

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: "Check go.mod"
strategy:
matrix:
go: [ '1.20' ]
go: [ '1.21' ]
runs-on: ubuntu-latest
steps:
- name: "Checkout"
Expand All @@ -52,7 +52,7 @@ jobs:
name: "Check generated binapi"
strategy:
matrix:
go: [ '1.20' ]
go: [ '1.21' ]
env:
VERSION: v0.8.0
runs-on: ubuntu-latest
Expand All @@ -73,7 +73,7 @@ jobs:
name: "Build and test"
strategy:
matrix:
go: [ '1.20' ]
go: [ '1.21' ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -86,7 +86,7 @@ jobs:
- name: "Setup gotestsum"
uses: autero1/[email protected]
with:
gotestsum_version: 1.9.0
gotestsum_version: 1.11.0
- name: "Go Build"
run: go build -v ./...
- name: "Go Test"
Expand All @@ -101,7 +101,7 @@ jobs:
name: "GolangCI"
strategy:
matrix:
go: [ '1.20' ]
go: [ '1.21' ]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
56 changes: 38 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,60 @@
ARG VPP_VERSION=v23.06
ARG UBUNTU_VERSION=20.04
ARG VPP_VERSION=v23.10
ARG UBUNTU_VERSION=22.04

FROM ubuntu:${UBUNTU_VERSION} as vppbuild
ARG VPP_VERSION
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive TZ=US/Central apt-get install -y git make python3 sudo asciidoc

RUN set -eux;\
apt-get update && env DEBIAN_FRONTEND=noninteractive TZ=US/Central apt-get install -y \
asciidoc \
ca-certificates \
git \
iproute2 \
iputils-ping \
make \
python3 \
sudo \
tcpdump \
rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/FDio/vpp.git

WORKDIR /vpp

ARG VPP_VERSION
RUN git checkout ${VPP_VERSION}
#COPY patch/ patch/
#RUN test -x "patch/patch.sh" && ./patch/patch.sh || exit 1
RUN DEBIAN_FRONTEND=noninteractive TZ=US/Central UNATTENDED=y make install-dep
RUN make pkg-deb
RUN ./src/scripts/version > /vpp/VPP_VERSION

RUN set -eux; \
env DEBIAN_FRONTEND=noninteractive TZ=US/Central UNATTENDED=y make install-dep
RUN set -eux; \
make pkg-deb \
./src/scripts/version > /vpp/VPP_VERSION

FROM vppbuild as vppinstall
#COPY --from=vppbuild /var/lib/apt/lists/* /var/lib/apt/lists/
#COPY --from=vppbuild [ "/vpp/build-root/libvppinfra_*_amd64.deb", "/vpp/build-root/vpp_*_amd64.deb", "/vpp/build-root/vpp-plugin-core_*_amd64.deb", "/vpp/build-root/vpp-plugin-dpdk_*_amd64.deb", "/pkg/"]
#RUN VPP_INSTALL_SKIP_SYSCTL=false apt install -f -y --no-install-recommends /pkg/*.deb ca-certificates iputils-ping iproute2 tcpdump; \
# rm -rf /var/lib/apt/lists/*; \
# rm -rf /pkg
RUN VPP_INSTALL_SKIP_SYSCTL=false apt install -f -y --no-install-recommends /vpp/build-root/*.deb ca-certificates iputils-ping iproute2 tcpdump; \

RUN set -eux; \
env VPP_INSTALL_SKIP_SYSCTL=false apt install -f -y --no-install-recommends /vpp/build-root/*.deb ; \
rm -rf /var/lib/apt/lists/*; \
rm -rf /pkg

FROM golang:1.20-alpine3.18 as binapi-generator
FROM golang:1.21-alpine3.19 as binapi-generator

ENV GO111MODULE=on
ENV CGO_ENABLED=0
ENV GOBIN=/bin

ARG GOVPP_VERSION

COPY . /govpp

WORKDIR /govpp

RUN go build -o /bin/binapi-generator ./cmd/binapi-generator

FROM binapi-generator as gen

COPY --from=vppinstall /usr/share/vpp/api/ /usr/share/vpp/api/
COPY --from=vppinstall /vpp/VPP_VERSION /VPP_VERSION

WORKDIR /gen/binapi
CMD VPP_VERSION=$(cat /VPP_VERSION) go generate .

CMD VPP_VERSION=$(cat /VPP_VERSION) go generate .
Loading