mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-06 08:23:19 +08:00
Merge pull request #874 from vercel-labs/ctate/give-sanitized-emitter-dec393
Give the sanitized emitter CI job swap and a larger stack
This commit is contained in:
@@ -314,8 +314,24 @@ jobs:
|
||||
path: ${{ runner.temp }}
|
||||
- name: Restore bootstrap seed
|
||||
run: tar -C "$RUNNER_TEMP" -xf "$RUNNER_TEMP/bootstrap-seed.tar"
|
||||
# The sanitized emitter peaks near 13 GB while it emits the compiler,
|
||||
# then clang compiles the 348 MB module under AddressSanitizer. Together
|
||||
# they exceed the runner's 16 GB of memory, so back them with swap.
|
||||
- name: Enlarge swap for the sanitized emitter
|
||||
if: matrix.phase == 'rebuild-emit'
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /mnt/swapfile
|
||||
sudo fallocate -l 24G /mnt/swapfile
|
||||
sudo chmod 600 /mnt/swapfile
|
||||
sudo mkswap /mnt/swapfile
|
||||
sudo swapon /mnt/swapfile
|
||||
free -h
|
||||
- name: Native bootstrap and package installation checks
|
||||
run: node scripts/ci-native-bootstrap.mjs
|
||||
# The instrumented emitter's recursion can exceed the default 8 MiB stack.
|
||||
run: |
|
||||
if [ "$SCRIPTC_BOOTSTRAP_PHASE" = rebuild-emit ]; then ulimit -s unlimited; fi
|
||||
node scripts/ci-native-bootstrap.mjs
|
||||
env:
|
||||
SCRIPTC_BOOTSTRAP_SEED_DIRECTORY: ${{ runner.temp }}/native-bootstrap
|
||||
SCRIPTC_BOOTSTRAP_PACKAGE_DIR: ${{ runner.temp }}/native-cli-package
|
||||
|
||||
@@ -75,7 +75,9 @@ test("CI restores each seed only into its matching instrumented bootstrap lane",
|
||||
expect([...checkFlavors].toSorted()).toEqual(seed.strategy.matrix.flavor);
|
||||
expect(seed.env.SCRIPTC_SAN).toBe(checks.env.SCRIPTC_SAN);
|
||||
const prepare = seed.steps.find((step) => step.run === "node scripts/bootstrap-seed.mjs")!;
|
||||
const execute = checks.steps.find((step) => step.run === "node scripts/ci-native-bootstrap.mjs")!;
|
||||
const execute = checks.steps.find((step) =>
|
||||
step.run?.split("\n").includes("node scripts/ci-native-bootstrap.mjs"),
|
||||
)!;
|
||||
expect(prepare.env?.SCRIPTC_BOOTSTRAP_SEED_DIRECTORY).toBe("${{ runner.temp }}/native-bootstrap");
|
||||
expect(execute.env?.SCRIPTC_BOOTSTRAP_SEED_DIRECTORY).toBe(
|
||||
prepare.env?.SCRIPTC_BOOTSTRAP_SEED_DIRECTORY,
|
||||
|
||||
Reference in New Issue
Block a user