Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,27 @@ jobs:
timeout-minutes: 60
env:
LEANVM_NUM_THREADS: 1
# rustdoc ignores the rustflags in src/ffi/.cargo/config.toml; without carry-less multiply, the crate refuses to build.
RUSTDOCFLAGS: -C target-cpu=native
steps:
- name: Check out repository
uses: actions/checkout@v7

# The largest proving test needs more memory than a hosted runner has; without swap, the runner is killed.
- name: Add swap
run: |
dir=/mnt
sudo test -d "$dir" || dir=/
available=$(df -BG --output=avail "$dir" | tail -1 | tr -dc 0-9)
size=$(( available > 24 ? 16 : available - 8 ))
[ "$size" -ge 4 ] || { echo "::error::Only ${available}G free on $dir"; exit 1; }
sudo fallocate -l "${size}G" "$dir/lean.swap"
sudo chmod 600 "$dir/lean.swap"
sudo mkswap "$dir/lean.swap"
sudo swapon "$dir/lean.swap"
swapon --show
free -h

# rust-toolchain.toml pins the toolchain, which rustup installs on first use.
- name: Test
working-directory: src/ffi
Expand Down
Loading
Loading