Repository navigation
97 lines (93 loc) · 4.07 KB
/
Copy pathci.yml
File metadata and controls
97 lines (93 loc) · 4.07 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
name: Build and test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Check patch and determine validation scope
id: scope
env:
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]] || ! git cat-file -e "$BASE_SHA^{commit}" 2>/dev/null; then
run_code=true
else
git diff --check "$BASE_SHA" HEAD
run_code=false
while IFS= read -r -d '' path; do
case "$path" in
README.md|*/README.md|CONTRIBUTING.md|LICENSE|CITATION.cff) ;;
docs/*.md|docs/assets/*.png|docs/assets/*.svg|docs/ase2025/*.pdf) ;;
site/*|.github/workflows/pages.yml) ;;
.github/ISSUE_TEMPLATE/*|.github/pull_request_template.md) ;;
*) run_code=true; break ;;
esac
done < <(git diff --name-only --no-renames -z "$BASE_SHA" HEAD)
fi
echo "run_code=$run_code" >> "$GITHUB_OUTPUT"
if [[ "$run_code" == "false" ]]; then
echo "Documentation, website, or repository metadata only: patch whitespace checked; Rust checks skipped." >> "$GITHUB_STEP_SUMMARY"
fi
- name: Install the pinned compiler and components
if: steps.scope.outputs.run_code == 'true'
run: rustup toolchain install nightly-2025-03-19 --profile minimal --component rust-src --component rustc-dev --component llvm-tools-preview
- name: Build without model configuration
if: steps.scope.outputs.run_code == 'true'
run: |
test ! -e utgen/res/api.json
cargo build --workspace --locked
- name: Run tests without a model service
if: steps.scope.outputs.run_code == 'true'
run: cargo test --workspace --locked
- name: Check the installer and CLI entry points
if: steps.scope.outputs.run_code == 'true'
run: |
bash -n install.sh
./install.sh --help
./target/debug/cargo-brinfo --help
./target/debug/cargo-call-chain --help
./target/debug/focxt --help
./target/debug/utgen --help
- name: Check the standalone example workspace
if: steps.scope.outputs.run_code == 'true'
run: cargo metadata --manifest-path examples/bytes/Cargo.toml --no-deps --format-version 1 > /dev/null
- name: Install the validated coverage tool
if: steps.scope.outputs.run_code == 'true'
run: cargo +stable install cargo-llvm-cov --version 0.6.16 --locked
- name: Check coverage annotation compatibility
if: steps.scope.outputs.run_code == 'true'
run: python3 scripts/check_coverage.py
- name: Check coverage baselines for unit and integration builds
if: steps.scope.outputs.run_code == 'true'
run: cargo test -p utgen --locked coverage_baselines_match_test_build_modes -- --ignored
- name: Validate the minimal analysis and test pipeline
if: steps.scope.outputs.run_code == 'true'
run: python3 scripts/check_minimal.py
- name: Check mixed library and binary targets
if: steps.scope.outputs.run_code == 'true'
run: python3 scripts/check_mixed.py
- name: Check generation and repair task limits
if: steps.scope.outputs.run_code == 'true'
run: python3 scripts/check_tasks.py
- name: Build release analysis tools
if: steps.scope.outputs.run_code == 'true'
run: cargo build --workspace --release --locked
- name: Validate bytes analysis and method identities
if: steps.scope.outputs.run_code == 'true'
run: python3 scripts/check_bytes.py