mirror of
https://github.com/openai/codex.git
synced 2026-09-08 15:50:34 +00:00
increase stack size
This commit is contained in:
3
.github/workflows/rust-ci-full.yml
vendored
3
.github/workflows/rust-ci-full.yml
vendored
@@ -76,6 +76,8 @@ jobs:
|
||||
- name: Test argument comment lint package
|
||||
working-directory: tools/argument-comment-lint
|
||||
run: cargo test
|
||||
env:
|
||||
RUST_MIN_STACK: "8388608" # 8 MiB
|
||||
|
||||
argument_comment_lint_prebuilt:
|
||||
name: Argument comment lint - ${{ matrix.name }}
|
||||
@@ -671,6 +673,7 @@ jobs:
|
||||
run: cargo nextest run --no-fail-fast --target ${{ matrix.target }} --cargo-profile ci-test --timings
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
RUST_MIN_STACK: "8388608" # 8 MiB
|
||||
NEXTEST_STATUS_LEVEL: leak
|
||||
|
||||
- name: Upload Cargo timings (nextest)
|
||||
|
||||
2
.github/workflows/rust-ci.yml
vendored
2
.github/workflows/rust-ci.yml
vendored
@@ -131,6 +131,8 @@ jobs:
|
||||
- name: Test argument comment lint package
|
||||
working-directory: tools/argument-comment-lint
|
||||
run: cargo test
|
||||
env:
|
||||
RUST_MIN_STACK: "8388608" # 8 MiB
|
||||
|
||||
argument_comment_lint_prebuilt:
|
||||
name: Argument comment lint - ${{ matrix.name }}
|
||||
|
||||
15
defs.bzl
15
defs.bzl
@@ -18,11 +18,11 @@ PLATFORMS = [
|
||||
WINDOWS_RUSTC_LINK_FLAGS = select({
|
||||
"@rules_rs//rs/experimental/platforms/constraints:windows_gnullvm": [
|
||||
"-C",
|
||||
"link-arg=-Wl,--stack,8388608",
|
||||
"link-arg=-Wl,--stack,8388608", # 8 MiB
|
||||
],
|
||||
"@rules_rs//rs/experimental/platforms/constraints:windows_msvc": [
|
||||
"-C",
|
||||
"link-arg=/STACK:8388608",
|
||||
"link-arg=/STACK:8388608", # 8 MiB
|
||||
"-C",
|
||||
"link-arg=/NODEFAULTLIB:libucrt.lib",
|
||||
"-C",
|
||||
@@ -43,6 +43,13 @@ MACOS_WEBRTC_RUSTC_LINK_FLAGS = select({
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
RUST_LIBTEST_ENV = {
|
||||
# Rust's libtest harness runs test bodies on std-spawned threads, whose
|
||||
# default 2 MiB stack can be too small for large async test futures on
|
||||
# Windows. Keep this aligned with the Windows test binary stack reserve.
|
||||
"RUST_MIN_STACK": "8388608", # 8 MiB
|
||||
}
|
||||
|
||||
def multiplatform_binaries(name, platforms = PLATFORMS):
|
||||
for platform in platforms:
|
||||
platform_data(
|
||||
@@ -187,7 +194,7 @@ def codex_rust_crate(
|
||||
extra_binaries: Additional binary labels to surface as test data and
|
||||
`CARGO_BIN_EXE_*` environment variables. These are only needed for binaries from a different crate.
|
||||
"""
|
||||
test_env = {
|
||||
test_env = RUST_LIBTEST_ENV | {
|
||||
# The launcher resolves an absolute workspace root at runtime so
|
||||
# manifest-only platforms like macOS still point Insta at the real
|
||||
# `codex-rs` checkout.
|
||||
@@ -359,7 +366,7 @@ def codex_rust_crate(
|
||||
# Important: do not merge `test_env` here. Its unit-test-only
|
||||
# `INSTA_WORKSPACE_ROOT="codex-rs"` is tuned for unit tests that
|
||||
# execute from the repo root and can misplace integration snapshots.
|
||||
env = cargo_env,
|
||||
env = RUST_LIBTEST_ENV | cargo_env,
|
||||
tags = test_tags,
|
||||
**test_kwargs
|
||||
)
|
||||
|
||||
4
justfile
4
justfile
@@ -1,6 +1,8 @@
|
||||
set working-directory := "codex-rs"
|
||||
set positional-arguments
|
||||
|
||||
rust_min_stack := "8388608" # 8 MiB
|
||||
|
||||
# Display help
|
||||
help:
|
||||
just -l
|
||||
@@ -49,7 +51,7 @@ install:
|
||||
# Prefer this for routine local runs. Workspace crate features are banned, so
|
||||
# there should be no need to add `--all-features`.
|
||||
test:
|
||||
cargo nextest run --no-fail-fast
|
||||
RUST_MIN_STACK={{ rust_min_stack }} cargo nextest run --no-fail-fast
|
||||
|
||||
# Build and run Codex from source using Bazel.
|
||||
# Note we have to use the combination of `[no-cd]` and `--run_under="cd $PWD &&"`
|
||||
|
||||
Reference in New Issue
Block a user