feat(build): adjust number of parallel make jobs (#1915)

* feat(build): adjust number of parallel make jobs

* fix: update make on MacOS from brew to support --output-sync argument

* fix: cache grpc with version as part of key to improve validity of cache hits

* fix: use gmake for tests-apple to use the updated GNU make version

* fix: actually use the new make version for tests-apple

* feat: parallelize tests-extra

* feat: attempt to cache grpc build for docker images

* fix: don't quote GRPC version

* fix: don't cache go modules, we have limited cache space, better used elsewhere

* fix: release with the same version of go that we test with

* fix: don't fail on exporting cache layers

* fix: remove deprecated BUILD_GRPC docker arg from Makefile
This commit is contained in:
cryptk 2024-03-29 16:32:40 -05:00 committed by GitHub
parent a7fc89c207
commit 93702e39d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 148 additions and 50 deletions

View file

@ -2,6 +2,9 @@ name: Build and Release
on: push
env:
GRPC_VERSION: v1.58.0
permissions:
contents: write
@ -32,7 +35,8 @@ jobs:
submodules: true
- uses: actions/setup-go@v4
with:
go-version: '>=1.21.0'
go-version: '1.21.x'
cache: false
- name: Dependencies
run: |
sudo apt-get update
@ -54,17 +58,17 @@ jobs:
uses: actions/cache@v3
with:
path: grpc
key: ${{ runner.os }}-grpc
key: ${{ runner.os }}-grpc-${{ env.GRPC_VERSION }}
- name: Build grpc
if: steps.cache-grpc.outputs.cache-hit != 'true'
run: |
git clone --recurse-submodules -b v1.58.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc && \
git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \
cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
../.. && sudo make -j12
../.. && sudo make --jobs 5 --output-sync=target
- name: Install gRPC
run: |
cd grpc && cd cmake/build && sudo make -j12 install
cd grpc && cd cmake/build && sudo make --jobs 5 --output-sync=target install
- name: Build
id: build
env:
@ -98,7 +102,8 @@ jobs:
submodules: true
- uses: actions/setup-go@v4
with:
go-version: '>=1.21.0'
go-version: '1.21.x'
cache: false
- name: Dependencies
run: |
sudo apt-get install -y --no-install-recommends libopencv-dev
@ -135,7 +140,8 @@ jobs:
submodules: true
- uses: actions/setup-go@v4
with:
go-version: '>=1.21.0'
go-version: '1.21.x'
cache: false
- name: Dependencies
run: |
brew install protobuf grpc