Skip to content

appveyor.yml: move step scripts to .github/scripts/appveyor/ - #3756

Merged
jimklimov merged 9 commits into
networkupstools:masterfrom
nmbro:ci-appveyor-scripts
Oct 14, 2026
Merged

jimklimov merged 9 commits into
networkupstools:masterfrom
nmbro:ci-appveyor-scripts

Conversation

@nmbro

@nmbro nmbro commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Depends on #3754 (stacked on it; only the last commit is new here).

Preparatory work: moves each AppVeyor step section into its own script under .github/scripts/appveyor/, numbered by its AppVeyor pipeline phase (02-install.bat, 03-before_build.bat, ..., 08-after_test.bat/.ps1). With the build steps in plain scripts instead of inline YAML, they could be reused if NUT ever wants to move the Windows build to another CI (e.g. a GitHub Actions Windows runner), and are easier to run or debug by hand.

  • Commands moved verbatim, same order; each is followed by an errorlevel check, since AppVeyor only checks the exit code of a called .bat as a whole.
  • init stays inline (it runs before the clone).

Use of coding helper tools and AI disclosed: Claude Code was used for development assistance.

🤖 Generated with Claude Code

nmbro and others added 9 commits October 13, 2026 17:28
dllldd_with_tools() ran a `find` per DLL name over DESTDIR and over
each input directory. Once recursion reaches e.g. /mingw64/bin, this
means hundreds of walks over a large directory, which is slow on MSYS2
(about 5 minutes of `make install-win-bundle` in AppVeyor CI).

List those locations once per call and match base names with awk.
Listing order is kept, so the first hit is the same file as before.

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
Single-threaded LZMA at -mx=6 took 1-2 minutes per run to re-pack the
already-compressed ccache entry. Store entries as-is instead, and cap
ccache at 750MB to stay below the 1GB build cache limit for PRs along
with the other cached entries.

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
AC_INIT takes the version from gitlog2version.sh, which includes the
number of commits in a PR (e.g. 2.8.5.1466.13), and puts it into
config.h as PACKAGE_VERSION. With -g3 every object file embeds all
macros it saw, so each new commit count meant a full rebuild on a
2-CPU AppVeyor worker (~50 min), and ccache hits only for PRs with a
commit count seen before.

Add opt-in CI_AUTOGEN_STABLE_VERSION=true to drop that component via
NUT_VERSION_FORCED for autogen.sh only, and enable it for AppVeyor.
`make` still generates nut_version.h from Git, so programs report
the actual version.

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
AppVeyor kills the job at 60 minutes without saving the build cache,
so a cold-ccache build never warms up (and an interrupted cache save
in build 5650 lost the ccache entry entirely).

Set a deadline at 51 minutes after job start in `init`, and run the
long bash steps (prereqs, build, check, spellcheck, bundle) under
`timeout` with the time left. If they would run past it, the job
fails instead, and APPVEYOR_SAVE_CACHE_ON_ERROR keeps what was built,
with at least ~5 minutes left for 7z, artifacts and the cache save.

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
The cache misses come from the ccache direct mode hashing config.h
contents, not from -g3 (ccache does not treat -g3 specially).

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
When cached certificates failed check_NIT_certs, the cache dir was
removed and immediately re-created empty. The cache is populated only
if that dir is absent, so it stayed empty forever, and every run (seen
on AppVeyor) generated new certificates after "GRAVE PROBLEM" noise.
Do not re-create the cache dir there.

Also fix a `|| \` typo (vs. `|| \` line continuation), which ran a
command named `\` and then the `cp -L` fallback unconditionally.

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
`strings` scanned whole files, including debug sections: for the
NUT for Windows bundle (616MB of -g3 binaries) that produced 561MB
of text, all piped through tr/grep/sort, which dominated the DLL
scan of `make install-win-bundle` (~2 min in the first pass on
AppVeyor). With `strings -d` (data sections only, as older binutils
did by default) it is 2.8MB, and the same candidate DLL names. Fall
back to a whole-file scan if `strings` lacks the option.

Similarly use `objdump -p` (private headers, with the PE import
table and ELF NEEDED entries) instead of `-x`, which also dumped
symbol tables and relocations (37MB vs 9.8MB of text here).

Checked against the AppVeyor build 5659 bundle: identical results
and warnings to the original script.

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
Add combase, hid, setupapi, shfolder, wship6 and xmllite to the list
of OS-provided DLLs, which were reported as not found (strings matcher)
for every NUT for Windows bundle on AppVeyor.

The `%s.dll` format-string filter missed a `\%s.dll` hit (backslash
path separator in a format string); `read` later stripped the backslash,
so it was reported as not found as `%s.dll`. Allow a leading path.

Checked against the AppVeyor build 5659 bundle: identical DLL list,
these 7 warnings gone, no new ones.

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
Keep each AppVeyor step section in a script named after it, under
.github/scripts/appveyor/: `.bat` for `cmd` steps, `.ps1` for `ps`.
Script names are numbered by the position of their section among
the AppVeyor pipeline script phases (02-install, 03-before_build,
..., 08-after_test), so the numbers stay stable if more phases get
used later. The commands are moved verbatim (same order). AppVeyor
checks the exit code of each line in inline scripts, but only of
the last one for a called `.bat`, so each command is followed by an
errorlevel check to keep failing fast (with the original exit code).

`init` stays inline, as it runs before the repository is cloned.
The trailing ccache stats of `after_test` are now reported by the
`.bat` before (not after) the artifact link message.

Use of coding helper tools and AI disclosed: Claude Code was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit 24e354c is temporarily available: NUT-tarballs-PR-3756.zip.

@AppVeyorBot

Copy link
Copy Markdown

✅ Build nut 2.8.5.5664-master completed (commit 39e3d0577e by @nmbro)

@jimklimov jimklimov added Windows CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) AI For good or bad, machine tools are upon us. Humans are still the responsible ones. labels Oct 14, 2026

@jimklimov jimklimov left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the neat clean-up :)

@jimklimov jimklimov added this to the 2.8.6 milestone Oct 14, 2026
@jimklimov jimklimov added this to NUT QA Oct 14, 2026
@jimklimov jimklimov moved this to In Progress in NUT QA Oct 14, 2026
jimklimov added a commit to jimklimov/nut that referenced this pull request Oct 14, 2026
@jimklimov
jimklimov marked this pull request as ready for review October 14, 2026 19:15
@jimklimov
jimklimov merged commit bb55f51 into networkupstools:master Oct 14, 2026
26 checks passed
@jimklimov jimklimov moved this from In Progress to Done in NUT QA Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI For good or bad, machine tools are upon us. Humans are still the responsible ones. CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) Windows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants