Skip to content

AppVeyor: no CI deadline for PR builds, 57 min for others; ccache cleanup after test/bundle - #3794

Merged
jimklimov merged 10 commits into
networkupstools:masterfrom
nmbro:appveyor-deadline-tweak
Oct 23, 2026
Merged

jimklimov merged 10 commits into
networkupstools:masterfrom
nmbro:appveyor-deadline-tweak

Conversation

@nmbro

@nmbro nmbro commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #3790, as suggested in
#3790 (comment)

Changes

No deadline for PR builds, 57 minutes for the others

The CI deadline (CI_DEADLINE_EPOCH, set in init) stops our steps
early so that AppVeyor still has time to save the build cache before
it kills the job at 60 minutes. PR builds no longer save the cache,
so they need no such margin: init now sets the deadline only for
non-PR builds. Without it, the step scripts fall back to 3600 seconds
(this fallback was already there), so PR builds can use the whole hour.

For other builds, the deadline moves from 51 to 57 minutes. Here is
what still runs after it, from the job logs:

what time
7z of the bundle (-mx=3, from #3790's own job) ~42 s
ccache stats, artifact upload, on_success ~10 s
cache save (master builds) 24-39 s

Master builds that hit the old deadline finished about 35 s after it
(e.g. builds 5804, 5812, 5816 ended at 51.4-51.6 min). A passed build
that ends just before the deadline needs about 1.5 minutes for the
rest, so 57 minutes leaves about 1.5 minutes of margin. With 58, it
would end at about 59.5 minutes, too close to the limit.

ccache cleanup after the test and bundle steps

With APPVEYOR_SAVE_CACHE_ON_ERROR, a failed master build saves the
cache right after the failing step. But ccache -c only ran at the
end of 04-build_script.bat and in on_success. So if the test or
bundle step failed (e.g. by the deadline) after compiling more
objects, the cache was saved without enforcing max_size, and could
get near the per-item cache size limit again.

07-test_script.bat and 08-after_test.bat now run ccache -c right
after make check and make install-win-bundle, whatever the result,
and keep their exit codes. The 08 line drops set -e for that; the
only other command there already handles its own failure. The cleanup
took about 1 s in #3790's job.

Testing

  • appveyor.yml parses, all files are ASCII, and the .bat files
    keep CRLF.
  • A static check finds no |, &, < or > outside double quotes
    in the changed bash -lc lines.
  • The cleanup line, run with stub make (exiting with 124) and
    ccache: the cleanup ran and the exit code 124 was kept.
  • Not tested: an actual AppVeyor run.
    • This PR build should print CI deadline: 3600 seconds left in
      each step.
    • Master builds should print a countdown from just under 3420
      seconds (57 minutes).

AI disclosure

Prepared with Claude Code (Claude Opus 5.5, model claude-opus-5-5):
log analysis, changes, local tests and this description. I reviewed
the changes, and I take responsibility for the submission.

🤖 Generated with Claude Code

@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 21, 2026
@jimklimov jimklimov added this to the 2.8.6 milestone Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

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

jimklimov added a commit to nmbro/nut that referenced this pull request Oct 21, 2026
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@nmbro

nmbro commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Also fixes the CodeQL failure on master since 111ca16 (tests/nutsnprintftest.c failed under -Werror), see c3725f6.

@nmbro

nmbro commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Update: 167f2fd on master already fixed the clang half (-Wformat-nonliteral), same change as here. The gcc half (-Wformat-truncation at the deliberate truncating snprintf()) is still needed - CodeQL gcc jobs on 167f2fd keep failing.

nmbro and others added 3 commits October 21, 2026 18:56
PR builds do not save the build cache any more, so they need no early
deadline to leave time for it: let them use the whole hour (the step
scripts fall back to 3600 seconds when CI_DEADLINE_EPOCH is unset).

For other builds, move the deadline from 51 to 57 minutes. Job logs
show what still runs after it: 7z of the bundle ~45s (at -mx=3),
artifact upload and ccache stats ~10s, cache save 25-40s; deadline-hit
master jobs finished about 35s after it. That is ~1.5 minutes, so 57
leaves a margin of about 1.5 minutes before AppVeyor's 60-minute kill.

Suggested in review of PR networkupstools#3790.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
A failed master build saves the build cache right after the failing
step (APPVEYOR_SAVE_CACHE_ON_ERROR), but "ccache -c" only ran at the
end of 04-build_script.bat and in on_success. If the test or bundle
step failed (e.g. by the CI deadline) after compiling more objects,
the cache was saved without enforcing max_size, and could get near
the per-item cache size limit again.

Run "ccache -c" right after "make check" in 07-test_script.bat and
after "make install-win-bundle" in 08-after_test.bat, whatever their
result, and keep their exit codes (the 08 line drops "set -e" for
that; the only other command there already handles its failure).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: nmbro <nmbro@users.noreply.github.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@nmbro
nmbro force-pushed the appveyor-deadline-tweak branch 2 times, most recently from 3a11941 to e07382f Compare October 21, 2026 21:11
@nmbro

nmbro commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Dropped the nutsnprintftest commit: master fixed both halves meanwhile (167f2fd, 4248638), so this PR is AppVeyor-only again.

The Jenkins red here is "Discover slow build matrix: Failed to build stage" after ~25 min, with all quick tests passing; #3782 and #3791 fail the same way today, so it looks like a CI farm issue rather than this change.

jimklimov added a commit to nmbro/nut that referenced this pull request Oct 22, 2026
…mething finished, pruning ccache" to explain the long delay without log output [networkupstools#3794]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 22, 2026
…mething finished, pruning ccache" to explain the long delay without log output [networkupstools#3794]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov
jimklimov force-pushed the appveyor-deadline-tweak branch from fb0a929 to 59c1bd3 Compare October 22, 2026 07:37
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 22, 2026
…ange-check in process_stat_symlink() [networkupstools#3770]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…f() [#GHSA-ghqr-q65h-w9wg]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…melen` to satisfy compiler warnings

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov
jimklimov force-pushed the appveyor-deadline-tweak branch from 05a1181 to af1ca70 Compare October 22, 2026 13:39
@jimklimov

Copy link
Copy Markdown
Member

Also tries to fix some other bugs from recent merges, primarily exposed in Windows builds.

…t needed now that it is natively ssize_t (so always does not exceed SIZE_MAX/2) [networkupstools#3770]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…compare" with older-clang builds after all [networkupstools#3770]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 22, 2026
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov
jimklimov force-pushed the appveyor-deadline-tweak branch from dd6ad40 to c392718 Compare October 23, 2026 04:35
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 23, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 23, 2026
@AppVeyorBot

Copy link
Copy Markdown

✅ Build nut 2.8.5.5871-master completed (commit cd949c75df by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@jimklimov
jimklimov merged commit 8f293a4 into networkupstools:master Oct 23, 2026
130 of 134 checks passed
@nmbro
nmbro deleted the appveyor-deadline-tweak branch October 24, 2026 07:26
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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants