diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40e890e..aae2ed9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,9 @@ concurrency: group: ${{ github.ref }} cancel-in-progress: true +env: + PREMAKE_VERSION: "5.0.0-beta2" + jobs: build-windows: name: Build Windows @@ -21,7 +24,8 @@ jobs: fail-fast: false matrix: configuration: - - Release + - debug + - release arch: - x64 include: @@ -29,19 +33,19 @@ jobs: platform: x64 steps: - name: Check out files - uses: actions/checkout@v4 + uses: actions/checkout@main with: submodules: true fetch-depth: 0 lfs: false - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.3.1 + uses: microsoft/setup-msbuild@main - name: Install Premake5 uses: abel0b/setup-premake@v2.3 with: - version: "5.0.0-beta2" + version: ${{ env.PREMAKE_VERSION }} - name: Generate project files run: premake5 vs2022 @@ -49,13 +53,13 @@ jobs: - name: Set up problem matching uses: ammaraskar/msvc-problem-matcher@master - - name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries + - name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/iw4-validator.sln - - name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries - uses: actions/upload-artifact@v3.1.3 + - name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries + uses: actions/upload-artifact@main with: - name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries + name: windows-${{matrix.arch}}-${{matrix.configuration}} path: | build/bin/${{matrix.arch}}/${{matrix.configuration}}/iw4-validator.exe build/bin/${{matrix.arch}}/${{matrix.configuration}}/iw4-validator.pdb @@ -67,16 +71,14 @@ jobs: fail-fast: false matrix: configuration: - - Release + - debug + - release arch: - x64 - arm64 - include: - - configuration: Release - config: release steps: - name: Check out files - uses: actions/checkout@v4 + uses: actions/checkout@main with: submodules: true fetch-depth: 0 @@ -91,7 +93,7 @@ jobs: - name: Install Premake5 uses: abel0b/setup-premake@v2.3 with: - version: "5.0.0-beta2" + version: ${{ env.PREMAKE_VERSION }} - name: Generate project files run: premake5 gmake2 @@ -109,15 +111,15 @@ jobs: run: | echo "CXX=aarch64-linux-gnu-g++" >> $GITHUB_ENV - - name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries + - name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries run: | pushd build - make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc) + make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc) - - name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries - uses: actions/upload-artifact@v3.1.3 + - name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries + uses: actions/upload-artifact@main with: - name: Linux ${{matrix.configuration}} ${{matrix.arch}} binaries + name: linux-${{matrix.arch}}-${{matrix.configuration}} path: | build/bin/${{matrix.arch}}/${{matrix.configuration}}/iw4-validator @@ -132,13 +134,13 @@ jobs: run: echo "ALTERWARE_MASTER_PATH=${{ secrets.ALTERWARE_MASTER_SSH_PATH }}" >> $GITHUB_ENV - name: Download Release binaries - uses: actions/download-artifact@v3.0.2 + uses: actions/download-artifact@main with: - name: Windows Release x64 binaries + name: windows-x64-release # Set up committer info and GPG key - name: Install SSH key - uses: shimataro/ssh-key-action@v2.6.1 + uses: shimataro/ssh-key-action@v2.7.0 with: key: ${{ secrets.ALTERWARE_MASTER_SSH_PRIVATE_KEY }} known_hosts: 'just-a-placeholder-so-we-dont-get-errors' diff --git a/premake5.lua b/premake5.lua index 7570745..7943fa3 100644 --- a/premake5.lua +++ b/premake5.lua @@ -4,7 +4,7 @@ location "./build" objdir "%{wks.location}/obj" targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}" -configurations {"Debug", "Release"} +configurations {"debug", "release"} if os.istarget("darwin") then platforms {"x64", "arm64"} @@ -50,13 +50,13 @@ end flags {"NoIncrementalLink", "NoMinimalRebuild", "MultiProcessorCompile", "No64BitChecks"} -filter "configurations:Release" +filter "configurations:release" optimize "Speed" defines "NDEBUG" flags "FatalCompileWarnings" filter {} -filter "configurations:Debug" +filter "configurations:debug" optimize "Debug" defines {"DEBUG", "_DEBUG"} filter {}