From fd5da5de7479f53d8f7d43e1329591f59abdd82b Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 5 Nov 2024 13:53:05 -0500 Subject: [PATCH] Add conf to build matrix --- .github/workflows/build_check.yml | 13 +++++++------ .github/workflows/build_cli.yml | 13 +++++++------ .github/workflows/build_ui.yml | 21 +++++++++++---------- CHANGELIST.md | 1 + 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 2002267e..aad1d49a 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -13,6 +13,7 @@ jobs: project: [MPF.Check] runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64] framework: [net8.0] #[net20, net35, net40, net452, net472, net48, netcoreapp3.1, net5.0, net6.0, net7.0, net8.0] + conf: [Debug] #[Release, Debug] steps: - uses: actions/checkout@v4 @@ -26,24 +27,24 @@ jobs: run: dotnet restore - name: Build - run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c Debug --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8')) && '-p:PublishSingleFile=true' || ''}} + run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c ${{ matrix.conf }} --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8')) && '-p:PublishSingleFile=true' || ''}} - name: Archive build run: | - cd ${{ matrix.project }}/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ - zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip ./ + cd ${{ matrix.project }}/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ + zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip ./ - name: Upload build uses: actions/upload-artifact@v4 with: - name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug - path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip + name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }} + path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip - name: Upload to rolling uses: ncipollo/release-action@v1.14.0 with: allowUpdates: True - artifacts: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip + artifacts: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip body: 'Last built commit: ${{ github.sha }}' name: 'Rolling Release' prerelease: True diff --git a/.github/workflows/build_cli.yml b/.github/workflows/build_cli.yml index 9da8c711..48db2a37 100644 --- a/.github/workflows/build_cli.yml +++ b/.github/workflows/build_cli.yml @@ -13,6 +13,7 @@ jobs: project: [MPF.CLI] runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64] framework: [net8.0] #[net20, net35, net40, net452, net472, net48, netcoreapp3.1, net5.0, net6.0, net7.0, net8.0] + conf: [Debug] #[Release, Debug] steps: - uses: actions/checkout@v4 @@ -26,24 +27,24 @@ jobs: run: dotnet restore - name: Build - run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c Debug --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8')) && '-p:PublishSingleFile=true' || ''}} + run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c ${{ matrix.conf }} --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8')) && '-p:PublishSingleFile=true' || ''}} - name: Archive build run: | - cd ${{ matrix.project }}/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ - zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip ./ + cd ${{ matrix.project }}/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ + zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip ./ - name: Upload build uses: actions/upload-artifact@v4 with: - name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug - path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip + name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }} + path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip - name: Upload to rolling uses: ncipollo/release-action@v1.14.0 with: allowUpdates: True - artifacts: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip + artifacts: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip body: 'Last built commit: ${{ github.sha }}' name: 'Rolling Release' prerelease: True diff --git a/.github/workflows/build_ui.yml b/.github/workflows/build_ui.yml index 1e2feeb0..a18e09ba 100644 --- a/.github/workflows/build_ui.yml +++ b/.github/workflows/build_ui.yml @@ -13,6 +13,7 @@ jobs: project: [MPF.UI] runtime: [win-x86, win-x64] framework: [net8.0-windows] #[net40, net452, net472, net48, netcoreapp3.1, net5.0-windows, net6.0-windows, net7.0-windows, net8.0-windows] + conf: [Debug] #[Release, Debug] steps: - uses: actions/checkout@v4 @@ -26,38 +27,38 @@ jobs: run: dotnet restore - name: Build - run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c Debug --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8')) && '-p:PublishSingleFile=true' || ''}} + run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c ${{ matrix.conf }} --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8')) && '-p:PublishSingleFile=true' || ''}} - name: Bundle DiscImageCreator run: | wget https://github.com/user-attachments/files/17211434/DiscImageCreator_20241001.zip unzip -u DiscImageCreator_20241001.zip - mkdir -p MPF.UI/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator - mv Release_ANSI/* MPF.UI/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/ + mkdir -p MPF.UI/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator + mv Release_ANSI/* MPF.UI/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/ - name: Bundle Redumper run: | wget https://github.com/superg/redumper/releases/download/build_416/redumper-2024.10.12_build416-win64.zip unzip redumper-2024.10.12_build416-win64.zip - mkdir -p MPF.UI/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Redumper - mv redumper-2024.10.12_build416-win64/bin/redumper.exe MPF.UI/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Redumper/ + mkdir -p MPF.UI/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Redumper + mv redumper-2024.10.12_build416-win64/bin/redumper.exe MPF.UI/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Redumper/ - name: Archive build run: | - cd ${{ matrix.project }}/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ - zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip ./ + cd ${{ matrix.project }}/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ + zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip ./ - name: Upload build uses: actions/upload-artifact@v4 with: - name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug - path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip + name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }} + path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip - name: Upload to rolling uses: ncipollo/release-action@v1.14.0 with: allowUpdates: True - artifacts: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_debug.zip + artifacts: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip body: 'Last built commit: ${{ github.sha }}' name: 'Rolling Release' prerelease: True diff --git a/CHANGELIST.md b/CHANGELIST.md index 10e7b01d..f498b1b1 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -37,6 +37,7 @@ - Remove last instances of ValueTuple usage - Update BinaryObjectScanner to 3.1.16 - Attempt to reduce nesting in GHA builds +- Add conf to build matrix ### 3.2.2 (2024-09-24)