From 633329ede28f4c825edd948f7d06bf38ce20d995 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Sun, 11 Jun 2023 16:59:19 +0930 Subject: [PATCH 01/29] ci: refactor msbuild workflow to be reusable Disable msbuild workflow triggers on push to master/dev branches and add parameters for workflow call inputs Remove `push` workflow triggers, as they are no longer required and will be triggered by calling workflow. Add inout parameters to define which build configuration to use an whether this run should upload its build artefacts. --- .github/workflows/msbuild.yml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 5e120dfc4..d0df9ff1c 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -1,24 +1,27 @@ name: Windows Build on: - push: - branches: - - master - - development - workflow_dispatch: + # Triggers the workflow when called by a top-level workflow + workflow_call: + inputs: + upload_artefacts: + type: boolean + required: false + default: false + build_configuration: # "Final" + type: string + required: false + default: "Final" + env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: RTEA.sln - # 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: "Final" - jobs: build: + name: Windows Build runs-on: windows-latest steps: @@ -31,11 +34,12 @@ jobs: 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}} + run: msbuild /m /p:Configuration="${{inputs.build_configuration}}" ${{env.SOLUTION_FILE_PATH}} - - name: Upload Artifact2 + - name: Upload Artifact + if: ${{inputs.upload_artefacts}} uses: actions/upload-artifact@v3 with: name: Cortex Command.exe path: D:/a/Cortex-Command-Community-Project-Source/Cortex-Command-Community-Project-Data/Cortex Command x64.exe - if-no-files-found: warn + if-no-files-found: fail From dd517928242a760fe9b3bbac9f5ff5667310e204 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Sun, 11 Jun 2023 17:06:01 +0930 Subject: [PATCH 02/29] ci: refactor meson build workflow to be reusable Rework the meson build workflow to act as a callable workflow in a composite job. Disable triggering on pushes to dev/master. Add input parameters to call this workflow with, that dictate: - whether to upload build artefacts from this workflow - which meson build type to use (release/debug) - which debug level, if any, to compile the code at. Switched `meson 0.6.0 => 0.6.3` to match the version in our CI script. Split Meson setup/configuration to accommodate upload/non-upload invocations of the workflow Configured the upload step to fail with errors if no artefacts are found to be uploaded (when the relevant setting is configured). --- .github/workflows/meson.yml | 66 +++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 2ccad5aad..ffc816a15 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -1,22 +1,33 @@ name: Meson Build (Linux, macOS) # Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the development branch - push: - branches: [ master, development ] - release: + # Triggers the workflow when manually dispatched workflow_dispatch: + # Triggers the workflow when called by a top-level workflow + workflow_call: + inputs: + upload_artefacts: + type: boolean + required: false + default: false + build_type: # "release", "debug" + type: string + required: false + default: "release" + debug_level: # "full", "minimal", "release" + # TODO: Standardise these, so capitalization is preserved between the windows/linux builds. + type: string + required: false + default: "release" -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build-release-linux: - # The type of runner that the job will run on - runs-on: ubuntu-latest + build-linux: + + runs-on: ubuntu-latest + name: Linux Build - # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 @@ -26,7 +37,7 @@ jobs: run: | sudo apt-get update -yq sudo apt-get install --no-install-recommends wget liballegro4-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.2-dev libminizip-dev liblz4-dev libpng++-dev libx11-dev libboost-dev libtbb-dev libsdl2-dev libopengl-dev libfuse2 ninja-build - sudo pip install meson==0.60.0 + sudo pip install meson==0.60.3 - name: Install Clang # You may pin to the exact commit or the version. @@ -36,26 +47,42 @@ jobs: # Set up cc/c++ executables cc: 1 # optional, default is 1 + - name: Setup Meson + env: + CC: "gcc" + CXX: "g++" + run: | + meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} build + + - name: Configure for AppImage + if: ${{inputs.upload_artefacts}} + env: + CC: "gcc" + CXX: "g++" + run: meson configure -Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=/usr/lib/ --prefix=/usr/ build + - name: Build env: CC: "gcc" CXX: "g++" run: | - meson setup --buildtype=release -Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=/usr/lib/ --prefix=/usr/ build meson compile -C build - + - name: Create AppDir + if: ${{inputs.upload_artefacts}} run: | echo "Setting output prefix" DESTDIR=${GITHUB_WORKSPACE}/build/AppDir meson install -C $GITHUB_WORKSPACE"/build" - name: Download linuxdeploy + if: ${{inputs.upload_artefacts}} working-directory: ${{env.GITHUB_WORKSPACE}} run: | wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O lindeploy chmod +x lindeploy - name: Create AppImage + if: ${{inputs.upload_artefacts}} working-directory: ${{env.GITHUB_WORKSPACE}} env: LD_LIBRARY_PATH: ./external/lib/linux/x86_64/ @@ -65,13 +92,16 @@ jobs: ./lindeploy --appdir=build/AppDir --output appimage - name: Upload Appimage + if: ${{inputs.upload_artefacts}} uses: actions/upload-artifact@v3 with: name: CortexCommand (Linux) path: CortexCommand.AppImage + if-no-files-found: fail - build-release-macos: + build-macos: runs-on: macos-latest + name: MacOS Build steps: - uses: actions/checkout@v3 @@ -79,19 +109,21 @@ jobs: - name: Install Dependencies run: | - brew install pkg-config tbb sdl2 minizip lz4 flac luajit lua@5.1 libpng gcc ninja meson - + brew install pkg-config tbb sdl2 minizip lz4 flac luajit lua@5.1 libpng gcc@12 ninja meson + - name: Build env: CC: "gcc-12" CXX: "g++-12" LDFLAGS: "-static-libgcc -static-libstdc++" run: | - meson setup --buildtype=release -Ddebug_type=release build + meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} build meson compile -C build - name: Artifact Deploy + if: ${{inputs.upload_artefacts}} uses: actions/upload-artifact@v3 with: name: CortexCommand (macOS) path: build/CortexCommand + if-no-files-found: fail From 82e8087be59459fc7ffc42431fb0acb88596c7b9 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Sun, 11 Jun 2023 17:08:29 +0930 Subject: [PATCH 03/29] ci: refactor to set meson version via an environment variable --- .github/workflows/meson.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index ffc816a15..cb60fe7c3 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -21,8 +21,10 @@ on: required: false default: "release" -jobs: +env: + MESON_VERSION: "0.60.3" +jobs: build-linux: runs-on: ubuntu-latest @@ -37,7 +39,7 @@ jobs: run: | sudo apt-get update -yq sudo apt-get install --no-install-recommends wget liballegro4-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.2-dev libminizip-dev liblz4-dev libpng++-dev libx11-dev libboost-dev libtbb-dev libsdl2-dev libopengl-dev libfuse2 ninja-build - sudo pip install meson==0.60.3 + sudo pip install meson==${{env.MESON_VERSION}} - name: Install Clang # You may pin to the exact commit or the version. From dd15a3c9d42c519755382010373c4e96c6b3d002 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Sun, 11 Jun 2023 17:08:48 +0930 Subject: [PATCH 04/29] ci: rename CI workflow --- .github/workflows/{build-check.yml => ci.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-check.yml => ci.yml} (100%) diff --git a/.github/workflows/build-check.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/workflows/build-check.yml rename to .github/workflows/ci.yml From 1e337f971095965ad2341569947902f6e970b400 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Sun, 11 Jun 2023 17:13:36 +0930 Subject: [PATCH 05/29] ci: refactor CI workflow to use new reusable workflows Remove all duplicated code and replace it with calls to the new msbuild and meson build workflows. Update the concurrency group so that we don't waste time re-running the CI on outdated code. Rename top-level workflow. --- .github/workflows/ci.yml | 89 +++++----------------------------------- 1 file changed, 11 insertions(+), 78 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e97527f25..025619ddd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,5 @@ -name: Compile check +name: Continuous Integration -# Controls when the action will run. on: # Triggers the workflow for pushes to master or development, for pull request events, and for the merge queue push: @@ -12,81 +11,15 @@ on: workflow_dispatch: -jobs: - build-linux: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - - name: Install Dependencies - run: | - sudo apt-get update -yq - sudo apt-get install --no-install-recommends liballegro4-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.2-dev libminizip-dev liblz4-dev libpng++-dev libx11-dev libboost-dev libtbb-dev libsdl2-dev libopengl-dev ninja-build - sudo pip install meson==0.60.3 - - - name: Install Clang - # You may pin to the exact commit or the version. - # uses: egor-tensin/setup-clang@d16e36d5f8a7eb00aa6627c1a536d94dfc4a913d - uses: egor-tensin/setup-clang@v1 - with: - # Set up cc/c++ executables - cc: 1 # optional, default is 1 - - - name: Build - env: - CC: "gcc" - CXX: "g++" - run: | - meson setup --buildtype=debug -Ddebug_type=full build - meson compile -C build - - build-macos: - runs-on: macos-latest - - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - - name: Install Dependencies - run: | - brew install pkg-config tbb sdl2 minizip lz4 flac luajit lua@5.1 libpng gcc@12 ninja meson - - - name: Build - env: - CC: "gcc-12" - CXX: "g++-12" - run: | - meson setup --buildtype=debug -Ddebug_type=full build - meson compile -C build - - build-windows: - env: - # Path to the solution file relative to the root of the project. - SOLUTION_FILE_PATH: RTEA.sln - - # 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: "Final" - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1 +# Cancel in-progress runs if newer changes to the same branch/PR are pushed. +concurrency: + group: ci-${{ github.head_ref || github.ref }} + cancel-in-progress: true +jobs: + meson: + uses: ./.github/workflows/meson.yml + + msbuild: + uses: ./.github/workflows/msbuild.yml - - 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}} From d64a2941f7e3ebaef425f1b40abc4408bc2e408d Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Sun, 11 Jun 2023 18:34:15 +0930 Subject: [PATCH 06/29] ci: disable CI triggers on push to `master` If it's there, it's far too late. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 025619ddd..0931fe4bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: Continuous Integration on: # Triggers the workflow for pushes to master or development, for pull request events, and for the merge queue push: - branches: [master, development] + branches: [development] pull_request: types: [opened, reopened, ready_for_review, synchronize] merge_group: From 8d432929e4c5b9fb6230b6d09eb5709927dce77e Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 14 Jun 2023 01:17:30 +0930 Subject: [PATCH 07/29] ci: fix incorrect options for `if-no-files-found` Action input --- .github/workflows/meson.yml | 4 ++-- .github/workflows/msbuild.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index cb60fe7c3..fbf3d97e9 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -99,7 +99,7 @@ jobs: with: name: CortexCommand (Linux) path: CortexCommand.AppImage - if-no-files-found: fail + if-no-files-found: error build-macos: runs-on: macos-latest @@ -128,4 +128,4 @@ jobs: with: name: CortexCommand (macOS) path: build/CortexCommand - if-no-files-found: fail + if-no-files-found: error diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index d0df9ff1c..298f13141 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -42,4 +42,4 @@ jobs: with: name: Cortex Command.exe path: D:/a/Cortex-Command-Community-Project-Source/Cortex-Command-Community-Project-Data/Cortex Command x64.exe - if-no-files-found: fail + if-no-files-found: error From def43b557d7955adbc9a0e6b24499976e2eed532 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 14 Jun 2023 01:21:28 +0930 Subject: [PATCH 08/29] ci: correct artefact upload path for msbuild New builds no longer have the trailing ` x64` on their exe filepath, removed so any build artefacts are correctly uploaded. --- .github/workflows/msbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 298f13141..2429b1242 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -41,5 +41,5 @@ jobs: uses: actions/upload-artifact@v3 with: name: Cortex Command.exe - path: D:/a/Cortex-Command-Community-Project-Source/Cortex-Command-Community-Project-Data/Cortex Command x64.exe + path: D:/a/Cortex-Command-Community-Project-Source/Cortex-Command-Community-Project-Data/Cortex Command.exe if-no-files-found: error From 601fe2d268151900710a53b88aa57ed214499d21 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Tue, 4 Jul 2023 23:49:38 +0930 Subject: [PATCH 09/29] ci: update workflow_dispatch inputs so manual triggers are correctly configurable --- .github/workflows/meson.yml | 26 +++++++++++++++++++++++++- .github/workflows/msbuild.yml | 18 +++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index fbf3d97e9..9a17f4e6f 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -3,7 +3,31 @@ name: Meson Build (Linux, macOS) on: # Triggers the workflow when manually dispatched workflow_dispatch: - + inputs: + upload_artefacts: + description: "Upload build artefacts for this run" + type: boolean + required: false + default: false + build_type: # "release", "debug" + description: "Build Configuration" + type: choice + required: false + default: "release" + options: + - "release" + - "debug" + debug_level: # "full", "minimal", "release" + # TODO: Standardise these, so capitalization is preserved between the windows/linux builds. + description: "Debug Level" + type: choice + required: false + default: "release" + options: + - "release" + - "minimal" + - "full" + # Triggers the workflow when called by a top-level workflow workflow_call: inputs: diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 2429b1242..3f6621b42 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -2,7 +2,23 @@ name: Windows Build on: workflow_dispatch: - + inputs: + upload_artefacts: + description: "Upload build artefacts for this run" + type: boolean + required: false + default: false + build_configuration: # "Final" + description: "Build Configuration" + type: choice + required: false + default: "Final" + options: + - "Final" + - "Debug Release" + - "Debug Minimal" + - "Debug Full" + # Triggers the workflow when called by a top-level workflow workflow_call: inputs: From acd661e9b8b5587519403100de6937c0968a1d96 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Tue, 4 Jul 2023 23:51:27 +0930 Subject: [PATCH 10/29] ci: format and update workflow input descriptions --- .github/workflows/meson.yml | 4 ++-- .github/workflows/msbuild.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 9a17f4e6f..dfb9a294b 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: inputs: upload_artefacts: - description: "Upload build artefacts for this run" + description: "Upload build artefacts" type: boolean required: false default: false @@ -27,7 +27,7 @@ on: - "release" - "minimal" - "full" - + # Triggers the workflow when called by a top-level workflow workflow_call: inputs: diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 3f6621b42..3b03f8a2f 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: upload_artefacts: - description: "Upload build artefacts for this run" + description: "Upload build artefacts" type: boolean required: false default: false @@ -18,7 +18,7 @@ on: - "Debug Release" - "Debug Minimal" - "Debug Full" - + # Triggers the workflow when called by a top-level workflow workflow_call: inputs: From 23bc29c36f39122198a655d15798b75f126389a8 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 00:21:27 +0930 Subject: [PATCH 11/29] test mapping build_config to executable name --- .github/workflows/msbuild.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 3b03f8a2f..273bae9cf 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -34,6 +34,14 @@ on: env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: RTEA.sln + EXECUTABLE_NAME: "Cortex Command.exe" + NAME_MAPPING: '{ + "Final": "Cortex Command.exe", + "Debug Release": "Cortex Command.debug.release.exe", + "Debug Minimal": "Cortex Command.debug.minimal.exe", + "Debug Full": "Cortex Command.debug.full.exe" + }' + jobs: build: @@ -43,6 +51,9 @@ jobs: steps: - uses: actions/checkout@v3 + - run: | + echo "EXECUTABLE_NAME=${{ fromJson(${{env.NAME_MAPPING}})[${{inputs.build_configuration}}] }}" >> "$GITHUB_ENV" + - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 @@ -56,6 +67,6 @@ jobs: if: ${{inputs.upload_artefacts}} uses: actions/upload-artifact@v3 with: - name: Cortex Command.exe - path: D:/a/Cortex-Command-Community-Project-Source/Cortex-Command-Community-Project-Data/Cortex Command.exe + name: ${{env.EXECUTABLE_NAME}} + path: D:/a/Cortex-Command-Community-Project-Source/Cortex-Command-Community-Project-Data/${{env.EXECUTABLE_NAME}} if-no-files-found: error From 14969692c0cf23a95ae13a7c3ca97fd6230f3403 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 00:35:17 +0930 Subject: [PATCH 12/29] fix bad yaml syntax in exe name mapping and switch to conditional step outputs instead of env vars --- .github/workflows/msbuild.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 273bae9cf..5e1afcd85 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -34,13 +34,7 @@ on: env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: RTEA.sln - EXECUTABLE_NAME: "Cortex Command.exe" - NAME_MAPPING: '{ - "Final": "Cortex Command.exe", - "Debug Release": "Cortex Command.debug.release.exe", - "Debug Minimal": "Cortex Command.debug.minimal.exe", - "Debug Full": "Cortex Command.debug.full.exe" - }' + NAME_MAPPING: '{\"Final\": \"Cortex Command.exe\", \"Debug Release\": \"Cortex Command.debug.release.exe\", \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", \"Debug Full\": \"Cortex Command.debug.full.exe\"}' jobs: @@ -51,9 +45,6 @@ jobs: steps: - uses: actions/checkout@v3 - - run: | - echo "EXECUTABLE_NAME=${{ fromJson(${{env.NAME_MAPPING}})[${{inputs.build_configuration}}] }}" >> "$GITHUB_ENV" - - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 @@ -63,10 +54,16 @@ jobs: # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration="${{inputs.build_configuration}}" ${{env.SOLUTION_FILE_PATH}} + + - id: executable_name + if: ${{inputs.upload_artefacts}} + run: | + echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_OUTPUT" + - name: Upload Artifact if: ${{inputs.upload_artefacts}} uses: actions/upload-artifact@v3 with: - name: ${{env.EXECUTABLE_NAME}} - path: D:/a/Cortex-Command-Community-Project-Source/Cortex-Command-Community-Project-Data/${{env.EXECUTABLE_NAME}} + name: ${{ steps.executable_name.outputs.EXECUTABLE_NAME }} + path: D:/a/Cortex-Command-Community-Project-Source/Cortex-Command-Community-Project-Data/${{ steps.executable_name.outputs.EXECUTABLE_NAME }} if-no-files-found: error From 57a6a64a787d85afa6cc6d1061ab6a53dc86c5b9 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:01:35 +0930 Subject: [PATCH 13/29] temp reordering to fix bad format string --- .github/workflows/msbuild.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 5e1afcd85..0a5014c43 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -45,6 +45,13 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Determine executable name + id: executable_name + if: ${{inputs.upload_artefacts}} + run: | + echo 'EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}' >> "$GITHUB_OUTPUT" + + - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 @@ -55,10 +62,6 @@ jobs: run: msbuild /m /p:Configuration="${{inputs.build_configuration}}" ${{env.SOLUTION_FILE_PATH}} - - id: executable_name - if: ${{inputs.upload_artefacts}} - run: | - echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_OUTPUT" - name: Upload Artifact if: ${{inputs.upload_artefacts}} From 7668113be3f5125789294e850869f7f991eaa647 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:06:34 +0930 Subject: [PATCH 14/29] Fix incorrect quotes in json strings --- .github/workflows/msbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 0a5014c43..4cecc1c8b 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -34,7 +34,7 @@ on: env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: RTEA.sln - NAME_MAPPING: '{\"Final\": \"Cortex Command.exe\", \"Debug Release\": \"Cortex Command.debug.release.exe\", \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", \"Debug Full\": \"Cortex Command.debug.full.exe\"}' + NAME_MAPPING: "{\"Final\": \"Cortex Command.exe\", \"Debug Release\": \"Cortex Command.debug.release.exe\", \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", \"Debug Full\": \"Cortex Command.debug.full.exe\"}" jobs: From d3b3a49bbbafb0ca9274860cd6eff82dc18c7670 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:09:49 +0930 Subject: [PATCH 15/29] Reorder steps post-debug --- .github/workflows/msbuild.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 4cecc1c8b..b7ec2bfbd 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -45,13 +45,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Determine executable name - id: executable_name - if: ${{inputs.upload_artefacts}} - run: | - echo 'EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}' >> "$GITHUB_OUTPUT" - - - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 @@ -61,7 +54,11 @@ jobs: # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration="${{inputs.build_configuration}}" ${{env.SOLUTION_FILE_PATH}} - + - name: Determine executable name + id: executable_name + if: ${{inputs.upload_artefacts}} + run: | + echo 'EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}' >> "$GITHUB_OUTPUT" - name: Upload Artifact if: ${{inputs.upload_artefacts}} From 69a7dad9eaff6e77d273ffa6a939ac7e18a77872 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:22:35 +0930 Subject: [PATCH 16/29] Further debugging changes to json mapping --- .github/workflows/msbuild.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index b7ec2bfbd..d5efb9906 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -34,8 +34,17 @@ on: env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: RTEA.sln - NAME_MAPPING: "{\"Final\": \"Cortex Command.exe\", \"Debug Release\": \"Cortex Command.debug.release.exe\", \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", \"Debug Full\": \"Cortex Command.debug.full.exe\"}" - + # NAME_MAPPING: | + # "{"Final\": \"Cortex Command.exe\", + # \"Debug Release\": \"Cortex Command.debug.release.exe\", + # \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", + # \"Debug Full\": \"Cortex Command.debug.full.exe\"}" + + NAME_MAPPING: | + {"Final": "Cortex Command.exe", + "Debug Release": "Cortex Command.debug.release.exe", + "Debug Minimal": "Cortex Command.debug.minimal.exe", + "Debug Full": "Cortex Command.debug.full.exe"} jobs: build: @@ -45,6 +54,15 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Determine executable name + id: executable_name + if: ${{inputs.upload_artefacts}} + run: | + echo 'EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}' >> "$GITHUB_OUTPUT" + + - run: | + echo ${{ steps.executable_name.outputs.EXECUTABLE_NAME }} + - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 @@ -54,12 +72,6 @@ jobs: # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration="${{inputs.build_configuration}}" ${{env.SOLUTION_FILE_PATH}} - - name: Determine executable name - id: executable_name - if: ${{inputs.upload_artefacts}} - run: | - echo 'EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}' >> "$GITHUB_OUTPUT" - - name: Upload Artifact if: ${{inputs.upload_artefacts}} uses: actions/upload-artifact@v3 From bcf5393e2c753d8fc127f535d191671236510e60 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:25:49 +0930 Subject: [PATCH 17/29] Testing quotes issues? --- .github/workflows/msbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index d5efb9906..347fbb1ba 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -58,7 +58,7 @@ jobs: id: executable_name if: ${{inputs.upload_artefacts}} run: | - echo 'EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}' >> "$GITHUB_OUTPUT" + echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_OUTPUT" - run: | echo ${{ steps.executable_name.outputs.EXECUTABLE_NAME }} From bd828e8a3e576ff0f081c46b2f8104e4815ab2b3 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:54:18 +0930 Subject: [PATCH 18/29] Sanity checks --- .github/workflows/msbuild.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 347fbb1ba..1b09b6431 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -39,6 +39,7 @@ env: # \"Debug Release\": \"Cortex Command.debug.release.exe\", # \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", # \"Debug Full\": \"Cortex Command.debug.full.exe\"}" + EXECUTABLE_NAME: "Cortex Command.exe" NAME_MAPPING: | {"Final": "Cortex Command.exe", @@ -54,14 +55,21 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set color + id: random-color-generator + run: echo "SELECTED_COLOR=green" >> $GITHUB_OUTPUT + + - name: Get color + run: echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}" + - name: Determine executable name id: executable_name if: ${{inputs.upload_artefacts}} run: | - echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_OUTPUT" + echo -e "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_ENV" - run: | - echo ${{ steps.executable_name.outputs.EXECUTABLE_NAME }} + echo ${{ env.EXECUTABLE_NAME }} - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 From 50527fa5aabe7f9580bf8bfedd3b9d90cc0f9534 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:56:22 +0930 Subject: [PATCH 19/29] remove unsupported env name --- .github/workflows/msbuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 1b09b6431..722c9ddb9 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -66,10 +66,10 @@ jobs: id: executable_name if: ${{inputs.upload_artefacts}} run: | - echo -e "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_ENV" + echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_ENV" - run: | - echo ${{ env.EXECUTABLE_NAME }} + echo "${{ env.EXECUTABLE_NAME }}" - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 From ca7e94baff1e5327af42c6f76bb8de8533c39c4d Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:56:47 +0930 Subject: [PATCH 20/29] force bash shells --- .github/workflows/msbuild.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 722c9ddb9..93d8ff819 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -67,9 +67,11 @@ jobs: if: ${{inputs.upload_artefacts}} run: | echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_ENV" - + shell: bash + - run: | echo "${{ env.EXECUTABLE_NAME }}" + shell: bash - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 From d693d1c96cb20b2b8c990537b43a02685926687c Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:56:47 +0930 Subject: [PATCH 21/29] force bash shells --- .github/workflows/msbuild.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 722c9ddb9..dea37ed50 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -58,18 +58,22 @@ jobs: - name: Set color id: random-color-generator run: echo "SELECTED_COLOR=green" >> $GITHUB_OUTPUT + shell: bash - name: Get color run: echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}" + shell: bash - name: Determine executable name id: executable_name if: ${{inputs.upload_artefacts}} run: | echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_ENV" - + shell: bash + - run: | echo "${{ env.EXECUTABLE_NAME }}" + shell: bash - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 From baa57a2cc6a84b5b9fe424396ff365d16d0b2232 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 10:54:34 +0930 Subject: [PATCH 22/29] Remove sanity check and reorder steps, revert to using step outputs rather than env variables --- .github/workflows/msbuild.yml | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index dea37ed50..67daae5de 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -34,13 +34,6 @@ on: env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: RTEA.sln - # NAME_MAPPING: | - # "{"Final\": \"Cortex Command.exe\", - # \"Debug Release\": \"Cortex Command.debug.release.exe\", - # \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", - # \"Debug Full\": \"Cortex Command.debug.full.exe\"}" - EXECUTABLE_NAME: "Cortex Command.exe" - NAME_MAPPING: | {"Final": "Cortex Command.exe", "Debug Release": "Cortex Command.debug.release.exe", @@ -55,26 +48,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set color - id: random-color-generator - run: echo "SELECTED_COLOR=green" >> $GITHUB_OUTPUT - shell: bash - - - name: Get color - run: echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}" - shell: bash - - - name: Determine executable name - id: executable_name - if: ${{inputs.upload_artefacts}} - run: | - echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_ENV" - shell: bash - - - run: | - echo "${{ env.EXECUTABLE_NAME }}" - shell: bash - - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1 @@ -84,6 +57,13 @@ jobs: # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration="${{inputs.build_configuration}}" ${{env.SOLUTION_FILE_PATH}} + - name: Determine executable name + id: executable_name + if: ${{inputs.upload_artefacts}} + run: | + echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_OUTPUT" + shell: bash + - name: Upload Artifact if: ${{inputs.upload_artefacts}} uses: actions/upload-artifact@v3 From a2b13558f762ec29456d5e1cda49add1e809dd37 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 18:38:26 +0930 Subject: [PATCH 23/29] Input Mapping formatting --- .github/workflows/msbuild.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 67daae5de..f06cd184f 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -35,10 +35,12 @@ env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH: RTEA.sln NAME_MAPPING: | - {"Final": "Cortex Command.exe", - "Debug Release": "Cortex Command.debug.release.exe", - "Debug Minimal": "Cortex Command.debug.minimal.exe", - "Debug Full": "Cortex Command.debug.full.exe"} + { + "Final": "Cortex Command.exe", + "Debug Release": "Cortex Command.debug.release.exe", + "Debug Minimal": "Cortex Command.debug.minimal.exe", + "Debug Full": "Cortex Command.debug.full.exe" + } jobs: build: From e3a7c448612fda3de9d2f6f3af2d140b68ef1ccc Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Wed, 5 Jul 2023 18:46:34 +0930 Subject: [PATCH 24/29] Create a new workflow to upload master build artefacts Adds a new `master_build` workflow, identical to the existing CI workflow except: - It only runs on new pushes to `master` - It uploads all build artefacts to make them available for release Minor comment formatting. --- .github/workflows/ci.yml | 2 +- .github/workflows/master_build.yaml | 27 +++++++++++++++++++++++++++ .github/workflows/meson.yml | 8 +++----- 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/master_build.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0931fe4bf..854fcecb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: Continuous Integration on: - # Triggers the workflow for pushes to master or development, for pull request events, and for the merge queue + # Triggers the workflow for pushes to development, for pull request events, and for the merge queue push: branches: [development] pull_request: diff --git a/.github/workflows/master_build.yaml b/.github/workflows/master_build.yaml new file mode 100644 index 000000000..e613f5ab9 --- /dev/null +++ b/.github/workflows/master_build.yaml @@ -0,0 +1,27 @@ + +name: Master Build + +on: + # Triggers the workflow for pushes to master + push: + branches: [master] + + workflow_dispatch: + +# Cancel in-progress runs if newer changes to the same branch/PR are pushed. +concurrency: + group: ci-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +# Build the game on all platforms and store build artefacts of both jobs +jobs: + meson: + uses: ./.github/workflows/meson.yml + with: + upload_artefacts: true + + msbuild: + uses: ./.github/workflows/msbuild.yml + with: + upload_artefacts: true + diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index dfb9a294b..2397a3570 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -1,5 +1,5 @@ name: Meson Build (Linux, macOS) -# Controls when the action will run. + on: # Triggers the workflow when manually dispatched workflow_dispatch: @@ -9,7 +9,7 @@ on: type: boolean required: false default: false - build_type: # "release", "debug" + build_type: description: "Build Configuration" type: choice required: false @@ -17,8 +17,7 @@ on: options: - "release" - "debug" - debug_level: # "full", "minimal", "release" - # TODO: Standardise these, so capitalization is preserved between the windows/linux builds. + debug_level: description: "Debug Level" type: choice required: false @@ -40,7 +39,6 @@ on: required: false default: "release" debug_level: # "full", "minimal", "release" - # TODO: Standardise these, so capitalization is preserved between the windows/linux builds. type: string required: false default: "release" From be1e4ed7c8a7bf801ee9da0edd37f25a0e28c13e Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Fri, 7 Jul 2023 13:50:23 +0930 Subject: [PATCH 25/29] Update workflow trigger comments to better document input schema --- .github/workflows/msbuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index f06cd184f..8774519b1 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -8,7 +8,7 @@ on: type: boolean required: false default: false - build_configuration: # "Final" + build_configuration: description: "Build Configuration" type: choice required: false @@ -26,7 +26,7 @@ on: type: boolean required: false default: false - build_configuration: # "Final" + build_configuration: # "Final" | "Debug Release" | "Debug Minimal" | "Debug Full" type: string required: false default: "Final" From 6999a7f7b526f4bacbe46686094e8c4221bb2655 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Fri, 7 Jul 2023 13:53:41 +0930 Subject: [PATCH 26/29] Update workflow trigger comment descriptions, and standardise between build workflows. --- .github/workflows/meson.yml | 4 ++-- .github/workflows/msbuild.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 2397a3570..388a67bf8 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -34,11 +34,11 @@ on: type: boolean required: false default: false - build_type: # "release", "debug" + build_type: # "release" | "debug" type: string required: false default: "release" - debug_level: # "full", "minimal", "release" + debug_level: # "full" | "minimal" | "release" type: string required: false default: "release" diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 8774519b1..d0b9bfc2f 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -1,6 +1,7 @@ name: Windows Build on: + # Triggers the workflow when manually dispatched workflow_dispatch: inputs: upload_artefacts: From bce1776fa23ce21b5d20b92a41ba9e2db30cb503 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:17:44 +0930 Subject: [PATCH 27/29] Fix macOS workflow runs not finding the debug version of the executable when uploading artefacts Add an extended glob pattern to match either of them if present (trailing `_debug`) --- .github/workflows/meson.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 388a67bf8..b53570192 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -149,5 +149,5 @@ jobs: uses: actions/upload-artifact@v3 with: name: CortexCommand (macOS) - path: build/CortexCommand + path: build/CortexCommand*(_debug) if-no-files-found: error From c4e9059345952452428708a210336fc90004b5dc Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:37:11 +0930 Subject: [PATCH 28/29] extglob is not available on the GitHub Actions runners, reverted to multiple path references --- .github/workflows/meson.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index b53570192..f41007d75 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -149,5 +149,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: CortexCommand (macOS) - path: build/CortexCommand*(_debug) + path: | + build/CortexCommand + build/CortexCommand_debug if-no-files-found: error From 476294bacb85b4dc5e269e874fd776969b2030c1 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Sat, 15 Jul 2023 17:44:40 +0930 Subject: [PATCH 29/29] ci: remove unneeded clang installation step --- .github/workflows/meson.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index f41007d75..0da594096 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -63,14 +63,6 @@ jobs: sudo apt-get install --no-install-recommends wget liballegro4-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.2-dev libminizip-dev liblz4-dev libpng++-dev libx11-dev libboost-dev libtbb-dev libsdl2-dev libopengl-dev libfuse2 ninja-build sudo pip install meson==${{env.MESON_VERSION}} - - name: Install Clang - # You may pin to the exact commit or the version. - # uses: egor-tensin/setup-clang@d16e36d5f8a7eb00aa6627c1a536d94dfc4a913d - uses: egor-tensin/setup-clang@v1 - with: - # Set up cc/c++ executables - cc: 1 # optional, default is 1 - - name: Setup Meson env: CC: "gcc"