Skip to content

Commit e742c20

Browse files
yannrichetCopilot
andcommitted
ci: verify gitmodules-shas is current before install_github
Add a check-gitmodules-shas job that fails fast if tools/gitmodules-shas doesn't match the committed submodule pointer, preventing future silent use of a stale libKriging SHA. Also installed tools/pre-commit-submodule-hook.sh as .git/hooks/pre-commit locally (not committed — developers run: cp tools/pre-commit-submodule-hook.sh .git/hooks/pre-commit). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6f4e6a2 commit e742c20

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/install_github.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,28 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15+
check-gitmodules-shas:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: false
21+
- name: Verify tools/gitmodules-shas is up to date
22+
shell: bash
23+
run: |
24+
expected="src/libK $(git ls-tree HEAD src/libK | awk '{print $3}')"
25+
actual=$(grep "^src/libK " tools/gitmodules-shas | head -1)
26+
if [ "$expected" != "$actual" ]; then
27+
echo "ERROR: tools/gitmodules-shas is out of date!"
28+
echo " Expected: $expected"
29+
echo " Actual: $actual"
30+
echo "Run: bash tools/update_submodule_shas.sh && git add tools/gitmodules-shas && git commit"
31+
exit 1
32+
fi
33+
echo "✓ tools/gitmodules-shas is up to date: $actual"
34+
1535
install_github:
36+
needs: check-gitmodules-shas
1637
strategy:
1738
fail-fast: false
1839
matrix:

0 commit comments

Comments
 (0)