From 8ab4e1878b3d8d497b65da1f03d273babbc47bb1 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:07:03 +0200 Subject: [PATCH 01/11] Update msbuild.yml --- .github/workflows/msbuild.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index c9411eb..f93683c 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -1,18 +1,16 @@ name: MSBuild on: - push: - branches: [ "aboveS20", "belowS20" ] - pull_request: - branches: [ "aboveS20", "belowS20" ] + workflow_call: + inputs: + branch: + description: 'The name of the branch to checkout and build' + required: true + type: string + env: - # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: . - - # Configuration type to build. - # You can convert this to a build matrix if you need coverage of multiple configuration types. - # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix BUILD_CONFIGURATION: Release permissions: @@ -24,6 +22,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch }} - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1.0.2 @@ -34,8 +34,6 @@ jobs: - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} - # Add additional options to the MSBuild command line here (like platform or verbosity level). - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} - name: Upload Release Artifact From e521827a04867fab11b5d10c30fee944e3bc5ac7 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:11:22 +0200 Subject: [PATCH 02/11] Update and rename branches.yml to aboveS20.yml --- .../workflows/{branches.yml => aboveS20.yml} | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) rename .github/workflows/{branches.yml => aboveS20.yml} (77%) diff --git a/.github/workflows/branches.yml b/.github/workflows/aboveS20.yml similarity index 77% rename from .github/workflows/branches.yml rename to .github/workflows/aboveS20.yml index 1232a16..045d51c 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/aboveS20.yml @@ -1,4 +1,4 @@ -name: Update belowS20 and aboveS20 Branches +name: Update aboveS20 Branches on: push: @@ -8,7 +8,7 @@ on: permissions: contents: write -jobs: +jobs: update-branches: runs-on: ubuntu-latest steps: @@ -22,16 +22,9 @@ jobs: - name: Delete branches locally and on remote run: | - git push origin --delete belowS20 || true git push origin --delete aboveS20 || true - git branch -D belowS20 || true git branch -D aboveS20 || true - - name: Create belowS20 branch from master - run: | - git checkout -b belowS20 - git push origin belowS20 - - name: Create aboveS20 branch from master and modify inc.h run: | git checkout master @@ -40,3 +33,16 @@ jobs: git add "./Project Reboot 3.0/inc.h" git commit -m "Add #define ABOVE_S20 to inc.h in aboveS20 branch" git push origin aboveS20 + + build-master: + uses: ./.github/workflows/msbuild.yml + with: + branch: "master" + + build-aboveS20: + uses: ./.github/workflows/msbuild.yml + with: + branch: "aboveS20" + + + From 8084a087aa84902bc13b308ccc66d9bb0d994842 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:13:20 +0200 Subject: [PATCH 03/11] Update aboveS20.yml --- .github/workflows/aboveS20.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aboveS20.yml b/.github/workflows/aboveS20.yml index 045d51c..319d624 100644 --- a/.github/workflows/aboveS20.yml +++ b/.github/workflows/aboveS20.yml @@ -35,12 +35,12 @@ jobs: git push origin aboveS20 build-master: - uses: ./.github/workflows/msbuild.yml + uses: .github/workflows/msbuild.yml with: branch: "master" build-aboveS20: - uses: ./.github/workflows/msbuild.yml + uses: .github/workflows/msbuild.yml with: branch: "aboveS20" From 62dedcab8ac3f226ddf64fc73854fd1b58a2322b Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:15:33 +0200 Subject: [PATCH 04/11] Update aboveS20.yml --- .github/workflows/aboveS20.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/aboveS20.yml b/.github/workflows/aboveS20.yml index 319d624..eb6a553 100644 --- a/.github/workflows/aboveS20.yml +++ b/.github/workflows/aboveS20.yml @@ -34,15 +34,12 @@ jobs: git commit -m "Add #define ABOVE_S20 to inc.h in aboveS20 branch" git push origin aboveS20 - build-master: - uses: .github/workflows/msbuild.yml - with: - branch: "master" + - name: Builds the master branch + uses: ./.github/workflows/msbuild.yml + with: + branch: "master" - build-aboveS20: - uses: .github/workflows/msbuild.yml - with: - branch: "aboveS20" - - - + - name: Builds the aboveS20 branch + uses: ./.github/workflows/msbuild.yml + with: + branch: "aboveS20" From 9db52eacc898cbd70dfeab660e4a7998c766ddf4 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:18:23 +0200 Subject: [PATCH 05/11] Update msbuild.yml --- .github/workflows/msbuild.yml | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index f93683c..96487b2 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -21,25 +21,25 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.branch }} + - uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch }} - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 - - name: Restore NuGet packages - working-directory: ${{env.GITHUB_WORKSPACE}} - run: nuget restore ${{env.SOLUTION_FILE_PATH}} + - name: Restore NuGet packages + working-directory: ${{env.GITHUB_WORKSPACE}} + run: nuget restore ${{env.SOLUTION_FILE_PATH}} - - name: Build - working-directory: ${{env.GITHUB_WORKSPACE}} - run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} + - name: Build + working-directory: ${{env.GITHUB_WORKSPACE}} + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} - - name: Upload Release Artifact - uses: actions/upload-artifact@v3 - with: - name: Release - path: ${{env.SOLUTION_FILE_PATH}}/x64/Release - if-no-files-found: warn - retention-days: 60 + - name: Upload Release Artifact + uses: actions/upload-artifact@v3 + with: + name: Release + path: ${{env.SOLUTION_FILE_PATH}}/x64/Release + if-no-files-found: warn + retention-days: 60 From 9c2cfc973aea5119b64bc7f67c2c2da9447970d0 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:19:42 +0200 Subject: [PATCH 06/11] Update msbuild.yml --- .github/workflows/msbuild.yml | 54 +++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 96487b2..ce1a796 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -1,16 +1,18 @@ name: MSBuild on: - workflow_call: - inputs: - branch: - description: 'The name of the branch to checkout and build' - required: true - type: string - + push: + branches: [ "aboveS20", "belowS20" ] + pull_request: + branches: [ "aboveS20", "belowS20" ] env: + # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: . + + # Configuration type to build. + # You can convert this to a build matrix if you need coverage of multiple configuration types. + # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix BUILD_CONFIGURATION: Release permissions: @@ -21,25 +23,27 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.branch }} + - uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch }} - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 - - name: Restore NuGet packages - working-directory: ${{env.GITHUB_WORKSPACE}} - run: nuget restore ${{env.SOLUTION_FILE_PATH}} + - name: Restore NuGet packages + working-directory: ${{env.GITHUB_WORKSPACE}} + run: nuget restore ${{env.SOLUTION_FILE_PATH}} - - name: Build - working-directory: ${{env.GITHUB_WORKSPACE}} - run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} + - name: Build + working-directory: ${{env.GITHUB_WORKSPACE}} + # Add additional options to the MSBuild command line here (like platform or verbosity level). + # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} - - name: Upload Release Artifact - uses: actions/upload-artifact@v3 - with: - name: Release - path: ${{env.SOLUTION_FILE_PATH}}/x64/Release - if-no-files-found: warn - retention-days: 60 + - name: Upload Release Artifact + uses: actions/upload-artifact@v3 + with: + name: Release + path: ${{env.SOLUTION_FILE_PATH}}/x64/Release + if-no-files-found: warn + retention-days: 60 From 1c47a757f216e9536ca2b05b62fcd751301eccd0 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:21:40 +0200 Subject: [PATCH 07/11] Update aboveS20.yml --- .github/workflows/aboveS20.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aboveS20.yml b/.github/workflows/aboveS20.yml index eb6a553..2cba61a 100644 --- a/.github/workflows/aboveS20.yml +++ b/.github/workflows/aboveS20.yml @@ -34,12 +34,22 @@ jobs: git commit -m "Add #define ABOVE_S20 to inc.h in aboveS20 branch" git push origin aboveS20 - - name: Builds the master branch + - name: Checkout master branch + uses: actions/checkout@v3 + with: + ref: master + + - name: Build the master branch uses: ./.github/workflows/msbuild.yml with: - branch: "master" + branch: master - - name: Builds the aboveS20 branch + - name: Checkout aboveS20 branch + uses: actions/checkout@v3 + with: + ref: aboveS20 + + - name: Build the aboveS20 branch uses: ./.github/workflows/msbuild.yml with: - branch: "aboveS20" + branch: aboveS20 From 8c230056673383e0e7b023f269705710cdeac57d Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:23:20 +0200 Subject: [PATCH 08/11] Update aboveS20.yml --- .github/workflows/aboveS20.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aboveS20.yml b/.github/workflows/aboveS20.yml index 2cba61a..d27b239 100644 --- a/.github/workflows/aboveS20.yml +++ b/.github/workflows/aboveS20.yml @@ -40,7 +40,7 @@ jobs: ref: master - name: Build the master branch - uses: ./.github/workflows/msbuild.yml + uses: ./../.github/workflows/msbuild.yml with: branch: master @@ -50,6 +50,6 @@ jobs: ref: aboveS20 - name: Build the aboveS20 branch - uses: ./.github/workflows/msbuild.yml + uses: ./../.github/workflows/msbuild.yml with: branch: aboveS20 From ed4ae29f72a2fde7aaa3062a19f4e4a34675ccc4 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:25:57 +0200 Subject: [PATCH 09/11] Update aboveS20.yml --- .github/workflows/aboveS20.yml | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/aboveS20.yml b/.github/workflows/aboveS20.yml index d27b239..5d0c3b5 100644 --- a/.github/workflows/aboveS20.yml +++ b/.github/workflows/aboveS20.yml @@ -8,7 +8,7 @@ on: permissions: contents: write -jobs: +jobs: update-branches: runs-on: ubuntu-latest steps: @@ -34,22 +34,12 @@ jobs: git commit -m "Add #define ABOVE_S20 to inc.h in aboveS20 branch" git push origin aboveS20 - - name: Checkout master branch - uses: actions/checkout@v3 - with: - ref: master - - - name: Build the master branch - uses: ./../.github/workflows/msbuild.yml - with: - branch: master + build-master: + uses: ./.github/workflows/msbuild.yml + with: + branch: master - - name: Checkout aboveS20 branch - uses: actions/checkout@v3 - with: - ref: aboveS20 - - - name: Build the aboveS20 branch - uses: ./../.github/workflows/msbuild.yml - with: - branch: aboveS20 + build-aboveS20: + uses: ./.github/workflows/msbuild.yml + with: + branch: aboveS20 From 8758c98742e69c7636f59d0aee9f90ec5da98a76 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:28:05 +0200 Subject: [PATCH 10/11] Update msbuild.yml --- .github/workflows/msbuild.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index ce1a796..def27c9 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -1,10 +1,11 @@ name: MSBuild on: - push: - branches: [ "aboveS20", "belowS20" ] - pull_request: - branches: [ "aboveS20", "belowS20" ] + workflow_call: + inputs: + branch: + required: true + type: string env: # Path to the solution file relative to the root of the project. From 5fc7130890de3e538e589a729174b20649435c32 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Tue, 1 Oct 2024 12:29:27 +0200 Subject: [PATCH 11/11] Update aboveS20.yml --- .github/workflows/aboveS20.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/aboveS20.yml b/.github/workflows/aboveS20.yml index 5d0c3b5..f539085 100644 --- a/.github/workflows/aboveS20.yml +++ b/.github/workflows/aboveS20.yml @@ -36,10 +36,12 @@ jobs: build-master: uses: ./.github/workflows/msbuild.yml + needs: update-branches with: branch: master build-aboveS20: uses: ./.github/workflows/msbuild.yml + needs: update-branches with: branch: aboveS20