bazel build -c dbg :envoy --jobs=$[$(nproc --all)-2]
In the command above jobs
is set to number of CPUs minus 2. This should help keep your laptop alive.
bazel build -c opt :envoy
objcopy --only-keep-debug bazel-bin/envoy bazel-bin/envoy.debug
strip -g bazel-bin/envoy -o bazel-bin/envoy.striped
Create bucket (only one time):
aws s3 mb s3://artifacts.solo.io
Copy:
BUILDID=$(readelf -n ./bazel-bin/envoy|grep "Build ID:" |cut -f2 -d:|tr -d ' ')
aws s3 cp bazel-bin/envoy.debug s3://artifacts.solo.io/$BUILDID/envoy.debug
Builds are stampped with the commit hash. to see the stamp:
eu-readelf -n bazel-bin/envoy
...
GNU 20 GNU_BUILD_ID
Build ID: 45c2b7a08b480aae64cf8bb1360aea9bc0cd0576
...
- Dependencies
- ninja
- Troubleshooting
- remove build artifacts:
bazel clean --expunge
- update bazel
- remove build artifacts:
bazel test -c dbg //test/... --jobs=$[$(nproc --all)-2]
bazel test -c dbg //test/... //e2e/... --jobs=$[$(nproc --all)-2]
BUILDIFIER=$GOPATH/bin/buildifier CLANG_FORMAT=clang-format /path/to/envoy/tools/check_format.py fix --skip_envoy_build_rule_check
gcloud builds submit --project=solo-public --config=cloudbuild.yaml \
--substitutions=COMMIT_SHA=$(git rev-parse HEAD) .
Support to target arm64 architectures, such as the Raspberry Pi 2 (v1.2) 3 & 4, is HIGLY EXPERIMENTAL These builds need to be executed on a machine with the same target architecture to produce the desired outcome. (WARNING: If building on Raspberry Pi 4 or other equivalent SBC, using the 8GB version is recommended. To produce gloo-envoy builds, 4GB might not be enough, especially when including tests)
This method is intended to produce a gloo-envoy binary without performing tests (Might take approx. 12h to complete on a Raspberry Pi)
make fast-build-arm
Produces and tests a gloo-envoy build.
make build-arm
You can optionally set your own registry to push gloo-envoy images by setting the REGISTRY environment variable or passing it as input. It defaults to quay.io/solo-io
.
make docker-release-arm