Ensure protoc is installed for release CI (#3621)

## Issue Addressed

The release CI is currently broken due to the addition of the `protoc` dependency. Here's a failure of the release flow running on my fork: https://github.com/michaelsproul/lighthouse/actions/runs/3155541478/jobs/5134317334

## Proposed Changes

- Install `protoc` on Windows and Mac so that it's available for `cargo install`.
- Install an x86_64 binary in the Cross image for the aarch64 platform: we need a binary that runs on the host, _not_ on the target.
- Fix `macos` local testnet CI by using the Github API key to dodge rate limiting (this issue: https://github.com/actions/runner-images/issues/602).
This commit is contained in:
Michael Sproul 2022-10-03 23:09:25 +00:00
parent ff145b986f
commit 58bd2f76d0
6 changed files with 14 additions and 17 deletions

View File

@ -22,6 +22,8 @@ jobs:
run: rustup update stable run: rustup update stable
- name: Install Protoc - name: Install Protoc
uses: arduino/setup-protoc@v1 uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache - name: Install ganache
run: npm install ganache@latest --global run: npm install ganache@latest --global

View File

@ -83,6 +83,15 @@ jobs:
if: startsWith(matrix.arch, 'x86_64-windows') if: startsWith(matrix.arch, 'x86_64-windows')
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV 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
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# ============================== # ==============================
# Builds # Builds
# ============================== # ==============================

View File

@ -1,5 +1,5 @@
[target.x86_64-unknown-linux-gnu] [target.x86_64-unknown-linux-gnu]
dockerfile = './scripts/cross/x86_64-unknown-linux-gnu.dockerfile' dockerfile = './scripts/cross/Dockerfile'
[target.aarch64-unknown-linux-gnu] [target.aarch64-unknown-linux-gnu]
dockerfile = './scripts/cross/aarch64-unknown-linux-gnu.dockerfile' dockerfile = './scripts/cross/Dockerfile'

View File

@ -2,7 +2,7 @@
# - from the `lighthouse` dir with the command: `docker build -f ./lcli/Dockerflie .` # - from the `lighthouse` dir with the command: `docker build -f ./lcli/Dockerflie .`
# - from the current directory with the command: `docker build -f ./Dockerfile ../` # - from the current directory with the command: `docker build -f ./Dockerfile ../`
FROM rust:1.62.1-bullseye AS builder 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 COPY . lighthouse
ARG PORTABLE ARG PORTABLE
ENV PORTABLE $PORTABLE ENV PORTABLE $PORTABLE

View File

@ -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