Skip to content
Open
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
32 changes: 17 additions & 15 deletions .github/workflows/cmux-next-fast-gates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1324,21 +1324,6 @@ jobs:
job: compile-rust
key: ${{ steps.tree-key.outputs.key }}

- name: Install Linux build dependencies
if: ${{ steps.tree.outputs.hit != 'true' }}
timeout-minutes: 5
run: bash scripts/ci/apt-ensure.sh clang libclang-dev pkg-config

- name: Init the ghostty-next submodule (libghostty-vt for ghostty-vt-sys)
if: ${{ steps.tree.outputs.hit != 'true' }}
timeout-minutes: 5
run: bash scripts/ci/init-submodule.sh ghostty-next

- name: Install zig
if: ${{ steps.tree.outputs.hit != 'true' }}
timeout-minutes: 5
run: ./scripts/install-zig-ci.sh

- name: Set up pinned Rust
if: ${{ steps.tree.outputs.hit != 'true' }}
timeout-minutes: 5
Expand Down Expand Up @@ -1377,6 +1362,23 @@ jobs:
job: compile-rust-inputs
key: ${{ steps.inputs-key.outputs.key }}

# The selector uses Cargo metadata and the key reads submodule commit IDs from Git. Only a real compile
# needs native tools and the Ghostty sources. Install Zig after Rust so the selected Zig goes first on PATH.
- name: Install Linux build dependencies
if: ${{ steps.tree.outputs.hit != 'true' && steps.inputs.outputs.hit != 'true' }}
timeout-minutes: 5
run: bash scripts/ci/apt-ensure.sh clang libclang-dev pkg-config

- name: Init the ghostty-next submodule (libghostty-vt for ghostty-vt-sys)
if: ${{ steps.tree.outputs.hit != 'true' && steps.inputs.outputs.hit != 'true' }}
timeout-minutes: 5
run: bash scripts/ci/init-submodule.sh ghostty-next

- name: Install zig
if: ${{ steps.tree.outputs.hit != 'true' && steps.inputs.outputs.hit != 'true' }}
timeout-minutes: 5
run: ./scripts/install-zig-ci.sh

- name: Cap cargo jobs at this runner's memory
if: ${{ steps.tree.outputs.hit != 'true' && steps.inputs.outputs.hit != 'true' }}
timeout-minutes: 1
Expand Down
10 changes: 10 additions & 0 deletions tests/test_ci_compile_rust_inputs_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ def test_compile_rust_reuses_by_inputs_only_on_a_pull_request_and_skips_only_on_
self.assertLess(names.index("Set up pinned Rust"), at)
self.assertIn("github.event_name == 'pull_request'", steps[at]["if"])
self.assertEqual(steps[at + 1]["with"]["job"], "compile-rust-inputs")
for name in (
"Install Linux build dependencies",
"Init the ghostty-next submodule (libghostty-vt for ghostty-vt-sys)",
"Install zig",
):
with self.subTest(step=name):
index = names.index(name)
self.assertGreater(index, at + 1)
self.assertIn("steps.tree.outputs.hit != 'true'", steps[index]["if"])
self.assertIn("steps.inputs.outputs.hit != 'true'", steps[index]["if"])
for step in steps[at + 2:]:
cond = step.get("if", "")
if "steps.tree.outputs.hit != 'true'" in cond:
Expand Down
Loading