From 16a6a6bf30c38c7ff8ac4cc0e7a50fb58beb9b56 Mon Sep 17 00:00:00 2001 From: Kent Ross Date: Sat, 16 Mar 2024 17:03:49 -0700 Subject: [PATCH] harden the codegen tools in the CI config, with updates and more pinning --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64b477b..2e7cc43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,22 +35,42 @@ jobs: cargo fmt --check - - name: build + - name: set up codegen dependencies shell: bash run: | - wget "https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip" -O protoc.zip - unzip protoc.zip - chmod +x bin/protoc - mv bin/protoc /usr/local/bin + mkdir proto + ( + cd proto + wget "https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protoc-26.0-linux-x86_64.zip" -O protoc.zip + unzip protoc.zip + chmod +x bin/protoc + mv bin/protoc /usr/local/bin/ + ) + protoc --version - wget "https://github.com/google/flatbuffers/releases/download/v23.5.26/Linux.flatc.binary.clang++-12.zip" -O flatbuffers - unzip flatbuffers - chmod +x flatc - mv flatc /usr/local/bin + mkdir flatbuffers + ( + cd flatbuffers + wget "https://github.com/google/flatbuffers/releases/download/v23.5.26/Linux.flatc.binary.clang++-12.zip" -O flatbuffers.zip + unzip flatbuffers.zip + chmod +x ./flatc + mv ./flatc /usr/local/bin + ) + flatc --version - sudo apt-get install -y capnproto libprotobuf-dev + wget "https://capnproto.org/capnproto-c++-1.0.2.tar.gz" -O capnproto.tar.gz + tar zxf capnproto.tar.gz + ( + cd capnproto-c++-1.0.2 + ./configure + sudo make -j install + ) + capnp --version + - name: build + shell: bash + run: | cargo build --benches --features regenerate-capnp,regenerate-flatbuffers,regenerate-prost - name: check generated code