diff --git a/.github/workflows/onpullrequest-build-ubuntu.yml b/.github/workflows/onpullrequest-build-ubuntu.yml index e5af31eb5..829d4ebed 100644 --- a/.github/workflows/onpullrequest-build-ubuntu.yml +++ b/.github/workflows/onpullrequest-build-ubuntu.yml @@ -19,7 +19,7 @@ jobs: - name: Cache grpc uses: actions/cache@v2 with: - key: grpc-1.31.x-${{ runner.os }}-test + key: grpc-1.31.x-${{ runner.os }} path: depends/grpc - name: Build grpc run: if ! [ -d depends/grpc ] ; then scripts/install_grpc /usr v1.31.x depends/grpc ; fi @@ -54,12 +54,12 @@ jobs: - name: Cache grpc uses: actions/cache@v2 with: - key: grpc-1.31.x-${{ runner.os }}-test + key: grpc-1.31.x-${{ runner.os }} path: depends/grpc - name: Cache ccache uses: actions/cache@v2 with: - key: prover-tests-ccache-${{ needs.onpr-submodules.outputs.commits }}-${{ matrix.curve }}-${{ runner.os }}-test + key: prover-tests-ccache-${{ needs.onpr-submodules.outputs.commits }}-${{ matrix.curve }}-${{ runner.os }} path: ~/.ccache - name: Cache pip uses: actions/cache@v2 @@ -99,14 +99,14 @@ jobs: - name: Cache grpc uses: actions/cache@v2 with: - key: grpc-1.31.x-${{ runner.os }}-test + key: grpc-1.31.x-${{ runner.os }} path: depends/grpc # ccache in this job seems to make the tests crash occasionally. Disabling # until the cause is understood. # - name: Cache ccache # uses: actions/cache@v2 # with: - # key: integration-tests-ccache-${{ needs.onpr-submodules.outputs.commits }}-${{ matrix.curve }}-${{ runner.os }}-test + # key: integration-tests-ccache-${{ needs.onpr-submodules.outputs.commits }}-${{ matrix.curve }}-${{ runner.os }} # path: ~/.ccache - name: Cache pip uses: actions/cache@v2 diff --git a/.github/workflows/onpush-build-macos.yml b/.github/workflows/onpush-build-macos.yml index 02c5107ef..7b86fd776 100644 --- a/.github/workflows/onpush-build-macos.yml +++ b/.github/workflows/onpush-build-macos.yml @@ -34,7 +34,7 @@ jobs: with: submodules: recursive - name: Cache ccache - uses: actions/cache@v1 + uses: actions/cache@v2 with: key: submodules-${{ needs.submodules.outputs.commits }}-${{ runner.os }}-${{ matrix.config }} path: ~/Library/Caches/ccache diff --git a/.github/workflows/onpush-build-ubuntu.yml b/.github/workflows/onpush-build-ubuntu.yml index 158971460..1c711ff8a 100644 --- a/.github/workflows/onpush-build-ubuntu.yml +++ b/.github/workflows/onpush-build-ubuntu.yml @@ -19,7 +19,7 @@ jobs: - name: Cache grpc uses: actions/cache@v2 with: - key: grpc-1.31.x-${{ runner.os }}-test + key: grpc-1.31.x-${{ runner.os }} path: depends/grpc - name: Build grpc run: if ! [ -d depends/grpc ] ; then scripts/install_grpc /usr v1.31.x depends/grpc ; fi @@ -37,7 +37,7 @@ jobs: - name: Cache grpc uses: actions/cache@v2 with: - key: grpc-1.31.x-${{ runner.os }}-test + key: grpc-1.31.x-${{ runner.os }} path: depends/grpc - name: Cache pip (for mpc tests) uses: actions/cache@v2 @@ -59,9 +59,9 @@ jobs: with: submodules: recursive - name: Cache grpc - uses: actions/cache@v1 + uses: actions/cache@v2 with: - key: grpc-1.31.x-${{ runner.os }}-test + key: grpc-1.31.x-${{ runner.os }} path: depends/grpc - name: Install dependencies run: | @@ -80,7 +80,7 @@ jobs: - name: Cache grpc uses: actions/cache@v2 with: - key: grpc-1.31.x-${{ runner.os }}-test + key: grpc-1.31.x-${{ runner.os }} path: depends/grpc - name: Install dependencies run: | diff --git a/scripts/install_grpc b/scripts/install_grpc index 085ba1e75..1dfbcffe8 100755 --- a/scripts/install_grpc +++ b/scripts/install_grpc @@ -3,7 +3,8 @@ # This script is only intended to run on the CI machines. Not for local # development. -if [ "" == "$1" ] || [ "" == "$2" ] || [ "" == "$3" ] ; then +# Expect 3 arguments, all non-empty. +if [ "$#" -ne 3 ] || [ "" == "$1" ] || [ "" == "$2" ] || [ "" == "$3" ] ; then echo "error: invalid arguments" echo "Usage: $0 " echo "" @@ -34,14 +35,14 @@ mkdir -p ${BUILD_DIR} pushd ${BUILD_DIR} # Clone repo and submodules (if DO_BUILD == 1) - if [ "1" == "${DO_BUILD}" ] ; then + if [ "${DO_BUILD}" == "1" ] ; then git clone --depth 1 -b ${VERSION} https://github.com/grpc/grpc . git submodule update --depth 1 --init --recursive fi # Install protobuf pushd third_party/protobuf - if [ "1" == "${DO_BUILD}" ] ; then + if [ "${DO_BUILD}" == "1" ] ; then [ -e ./configure ] || ./autogen.sh DIST_LANG=cpp ./configure --prefix ${INSTALL_DIR} make -j $(($(nproc)+1)) @@ -52,7 +53,7 @@ pushd ${BUILD_DIR} # Install grpc mkdir -p build pushd build - if [ "1" == "${DO_BUILD}" ] ; then + if [ "${DO_BUILD}" == "1" ] ; then cmake \ -DCMAKE_PREFIX_PATH=${INSTALL_DIR} \ -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \