From f0eb7553ba2d063cc62992ed9d6dc262de1131a8 Mon Sep 17 00:00:00 2001 From: Stuart Date: Mon, 15 Jan 2024 20:56:02 +1030 Subject: [PATCH 1/6] refactor: replace duplicated release bundling code with dedicated action --- .github/workflows/nightly.yaml | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 1f21ddb90d..390d485817 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -80,38 +80,8 @@ jobs: - name: fetch tags run: git fetch --tags origin - - run: mkdir release - - - name: Download build artefacts - uses: actions/download-artifact@v3 - with: - path: release - - - run: ls -R release - - - name: Compress Windows Release - run: | - zip -j CortexCommand.windows.zip \ - "release/Cortex Command.exe" \ - external/lib/win/{fmod,SDL2}.dll - - - name: Compress Linux Release - run: | - zip -j CortexCommand.linux.zip \ - "release/CortexCommand (Linux)/CortexCommand.AppImage" \ - external/lib/linux/x86_64/libfmod.so* - - - name: Compress OSX Release - run: | - zip -j CortexCommand.macos.zip \ - "release/CortexCommand (macOS)/CortexCommand" \ - external/lib/macos/libfmod.dylib - - - name: Package Data files - run: | - zip -r -u CortexCommand.windows.zip Data - zip -r -u CortexCommand.linux.zip Data - zip -r -u CortexCommand.macos.zip Data + - name: Bundle Release Assets + uses: ./.github/actions/bundle_release - name: Get Date id: get_date From 947533d040e269f5f9a4211effdb921873e63f33 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:16:17 +1030 Subject: [PATCH 2/6] fix: enforce `must-match` condition on zipped artefacts, correct path names for executables --- .github/actions/bundle_release/action.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/bundle_release/action.yaml b/.github/actions/bundle_release/action.yaml index 9774653ed3..85dfdc3b62 100644 --- a/.github/actions/bundle_release/action.yaml +++ b/.github/actions/bundle_release/action.yaml @@ -17,30 +17,30 @@ runs: - name: Compress Windows Release shell: bash run: | - zip -j CortexCommand.windows.zip \ - "release/Cortex Command.exe" \ + zip --must-match -j CortexCommand.windows.zip \ + "release/Cortex Command.exe/Cortex Command.exe" \ external/lib/win/{fmod,SDL2}.dll - name: Compress Linux Release shell: bash run: | - zip -j CortexCommand.linux.zip \ + zip --must-match -j CortexCommand.linux.zip \ "release/CortexCommand (Linux)/CortexCommand.AppImage" \ external/lib/linux/x86_64/libfmod.so* - name: Compress OSX Release shell: bash run: | - zip -j CortexCommand.macos.zip \ - "release/CortexCommand (macOS)/CortexCommand" \ + zip --must-match -j CortexCommand.macos.zip \ + "release/CortexCommand (macOS)/CortexCommand.tar" \ external/lib/macos/libfmod.dylib - name: Package Data files shell: bash run: | - zip -r -u CortexCommand.windows.zip Data - zip -r -u CortexCommand.linux.zip Data - zip -r -u CortexCommand.macos.zip Data + zip --must-match -r -u CortexCommand.windows.zip Data + zip --must-match -r -u CortexCommand.linux.zip Data + zip --must-match -r -u CortexCommand.macos.zip Data From 58ba16873f1bec014537f41b48f34a38ee89c076 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:19:52 +1030 Subject: [PATCH 3/6] style: remove whitespace --- .github/actions/bundle_release/action.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/actions/bundle_release/action.yaml b/.github/actions/bundle_release/action.yaml index 85dfdc3b62..92bf5188f0 100644 --- a/.github/actions/bundle_release/action.yaml +++ b/.github/actions/bundle_release/action.yaml @@ -41,8 +41,3 @@ runs: zip --must-match -r -u CortexCommand.windows.zip Data zip --must-match -r -u CortexCommand.linux.zip Data zip --must-match -r -u CortexCommand.macos.zip Data - - - - - \ No newline at end of file From 1faf4fb51e4c506ab7dfcb96ca07cec28191a422 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:33:29 +1030 Subject: [PATCH 4/6] build: remove macOS linker arg cus it's broken --- .vscode/tasks.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 59da63701f..5e4e738d9c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -35,7 +35,6 @@ "env": { "CC": "gcc-12", "CXX": "g++-12", - "CXX_LD": "g++-12" } } } From fe32ffc970e4e4aea33f0a9c4dc6c1ab65a79c5f Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:37:49 +1030 Subject: [PATCH 5/6] fix: make sure step conditions are encased in expression tags --- .github/workflows/nightly.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 6d5ecf145d..d6e523d0a2 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -35,15 +35,15 @@ jobs: fi - name: Checkout code - if: !steps.check_manual_run.outputs.needs_build + if: ${{ !steps.check_manual_run.outputs.needs_build }} uses: actions/checkout@v3 - name: fetch tags - if: !steps.check_manual_run.outputs.needs_build + if: ${{ !steps.check_manual_run.outputs.needs_build }} run: git fetch --tags origin - name: Check if tags point to the same commit or if the workflow was manually triggered - if: !steps.check_manual_run.outputs.needs_build + if: ${{ !steps.check_manual_run.outputs.needs_build }} id: check_tags run: | curr_sha=$(git rev-parse HEAD) From 9b4d6fd07fc44e3db08c7106171c0acb82c353f7 Mon Sep 17 00:00:00 2001 From: traunts <73866773+traunts@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:44:18 +1030 Subject: [PATCH 6/6] build: nightly releases are now built with `Debug Release` --- .github/workflows/nightly.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index d6e523d0a2..11b4d97ab2 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -70,6 +70,8 @@ jobs: uses: ./.github/workflows/meson.yml with: upload_artefacts: true + build_type: "debug" + debug_level: "release" build-msbuild-releases: name: Windows Release Build @@ -80,6 +82,7 @@ jobs: uses: ./.github/workflows/msbuild.yml with: upload_artefacts: true + build_configuration: "Debug Release" release: name: Publish Release