Windows Nightly #1786
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows Nightly | |
| on: | |
| schedule: | |
| - cron: '0 5 * * *' # run at 5 AM UTC | |
| workflow_dispatch: | |
| jobs: | |
| check_for_commits: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for new commits today | |
| id: check-new-commits | |
| shell: bash | |
| run: | | |
| # Get the timestamp from 24 hours ago | |
| CUTOFF_TIME=$(date -d '24 hours ago' +%s) | |
| # Get the timestamp of the latest commit | |
| LATEST_COMMIT=$(git log -1 --format=%ct) | |
| # Compare and set output | |
| if [ "$LATEST_COMMIT" -gt "$CUTOFF_TIME" ]; then | |
| echo "has-new-commits=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has-new-commits=false" >> $GITHUB_OUTPUT | |
| fi | |
| outputs: | |
| should_run: ${{ steps.check-new-commits.outputs.has-new-commits }} | |
| build: | |
| needs: check_for_commits | |
| if: ${{ needs.check_for_commits.outputs.should_run == 'true' }} | |
| runs-on: windows-2022 | |
| # Sign nightlies too, so opt-in beta testers don't hit a SmartScreen wall on | |
| # every build. Uses the `nightly` environment (no approval gate) for the OIDC | |
| # subject; signing is gated on the WINDOWS_SIGNING_ENABLED repo variable. | |
| environment: nightly | |
| permissions: | |
| id-token: write | |
| contents: write | |
| env: | |
| SIGN: ${{ vars.WINDOWS_SIGNING_ENABLED == 'true' }} | |
| # MSIX is only built/published when signing is on AND the publisher (which | |
| # must exactly match the Trusted Signing certificate subject) is configured. | |
| MSIX: ${{ vars.WINDOWS_SIGNING_ENABLED == 'true' && vars.MSIX_PUBLISHER != '' }} | |
| steps: | |
| - name: Checkout xLights | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Setup msbuild | |
| uses: microsoft/setup-msbuild@v3 | |
| - name: install ISPC | |
| uses: ispc/install-ispc-action@main | |
| with: | |
| version: 1.31.0 | |
| # glslc (Vulkan SDK Bin) compiles the .comp compute kernels to SPIR-V | |
| # headers via the Xlights.vcxproj CompileVulkanShaders pre-build target | |
| # (x64). The action exports VULKAN_SDK so that target's PowerShell script | |
| # finds glslc; without it the msbuild step fails at the pre-build event. | |
| - name: Install Vulkan SDK | |
| uses: jakoch/install-vulkan-sdk-action@v1 | |
| with: | |
| install_runtime: false | |
| cache: true | |
| # - name: install Inno | |
| # run: choco install innosetup | |
| - name: install python dependency | |
| run: pip install in_place | |
| - name: generate nightly version number | |
| working-directory: build_scripts\msw | |
| run: python WriteNightlyVersionFiles.py | |
| - name: Download wxWidgets | |
| run: | | |
| git clone --depth=1 --shallow-submodules --recurse-submodules -b xlights_2026.13 https://github.com/xLightsSequencer/wxWidgets ..\wxWidgets\ | |
| - name: Build wxWidgets | |
| working-directory: ..\wxWidgets\ | |
| run: msbuild /m .\build\msw\wx_vc17.sln /p:Configuration="Release" /p:Platform="x64" | |
| - name: Build All | |
| shell: cmd | |
| working-directory: build_scripts\msw | |
| run: call build_VS_x64_skip_libltc.cmd | |
| # --- Authenticode signing via Azure Trusted Signing (Kulp Lights LLC) ---- | |
| # Same approach as the release workflow: sign our executables, then the | |
| # installer. Only runs when WINDOWS_SIGNING_ENABLED is set. | |
| - name: Azure login (OIDC for Trusted Signing) | |
| if: env.SIGN == 'true' | |
| uses: azure/login@v3 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: Sign xLights.exe (Trusted Signing) | |
| if: env.SIGN == 'true' | |
| uses: azure/artifact-signing-action@v2 | |
| with: | |
| endpoint: https://eus.codesigning.azure.net/ | |
| signing-account-name: kulplightssigning | |
| certificate-profile-name: kulplights-public | |
| files-folder: xlights\x64\Release | |
| files-folder-filter: exe | |
| file-digest: SHA256 | |
| timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
| - name: Sign xlDo.exe (Trusted Signing) | |
| if: env.SIGN == 'true' | |
| uses: azure/artifact-signing-action@v2 | |
| with: | |
| endpoint: https://eus.codesigning.azure.net/ | |
| signing-account-name: kulplightssigning | |
| certificate-profile-name: kulplights-public | |
| files-folder: xlDo\x64\Release | |
| files-folder-filter: exe | |
| file-digest: SHA256 | |
| timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
| - name: Sign fseq_convert.exe (Trusted Signing) | |
| if: env.SIGN == 'true' | |
| uses: azure/artifact-signing-action@v2 | |
| with: | |
| endpoint: https://eus.codesigning.azure.net/ | |
| signing-account-name: kulplightssigning | |
| certificate-profile-name: kulplights-public | |
| files-folder: fseq_convert\cmake_vs\Release | |
| files-folder-filter: exe | |
| file-digest: SHA256 | |
| timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
| - name: Build Installer | |
| working-directory: build_scripts\msw | |
| run: ISCC.exe xLights_4_64bit_VS.iss | |
| - name: Sign installer (Trusted Signing) | |
| if: env.SIGN == 'true' | |
| uses: azure/artifact-signing-action@v2 | |
| with: | |
| endpoint: https://eus.codesigning.azure.net/ | |
| signing-account-name: kulplightssigning | |
| certificate-profile-name: kulplights-public | |
| files-folder: build_scripts\msw\output | |
| files-folder-filter: exe | |
| file-digest: SHA256 | |
| timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
| # --- MSIX package + nightly auto-update channel -------------------------- | |
| # Packages the (already-signed) build outputs into an MSIX, signs it with | |
| # the same Trusted Signing cert, and writes an .appinstaller pointing at the | |
| # stable `nightly`-tag asset URLs so testers auto-update on launch. | |
| - name: Build MSIX | |
| if: env.MSIX == 'true' | |
| shell: pwsh | |
| working-directory: build_scripts\msw\msix | |
| run: | | |
| ./BuildMSIX.ps1 -Revision ${{ github.run_number }} -IdentityName "${{ vars.MSIX_IDENTITY_NAME }}" -Publisher "${{ vars.MSIX_PUBLISHER }}" -PublisherDisplayName "${{ vars.MSIX_PUBLISHER_DISPLAY_NAME }}" -OutFile xLights-x64.msix | |
| - name: Sign MSIX (Trusted Signing) | |
| if: env.MSIX == 'true' | |
| uses: azure/artifact-signing-action@v2 | |
| with: | |
| endpoint: https://eus.codesigning.azure.net/ | |
| signing-account-name: kulplightssigning | |
| certificate-profile-name: kulplights-public | |
| files-folder: build_scripts\msw\output | |
| files-folder-filter: msix | |
| file-digest: SHA256 | |
| timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
| - name: Generate .appinstaller | |
| if: env.MSIX == 'true' | |
| shell: pwsh | |
| working-directory: build_scripts\msw\msix | |
| run: | | |
| $ver = (Get-Content ..\output\msix_version.txt -Raw).Trim() | |
| ./MakeAppInstaller.ps1 -Version $ver -IdentityName "${{ vars.MSIX_IDENTITY_NAME }}" -Publisher "${{ vars.MSIX_PUBLISHER }}" -BaseUrl "${{ github.server_url }}/${{ github.repository }}/releases/download/nightly" -MsixFileName xLights-x64.msix -OutFile ..\output\xLights.appinstaller | |
| - name: Upload Installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: xLights_x64_Installer | |
| path: 'build_scripts\msw\output\**' | |
| - name: Create prerelease | |
| if: github.ref == 'refs/heads/master' | |
| uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| prerelease: true | |
| automatic_release_tag: "nightly" | |
| title: "nightly" | |
| files: | | |
| ./build_scripts/msw/output/*.exe | |
| # Add the MSIX + .appinstaller to the nightly release the step above just | |
| # (re)created. Done separately (not in the files list above) because that | |
| # action errors on a glob that matches nothing - which is the normal case | |
| # when MSIX is disabled. --clobber replaces the stable-named assets so the | |
| # .appinstaller URLs stay constant across nightlies. | |
| - name: Publish MSIX to nightly release | |
| if: env.MSIX == 'true' && github.ref == 'refs/heads/master' | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload nightly \ | |
| "build_scripts/msw/output/xLights-x64.msix" \ | |
| "build_scripts/msw/output/xLights.appinstaller" \ | |
| --clobber |