From 7293d61b112c78bab55da3d98987a8104086a293 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Sun, 19 Nov 2023 20:37:01 +0100 Subject: [PATCH] Add workflow --- .gitea/workflows/test.yaml | 45 ++++++++++++++++++++++++++++++++++++ .gitignore | 1 + Installer/Installer.wixproj | 6 ++--- Installer/MainComponents.wxs | 2 +- 4 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..f78a8da --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,45 @@ +name: Test MS build +run-name: Test MS build +on: [push] + +jobs: + test: + name: Test + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.1 + - name: Setup NuGet + uses: nuget/setup-nuget@v1 + - name: Restore NuGet packages + shell: powershell + run: $(& nuget restore Elwig.sln; $a=$lastexitcode) | findstr x*; exit $a + - name: Build Elwig + shell: powershell + run: $(& msbuild -verbosity:quiet Elwig/Elwig.csproj -property:Configuration=Debug; $a=$lastexitcode) | findstr x*; exit $a + - name: Run Tests + shell: powershell + run: $(& dotnet test Tests; $a=$lastexitcode) | findstr x*; exit $a + build: + name: Build + needs: [test] + runs-on: windows-latest + strategy: + matrix: + configuration: [Release] + platform: [x64] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.1 + - name: Setup NuGet + uses: nuget/setup-nuget@v1 + - name: Restore NuGet packages + shell: powershell + run: $(& nuget restore Elwig.sln; $a=$lastexitcode) | findstr x*; exit $a + - name: Build Installer + shell: powershell + run: $(& msbuild -verbosity:quiet Installer/Installer.wixproj -property:Configuration=${{ matrix.configuration }} -property:Platform=${{ matrix.platform }}; $a=$lastexitcode) | findstr x*; exit $a diff --git a/.gitignore b/.gitignore index cbefbbf..8685f53 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ bin/ *.user .vs .idea +PDFtoPrinter.exe diff --git a/Installer/Installer.wixproj b/Installer/Installer.wixproj index 2bd20a4..5177439 100644 --- a/Installer/Installer.wixproj +++ b/Installer/Installer.wixproj @@ -25,8 +25,8 @@ - - + + @@ -62,4 +62,4 @@ - \ No newline at end of file + diff --git a/Installer/MainComponents.wxs b/Installer/MainComponents.wxs index 0774fa7..cdd66a7 100644 --- a/Installer/MainComponents.wxs +++ b/Installer/MainComponents.wxs @@ -11,7 +11,7 @@ - +