Skip to content

Commit 4be3768

Browse files
committed
fix(precheck): remove build step — compilation takes too long for pre-commit
1 parent b505ec0 commit 4be3768

1 file changed

Lines changed: 1 addition & 27 deletions

File tree

toolchain/bootstrap/precheck.sh

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,7 @@ done
5959
# CI runs the full suite via ./mfc.sh lint without this variable.
6060
export MFC_SKIP_RENDER_TESTS=1
6161

62-
# Detect whether any Fortran sources or CMakeLists changed — if so, run a build.
63-
# This catches compilation errors (duplicate declarations, missing symbols, etc.)
64-
# cheaply: Python-only changes pay zero build cost.
65-
if git diff HEAD --name-only 2>/dev/null | grep -qE '\.(fpp|f90)$|CMakeLists\.txt'; then
66-
BUILD_FORTRAN=1
67-
else
68-
BUILD_FORTRAN=0
69-
fi
70-
71-
if [ "$BUILD_FORTRAN" = "1" ]; then
72-
NCHECK=9
73-
else
74-
NCHECK=8
75-
fi
62+
NCHECK=8
7663

7764
log "Running$MAGENTA precheck$COLOR_RESET (same checks as CI lint-gate)..."
7865
echo ""
@@ -251,19 +238,6 @@ else
251238
FAILED=1
252239
fi
253240

254-
# --- Phase 3: Build (only when Fortran sources changed) ---
255-
256-
if [ "$BUILD_FORTRAN" = "1" ]; then
257-
log "[$CYAN 9/9$COLOR_RESET] Building$MAGENTA (Fortran changes detected)$COLOR_RESET..."
258-
if ./mfc.sh build -j "$JOBS" > "$TMPDIR_PC/build_out" 2>&1; then
259-
ok "Build passed."
260-
else
261-
error "Build failed. Output:"
262-
cat "$TMPDIR_PC/build_out" | tail -20
263-
FAILED=1
264-
fi
265-
fi
266-
267241
echo ""
268242

269243
if [ $FAILED -eq 0 ]; then

0 commit comments

Comments
 (0)