Skip to content

Commit

Permalink
GHA build installer
Browse files Browse the repository at this point in the history
  • Loading branch information
megahirt committed Mar 27, 2024
1 parent 0afb81d commit 1e43f0c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
name: Build Solid
name: Solid - Build, Test, Installer

on:
push:

jobs:
build:
build-and-test:
# note that the older .Net 4.6.1 isn't installed on windows-latest anymore
# see https://github.com/actions/runner-images/issues/5055
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: microsoft/setup-msbuild@v2

- uses: actions/cache@v3
# the caching mechanism below and the corresponding "if" conditions for nuget and TC dependencies is sort of a hack
# These deps never change so we cache them to speed up the GHA build. As we move to all deps in nuget, we should remove these lines
# and allow nuget to manage caching (remove "if" condition statements)
- uses: actions/cache@v4
with:
path: |
src\packages
Expand Down Expand Up @@ -42,7 +45,8 @@ jobs:
working-directory: lib
run: find .

- name: Build Solid
# NUnit tests are only built with debug configuration
- name: Build Solid for NUnit tests
run: msbuild /p:Configuration=Debug /p:Platform=x86 src/solid.sln

- name: Install NUnit.Runner
Expand All @@ -68,3 +72,33 @@ jobs:
lib/
if-no-files-found: error
retention-days: 1

installer:
name: Make Solid installer
needs: build-and-test
runs-on: windows-2019

steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- uses: actions/cache@v4
with:
path: |
src\packages
lib
key: ${{ runner.os }}-nuget-${{ hashFiles('src/SolidGui/packages.config') }} # hash of one packages.config (there are others)

# nuget and TC dependencies come from the cache

- name: Build Solid for Release
run: msbuild /p:Configuration=Release src/solid.sln

- name: Build Installer
run: iscc installer/setup.iss

- name: Save installer as artifact
uses: actions/upload-artifact@v4
with:
name: solid-installer
path: installer\Output\SolidInstaller.exe
if-no-files-found: error
4 changes: 2 additions & 2 deletions installer/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ LicenseFile=license.rtf
OutputBaseFilename=SolidInstaller
Compression=lzma
SolidCompression=yes
WizardImageFile=compiler:WIZMODERNIMAGE-IS.BMP
;WizardImageFile=compiler:WIZMODERNIMAGE-IS.BMP
CreateUninstallRegKey=true
;JMC: If we do switch over to installing just for the current user, then do the following.
; PrivilegesRequired=lowest
Expand Down Expand Up @@ -75,7 +75,7 @@ Source: ..\templates\PLB SFM.txt; DestDir: {app}\templates
Source: ..\Solid Examples\BambaraSolidDemo.db; DestDir: {userdocs}\Solid Examples
Source: ..\Solid Examples\BambaraTutorial2.db; DestDir: {userdocs}\Solid Examples
Source: ..\doc\Solid Manual\Solid Documentation.pdf; DestDir: {app}
Source: ..\license_MIT.txt; DestDir: {app}
Source: ..\LICENSE.md; DestDir: {app}
Source: ..\DistFiles\*.*; DestDir: {app}\DistFiles
Source: ..\ArtWork\solid.png; DestDir: {app}\ArtWork

Expand Down

0 comments on commit 1e43f0c

Please sign in to comment.