-
Notifications
You must be signed in to change notification settings - Fork 10
175 lines (163 loc) · 6.11 KB
/
rust.yml
File metadata and controls
175 lines (163 loc) · 6.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: rust-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# Build gitcomet in headless mode (no GPUI system deps required).
# The UI-only code paths are behind #[cfg(feature = "ui-gpui")] guards.
APP_FEATURES: "--no-default-features --features gix"
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all --check
audit:
name: Dependency audit (cargo-audit)
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- name: Run cargo-audit
run: |
cargo audit \
--ignore RUSTSEC-2025-0052 \
--ignore RUSTSEC-2024-0384 \
--ignore RUSTSEC-2024-0436 \
--ignore RUSTSEC-2025-0134
clippy:
name: Clippy
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Clippy (core + state + git backends)
run: cargo clippy -p gitcomet-core -p gitcomet-state -p gitcomet-git -p gitcomet-git-gix -- -D warnings
- name: Clippy (shared UI crate)
run: cargo clippy -p gitcomet-ui -- -D warnings
- name: Clippy (GPUI UI crate -- intentionally skipped on headless CI)
run: |
echo "Skipping cargo clippy -p gitcomet-ui-gpui in this job."
echo "Reason: GPUI requires native windowing/system dependencies that are not available in headless CI."
- name: Clippy (app — headless)
run: cargo clippy -p gitcomet $APP_FEATURES -- -D warnings
build:
name: Build
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Build (core + state + backend)
run: cargo build -p gitcomet-core -p gitcomet-state -p gitcomet-git-gix --verbose
- name: Build (app — headless)
run: cargo build -p gitcomet $APP_FEATURES --verbose
# Core merge algorithm correctness — Phase 1A/1B/1C portability tests
merge-algorithm:
name: Merge algorithm parity (t6403/t6427)
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: build
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: t6403/t6427 merge algorithm portability
run: cargo test -p gitcomet-core --test merge_algorithm --verbose
- name: Conflict label formatting (Phase 1C)
run: cargo test -p gitcomet-core --test conflict_label_formatting --verbose
- name: Meld algorithm parity (Phase 5)
run: cargo test -p gitcomet-core --lib meld_tests --verbose
- name: Core library unit tests
run: cargo test -p gitcomet-core --lib --verbose
- name: State management (conflict session, reducers, effects)
run: cargo test -p gitcomet-state --verbose
# Fixture harness and corpus — Phase 2/3A regression gates
merge-regression:
name: Merge regression suite (fixtures + corpus)
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: build
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: KDiff3-style fixture harness (Phase 2)
run: cargo test -p gitcomet-core --test merge_fixture_harness --verbose
- name: Permutation corpus (Phase 3A — 243 sampled cases)
run: cargo test -p gitcomet-core --test merge_permutation_corpus --verbose
- name: Real-world merge extraction (Phase 3C)
run: cargo test -p gitcomet-core --test merge_git_extraction --verbose
# E2E integration with git mergetool/difftool — Phase 4A/4B
tool-integration:
name: Git mergetool/difftool E2E parity
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: build
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Build gitcomet binary (headless)
run: cargo build -p gitcomet $APP_FEATURES
- name: Git mergetool E2E (Phase 4A — t7610 parity)
run: cargo test -p gitcomet $APP_FEATURES --test mergetool_git_integration --verbose
- name: Git difftool E2E (Phase 4B — t7800 parity)
run: cargo test -p gitcomet $APP_FEATURES --test difftool_git_integration --verbose
- name: Standalone tool-mode E2E (exit codes + validation)
run: cargo test -p gitcomet $APP_FEATURES --test standalone_tool_mode_integration --verbose
- name: Mergetool/difftool runtime unit tests (bin target)
run: cargo test -p gitcomet $APP_FEATURES --bin gitcomet --verbose
# Backend integration — mergetool launcher, status, conflict checkout
backend-integration:
name: Git backend integration
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: build
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Git CLI migration scoreboard
run: cargo test -p gitcomet-git-gix --test git_cli_scoreboard -- --nocapture
- name: Status and mergetool backend integration
run: cargo test -p gitcomet-git-gix --verbose