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
36 changes: 33 additions & 3 deletions .github/workflows/codex-review-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,21 @@ jobs:
"p3 badge",
)

class TransientGitHubApiError(RuntimeError):
pass

def gh_json(path):
output = subprocess.check_output(["gh", "api", path], text=True)
return json.loads(output)
result = subprocess.run(
["gh", "api", path],
text=True,
capture_output=True,
)
if result.returncode:
error = result.stderr.strip() or result.stdout.strip()
if re.search(r"\(HTTP 5\d\d\)", error):
raise TransientGitHubApiError(error)
raise RuntimeError(f"gh api {path} failed: {error}")
return json.loads(result.stdout)

def gh_json_pages(path):
page = 1
Expand Down Expand Up @@ -157,7 +169,25 @@ jobs:
deadline = time.time() + timeout_seconds

while True:
state, items = verdict()
try:
state, items = verdict()
except TransientGitHubApiError as error:
remaining = int(deadline - time.time())
if remaining <= 0:
print(
"Timed out waiting for GitHub API recovery while checking "
f"the Codex verdict: {error}"
)
sys.exit(1)

retry_seconds = min(poll_seconds, remaining)
print(
"Transient GitHub API failure while checking the Codex verdict; "
f"retrying in {retry_seconds}s ({remaining}s left): {error}"
)
time.sleep(retry_seconds)
continue

if state == "pass":
print("Found clean Codex review for current HEAD:")
for kind, url in items:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/qa-world-server-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
env:
CARGO_BUILD_JOBS: "1"
CARGO_INCREMENTAL: "0"
RUST_MIN_STACK: "268435456"
CARGO_PROFILE_RELEASE_INCREMENTAL: "false"
CARGO_PROFILE_RELEASE_LTO: "false"
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "16"
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ concurrency:

env:
CARGO_TERM_COLOR: always
RUST_MIN_STACK: "268435456"

jobs:
fmt:
Expand All @@ -35,6 +36,9 @@ jobs:
with:
components: rustfmt

- name: Install preflight dependencies
run: sudo apt-get update && sudo apt-get install --yes ripgrep

- name: Validate local preflight harness
run: ./tools/pr-preflight.sh self-test

Expand All @@ -47,12 +51,16 @@ jobs:
name: Check core crates
runs-on: ubuntu-24.04
timeout-minutes: 20
env:
CARGO_INCREMENTAL: "0"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@1.88.0
with:
components: clippy

- name: Cache cargo
uses: Swatinem/rust-cache@v2
Expand All @@ -73,10 +81,18 @@ jobs:
cargo +1.88.0 check --locked --manifest-path tools/wow-test-bot/Cargo.toml
cargo +1.88.0 build --locked -p bnet-server -p world-server

- name: Clippy loot authority boundary
run: cargo +1.88.0 clippy --locked --no-deps --message-format short -p wow-loot -p wow-entities -p wow-map -p wow-network --lib

- name: Clippy world target with inherited debt capped
run: cargo +1.88.0 clippy --locked --no-deps --message-format short -p wow-world --lib -- --cap-lints warn

tests:
name: Focused library tests
runs-on: ubuntu-24.04
timeout-minutes: 20
timeout-minutes: 30
env:
CARGO_INCREMENTAL: "0"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -97,12 +113,18 @@ jobs:
chmod +x "$HOME/.local/bin/protoc"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: Run packet/data/world tests
- name: Run focused library and loot-race harness tests
run: |
cargo +1.88.0 test --locked -p wow-data --lib
cargo +1.88.0 test --locked -p wow-packet --lib
cargo +1.88.0 test --locked -p wow-loot --lib
cargo +1.88.0 test --locked -p wow-entities --lib
cargo +1.88.0 test --locked -p wow-map --lib
cargo +1.88.0 test --locked -p wow-network --lib
cargo +1.88.0 test --locked -p wow-world --lib
cargo +1.88.0 test --locked --manifest-path tools/wow-test-bot/Cargo.toml loot_race::tests
cargo +1.88.0 test --locked -p capture-diff
cargo +1.88.0 run --locked -p capture-diff -- verify-required loot-single-item-claim

latest-stable:
name: Latest stable compatibility
Expand Down
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/capture-diff/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ serde = { workspace = true }
serde_json = { workspace = true }
anyhow = { workspace = true }
sha2 = { workspace = true }
libc = { workspace = true }

[lints]
workspace = true
Loading
Loading