|
6 | 6 | branches: [ master ]
|
7 | 7 | pull_request:
|
8 | 8 | branches: [ master ]
|
| 9 | + # add a cron job to run every month -- this project is not very active, at least ensure there's a valid CI build every month |
| 10 | + # this is also useful to check if something breaks e.g. due to infrastructure changes (e.g. Ubuntu/Windows OS) |
| 11 | + schedule: |
| 12 | + - cron: '0 0 1 * *' |
9 | 13 |
|
10 | 14 | jobs:
|
11 | 15 | LinuxBuild:
|
|
27 | 31 | with:
|
28 | 32 | name: NetlistViewer, Linux x86_64
|
29 | 33 | path: NetlistViewer/build/linux/NetlistViewer
|
| 34 | + if-no-files-found: error |
30 | 35 |
|
31 | 36 | WindowsBuild:
|
32 | 37 | runs-on: windows-latest
|
|
39 | 44 | # NOTE: no packages/dependencies are installed at this time -- msbuild will use vcpkg to download&build dependencies
|
40 | 45 | # specified in the vcpkg.json during the build step below. This happens because the VisualStudio solution has
|
41 | 46 | # the 'VcpkgEnableManifest' property set to True
|
42 |
| - - name: Setup anew (or from cache) vcpkg (and does not build any package) |
| 47 | + - name: Setup a new (or from cache) vcpkg (and does not build any package) |
43 | 48 | uses: lukka/run-vcpkg@v11.5
|
44 | 49 | with:
|
45 | 50 | # as suggested, we pin the version of "vcpkg" to a specific hash (23rd March 2025) to ensure reproducible builds
|
|
55 | 60 | - name: Build netlist-viewer
|
56 | 61 | run: msbuild NetlistViewer\build\win\netlist_viewer_vs2022.vcxproj -t:rebuild -property:Configuration=Release -property:Platform=x64
|
57 | 62 |
|
58 |
| - # save the whole folder containing the binary and DLLs |
| 63 | + # save the whole folder containing the binary and DLLs as workflow artifact |
59 | 64 | - name: Save built binaries
|
60 | 65 | uses: actions/upload-artifact@v4
|
61 | 66 | with:
|
62 | 67 | name: NetlistViewer, Windows x86_64
|
63 | 68 | path: NetlistViewer/build/win/x64/Release/
|
| 69 | + if-no-files-found: error |
| 70 | + |
| 71 | + # snippet of actions taken from https://github.com/NSIS-Dev/ci-examples/blob/main/.github/workflows/windows-latest.yml |
| 72 | + - name: Install NSIS |
| 73 | + run: | |
| 74 | + iwr -useb get.scoop.sh -outfile 'install.ps1' |
| 75 | + .\install.ps1 -RunAsAdmin |
| 76 | + scoop update |
| 77 | + scoop bucket add extras |
| 78 | + scoop install nsis |
| 79 | + - name: Print NSIS version |
| 80 | + run: makensis -VERSION |
| 81 | + - name: Print NSIS compile flags |
| 82 | + run: makensis -HDRINFO |
| 83 | + |
| 84 | + # now build the actual Windows installer: |
| 85 | + - name: Run NSIS |
| 86 | + run: makensis /V2 setup.nsi |
| 87 | + working-directory: NetlistViewer/distrib |
| 88 | + |
| 89 | + # save the whole folder containing the binary and DLLs as workflow artifact |
| 90 | + - name: Save built installer |
| 91 | + uses: actions/upload-artifact@v4 |
| 92 | + with: |
| 93 | + name: NetlistViewer, Windows Installer |
| 94 | + path: NetlistViewer/distrib/NetlistViewer-*-win-installer.exe |
| 95 | + if-no-files-found: error |
0 commit comments