ci: reduce number of build jobs on aarch64 to avoid OOM (#970)

This commit is contained in:
Will Jones
2024-02-13 17:33:09 -08:00
committed by GitHub
parent 5b60412d66
commit 51f92ecb3d

View File

@@ -84,6 +84,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
# Buildjet aarch64 runners have only 1.5 GB RAM per core, vs 3.5 GB per core for
# x86_64 runners. Cargo defaults to spawn a job per core, but needs a lot
# of memory per job. Thus for ARM we need to reduce the number of jobs
# to avoid OOM errors when building.
- name: Configure aarch64 build
if: ${{ matrix.config.arch == 'aarch64' }}
run: echo "CARGO_BUILD_JOBS=4" >> "$GITHUB_ENV"
- name: Build Linux Artifacts
run: |
bash ci/build_linux_artifacts.sh ${{ matrix.config.arch }}