Skip to content

Commit

Permalink
ci: cosmetic script tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dtebbs committed Feb 4, 2021
1 parent 3de3349 commit 18bda78
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/onpullrequest-build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/onpush-build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/onpush-build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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: |
Expand Down
9 changes: 5 additions & 4 deletions scripts/install_grpc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <install-location> <version> <build-dir>"
echo ""
Expand Down Expand Up @@ -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))
Expand All @@ -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} \
Expand Down

0 comments on commit 18bda78

Please sign in to comment.