mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-03 18:32:55 +00:00
ci: fix Node ARM release build (#971)
When we turned on fat LTO builds, we made the release build job **much** more compute and memory intensive. The ARM runners have particularly low memory per core, which makes them susceptible to OOM errors. To avoid issues, I have enabled memory swap on ARM and bumped the side of the runner.
This commit is contained in:
18
.github/workflows/npm-publish.yml
vendored
18
.github/workflows/npm-publish.yml
vendored
@@ -80,17 +80,25 @@ jobs:
|
||||
- arch: x86_64
|
||||
runner: ubuntu-latest
|
||||
- arch: aarch64
|
||||
runner: buildjet-8vcpu-ubuntu-2204-arm
|
||||
# For successful fat LTO builds, we need a large runner to avoid OOM errors.
|
||||
runner: buildjet-16vcpu-ubuntu-2204-arm
|
||||
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.
|
||||
# x86_64 runners. To avoid OOM errors on ARM, we create a swap file.
|
||||
- name: Configure aarch64 build
|
||||
if: ${{ matrix.config.arch == 'aarch64' }}
|
||||
run: echo "CARGO_BUILD_JOBS=4" >> "$GITHUB_ENV"
|
||||
run: |
|
||||
free -h
|
||||
sudo fallocate -l 16G /swapfile
|
||||
sudo chmod 600 /swapfile
|
||||
sudo mkswap /swapfile
|
||||
sudo swapon /swapfile
|
||||
echo "/swapfile swap swap defaults 0 0" >> sudo /etc/fstab
|
||||
# print info
|
||||
swapon --show
|
||||
free -h
|
||||
- name: Build Linux Artifacts
|
||||
run: |
|
||||
bash ci/build_linux_artifacts.sh ${{ matrix.config.arch }}
|
||||
|
||||
Reference in New Issue
Block a user