Skip to content

Commit

Permalink
build: try to use clang here as well (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
diamante0018 authored Apr 20, 2024
1 parent b3841d8 commit 44dac41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
configuration:
- debug
- release
compiler:
- msvc
- clang
steps:
- name: Check out files
uses: actions/checkout@main
Expand All @@ -42,19 +45,24 @@ jobs:
with:
version: ${{ env.PREMAKE_VERSION }}

- name: Generate project files
- name: Generate project files (clang)
if: matrix.compiler == 'clang'
run: premake5 --cc=${{matrix.compiler}} vs2022

- name: Generate project files (msvc)
if: matrix.compiler == 'msvc'
run: premake5 vs2022

- name: Set up problem matching
uses: ammaraskar/msvc-problem-matcher@master

- name: Build ${{matrix.configuration}} binaries
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=Win32 build/mw3-server-freezer.sln
run: msbuild /m /p:Configuration=${{matrix.configuration}} /p:Platform=Win32 build/mw3-server-freezer.sln

- name: Upload ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main
with:
name: ${{matrix.configuration}} binaries
name: windows-${{matrix.compiler}}-${{matrix.configuration}}
path: |
build/bin/Win32/${{matrix.configuration}}/mw3-server-freezer.dll
build/bin/Win32/${{matrix.configuration}}/mw3-server-freezer.pdb
2 changes: 1 addition & 1 deletion premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ filter "configurations:release"
defines {"NDEBUG"}
flags {"FatalCompileWarnings"}

filter "action:msc"
filter "toolset:msc*"
buildoptions "/GL"
linkoptions {"/IGNORE:4702", "/LTCG"}
filter {}
Expand Down

0 comments on commit 44dac41

Please sign in to comment.