From 21a20d13ed32f8a2610112fcd4fe4603e98e4898 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:46:46 +0100 Subject: [PATCH] build(deps): use protoc 25.2 --- .github/actions/deps/action.yaml | 2 +- Dockerfile-alpine | 2 +- Dockerfile-debian | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/actions/deps/action.yaml b/.github/actions/deps/action.yaml index 58180e9..091e36a 100644 --- a/.github/actions/deps/action.yaml +++ b/.github/actions/deps/action.yaml @@ -18,7 +18,7 @@ runs: shell: bash run: | curl -Lo /tmp/protoc.zip \ - https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip + https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-25.2-linux-x86_64.zip unzip /tmp/protoc.zip -d ${HOME}/.local echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV export PATH="${PATH}:${HOME}/.local/bin" diff --git a/Dockerfile-alpine b/Dockerfile-alpine index c2bdbec..2f4f937 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -23,7 +23,7 @@ ARG BUILDPLATFORM # Install protoc - protobuf compiler # The one shipped with Alpine does not work RUN if [[ "$BUILDPLATFORM" == "linux/arm64" ]] ; then export PROTOC_ARCH=aarch_64; else export PROTOC_ARCH=x86_64 ; fi; \ - wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v22.2/protoc-22.2-linux-${PROTOC_ARCH}.zip && \ + wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-${PROTOC_ARCH}.zip && \ unzip -qd /opt/protoc /tmp/protoc.zip && \ rm /tmp/protoc.zip && \ ln -s /opt/protoc/bin/protoc /usr/bin/ diff --git a/Dockerfile-debian b/Dockerfile-debian index 319fbfa..c4c3ef6 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -8,11 +8,18 @@ RUN --mount=type=cache,sharing=locked,target=/var/lib/apt/lists \ rm -f /etc/apt/apt.conf.d/docker-clean && \ apt-get update -qq && \ apt-get install -qq --yes \ - protobuf-compiler \ git \ wget \ bash +# Install protoc - protobuf compiler +# The one shipped with Alpine does not work +RUN if [[ "$BUILDPLATFORM" == "linux/arm64" ]] ; then export PROTOC_ARCH=aarch_64; else export PROTOC_ARCH=x86_64 ; fi; \ + wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-${PROTOC_ARCH}.zip && \ + unzip -qd /opt/protoc /tmp/protoc.zip && \ + rm /tmp/protoc.zip && \ + ln -s /opt/protoc/bin/protoc /usr/bin/ + # Create a dummy package RUN cargo init /usr/src/abci-app WORKDIR /usr/src/abci-app