Skip to content

windows-daily

windows-daily #120

Workflow file for this run

name: windows-daily
on:
schedule:
# the daily pre-release artifacts
- cron: "0 1 * * *"
# the test run, offset so the two don't queue for a runner together
- cron: "20 4 * * *"
repository_dispatch:
types: [build-daily]
workflow_dispatch:
inputs:
tests:
description: "only these tests (comma-separated, e.g. issue-1195); empty = all"
required: false
default: ""
permissions:
contents: read
jobs:
build-daily:
name: Daily build
# only its own cron; a workflow_dispatch or the build-daily dispatch runs it too
if: github.event_name != 'schedule' || github.event.schedule == '0 1 * * *'
#runs-on: SumatraBuilder
runs-on: windows-2025-vs2026
steps:
- name: Check out source code
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
# needed to calc build number via git log --oneline
fetch-depth: 0
persist-credentials: false
- name: Install bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
# cmd/build.ts -daily only builds master of this repo; on a fork or a
# branch it exits early
- name: Build
run: bun .\cmd\build.ts -daily
test:
name: Windows debug ASan build + tests
# not for the build-daily dispatch: that one asks for artifacts, not tests
if: >-
github.event_name != 'repository_dispatch' &&
(github.event_name != 'schedule' || github.event.schedule == '20 4 * * *')
runs-on: windows-2025-vs2026
# the suite drives a real GUI; a hung test should fail the run, not sit
# there burning runner minutes
timeout-minutes: 120
steps:
- name: Check out source code
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- name: Install bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
# ASan so the run catches memory errors the tests walk into, not just
# wrong behavior. Produces out/dbg64_asan/SumatraPDF-static.exe plus the
# ASan runtime dll next to it.
- name: Build (debug, ASan)
run: bun cmd/build.ts -asan -dbg
# unit tests are compiled into the debug exe; -for-ai prints assertion
# and crash callstacks instead of waiting for a debugger
- name: Run unit tests
run: .\out\dbg64_asan\SumatraPDF-static.exe -unit-tests -for-ai
# run-github-ci.ts runs every test that can run here, doesn't stop at the
# first failure, and exits non-zero if any failed
- name: Run tests
env:
SUMATRA_TEST_EXE: ${{ github.workspace }}\out\dbg64_asan\SumatraPDF-static.exe
run: bun tests/run-github-ci.ts ${{ inputs.tests }}
# what the failing tests left behind: screenshots, logs, generated files
- name: Upload test output
if: failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test-output
path: |
tests/tmp
.work/test-times.txt
if-no-files-found: ignore
retention-days: 7
ng:
name: Windows ng (${{ matrix.config }})
if: github.event_name != 'schedule' || github.event.schedule == '0 1 * * *'
runs-on: windows-2025-vs2026
strategy:
fail-fast: false
matrix:
config: [dbg, rel]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- name: Build ng
run: bun cmd/ng-build.ts -${{ matrix.config }} SumatraPDF
- name: Run ng unit tests
run: bun cmd/ng-build.ts -${{ matrix.config }} test_util -run -- -for-ai
- name: Upload ng binary
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: ng-win-${{ matrix.config }}
path: out/win/${{ matrix.config }}/SumatraPDF.exe
if-no-files-found: error
retention-days: 7