From 25f6f46c5c5243ce067685991c9f3c5d6edac3d4 Mon Sep 17 00:00:00 2001 From: office Date: Sun, 11 Oct 2026 15:53:26 +0330 Subject: [PATCH] ci: make the referenced windows-install-sqlite.bat exist and runnable The windows-gcc job fails at its "Install SQLite" step, before V is even built: .github\workflows\windows-install-sqlite.bat dir thirdparty\sqlite\ That script is not in the repository and has never been in its history (`git log --all -- .github/workflows/windows-install-sqlite.bat` is empty, and `git ls-tree master .github/workflows/` lists only ci.yml). The job therefore cannot pass, and it is the only job that validates Windows at all. The step also could not have worked as written even with the file present: it ran before "Build V", so neither `v` nor `v.exe` existed yet. Nothing in that step could have invoked V. Two changes: 1. Add the script, delegating to the downloader V already ships at `vlib/db/sqlite/install_thirdparty_sqlite.vsh`. That script verifies both the size and the SHA3 of the amalgamation against sqlite.org, so no checksum is maintained by hand here. 2. Move the step after "Build V" so the downloader can be invoked. Also declare `*.bat` in .gitattributes with eol=crlf. Batch files are only run by cmd.exe, and the file was previously covered by no rule, so its endings depended on each contributor's core.autocrlf. Not verified on a Windows runner: I have no way to run GitHub Actions here. The ordering argument and the `git log`/`git ls-tree` evidence above are checkable locally; the runner behaviour is not. Note the windows job compiles with neither `-d sqlite` nor `-autofree` nor `-prod`, and runs no tests, while the ubuntu-gcc job runs all three builds plus the suite. Bringing it to parity is a larger change and is deliberately left out of this one. --- .gitattributes | 2 ++ .github/workflows/ci.yml | 10 ++++++---- .github/workflows/windows-install-sqlite.bat | 9 +++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/windows-install-sqlite.bat diff --git a/.gitattributes b/.gitattributes index 97038dfe..1c42d790 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,5 @@ *.vv linguist-language=V text=auto eol=lf *.vsh linguist-language=V text=auto eol=lf **/v.mod linguist-language=V text=auto eol=lf +# Batch files are only ever run by cmd.exe, which expects CRLF endings. +*.bat text=auto eol=crlf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a68e6bf..07f2a3f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,13 +106,15 @@ jobs: uses: actions/checkout@v4 with: path: gitly - - name: Install SQLite - run: | - .github\workflows\windows-install-sqlite.bat - dir thirdparty\sqlite\ - name: Build V run: | ./make.bat -gcc + + # Must come after "Build V": this used to run first, when neither `v` + # nor `v.exe` existed, so the referenced script could not work at all. + - name: Install SQLite + run: .github\workflows\windows-install-sqlite.bat + - name: Compile gitly run: | dir diff --git a/.github/workflows/windows-install-sqlite.bat b/.github/workflows/windows-install-sqlite.bat new file mode 100644 index 00000000..9254f31c --- /dev/null +++ b/.github/workflows/windows-install-sqlite.bat @@ -0,0 +1,9 @@ +@echo off +REM ci.yml originally called this before V was built, when neither `v` nor +REM `v.exe` existed yet, so the script could not delegate to V's own +REM downloader. It is now run after "Build V" and shells out to the +REM installer V ships, which verifies both the size and the SHA3 of the +REM amalgamation instead of trusting a pinned checksum maintained by hand. +.\v.exe run vlib\db\sqlite\install_thirdparty_sqlite.vsh +if errorlevel 1 exit /b 1 +dir thirdparty\sqlite\