From b1cab41c104cda62afd7321fee83b6bda992040e Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Fri, 30 Sep 2022 11:44:36 +1000 Subject: [PATCH 1/5] Install protoc for Win/Mac release flow --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 158cbaa08b4..9edb3f59bd2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,6 +83,13 @@ jobs: if: startsWith(matrix.arch, 'x86_64-windows') run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV + # ============================== + # Windows & Mac dependencies + # ============================== + - name: Install Protoc + if: contains(matrix.arch, 'darwin') || contains(matrix.arch, 'windows') + uses: arduino/setup-protoc@v1 + # ============================== # Builds # ============================== From de06ca7b6343e12add453ae08a3b20c11b056253 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Fri, 30 Sep 2022 11:51:52 +1000 Subject: [PATCH 2/5] Authenticate to avoid rate limit --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9edb3f59bd2..6edb1f76c19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,6 +89,8 @@ jobs: - name: Install Protoc if: contains(matrix.arch, 'darwin') || contains(matrix.arch, 'windows') uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} # ============================== # Builds From cd36b6f695ae8d01d5b96fdca11d9d7c252010eb Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Fri, 30 Sep 2022 11:53:58 +1000 Subject: [PATCH 3/5] Auth the local testnet flow as well --- .github/workflows/local-testnet.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml index c688c0df330..170bd9e2129 100644 --- a/.github/workflows/local-testnet.yml +++ b/.github/workflows/local-testnet.yml @@ -22,6 +22,8 @@ jobs: run: rustup update stable - name: Install Protoc uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install ganache run: npm install ganache@latest --global From d5027e78cb075e9c06ab0db3cef8a4c845bfb46a Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Fri, 30 Sep 2022 12:19:59 +1000 Subject: [PATCH 4/5] Fix aarch64 protoc binary --- Cross.toml | 4 ++-- ..._64-unknown-linux-gnu.dockerfile => Dockerfile} | 0 scripts/cross/aarch64-unknown-linux-gnu.dockerfile | 14 -------------- 3 files changed, 2 insertions(+), 16 deletions(-) rename scripts/cross/{x86_64-unknown-linux-gnu.dockerfile => Dockerfile} (100%) delete mode 100644 scripts/cross/aarch64-unknown-linux-gnu.dockerfile diff --git a/Cross.toml b/Cross.toml index 963e22d0e02..9c3e441cba5 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,5 +1,5 @@ [target.x86_64-unknown-linux-gnu] -dockerfile = './scripts/cross/x86_64-unknown-linux-gnu.dockerfile' +dockerfile = './scripts/cross/Dockerfile' [target.aarch64-unknown-linux-gnu] -dockerfile = './scripts/cross/aarch64-unknown-linux-gnu.dockerfile' +dockerfile = './scripts/cross/Dockerfile' diff --git a/scripts/cross/x86_64-unknown-linux-gnu.dockerfile b/scripts/cross/Dockerfile similarity index 100% rename from scripts/cross/x86_64-unknown-linux-gnu.dockerfile rename to scripts/cross/Dockerfile diff --git a/scripts/cross/aarch64-unknown-linux-gnu.dockerfile b/scripts/cross/aarch64-unknown-linux-gnu.dockerfile deleted file mode 100644 index 691639cd413..00000000000 --- a/scripts/cross/aarch64-unknown-linux-gnu.dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -ARG CROSS_BASE_IMAGE -FROM $CROSS_BASE_IMAGE - -RUN apt-get update -y && apt-get upgrade -y - -RUN apt-get install -y unzip && \ - PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \ - curl -L $PB_REL/download/v3.15.8/protoc-3.15.8-linux-aarch_64.zip -o protoc.zip && \ - unzip protoc.zip -d /usr && \ - chmod +x /usr/bin/protoc - -RUN apt-get install -y cmake clang-3.9 - -ENV PROTOC=/usr/bin/protoc From acbac602ad087b3c9e5789a8994c30f7ec59156e Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Fri, 30 Sep 2022 14:30:17 +1000 Subject: [PATCH 5/5] Fix lcli --- lcli/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcli/Dockerfile b/lcli/Dockerfile index 8fd3567cdcf..1129e710f46 100644 --- a/lcli/Dockerfile +++ b/lcli/Dockerfile @@ -2,7 +2,7 @@ # - from the `lighthouse` dir with the command: `docker build -f ./lcli/Dockerflie .` # - from the current directory with the command: `docker build -f ./Dockerfile ../` FROM rust:1.62.1-bullseye AS builder -RUN apt-get update && apt-get -y upgrade && apt-get install -y cmake libclang-dev +RUN apt-get update && apt-get -y upgrade && apt-get install -y cmake libclang-dev protobuf-compiler COPY . lighthouse ARG PORTABLE ENV PORTABLE $PORTABLE