Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions Workflow for build Automation #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build

on:
push:
branches:
- 'main'
pull_request:

jobs:
build:
name: Build
runs-on: windows-latest
strategy:
matrix:
configuration:
- Debug
- Release

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Run generate.bat
run: .\generate.bat

- name: Build ${{matrix.configuration}} binaries
run: msbuild build\h2m-mod.sln /p:Configuration=${{matrix.configuration}} /p:Platform=x64 /m /v:minimal

- name: Upload ${{matrix.configuration}} binaries
uses: actions/upload-artifact@v4
with:
name: ${{matrix.configuration}} binaries
if-no-files-found: error
path: |
build/bin/x64/${{matrix.configuration}}/h2m-mod.exe
build/bin/x64/${{matrix.configuration}}/h2m-mod.pdb
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NOTE: You must legally own Call of Duty®: Modern Warfare Remastered to run this

- Clone the Git repo. Do NOT download it as ZIP, that won't work.
- Update the submodules and run `premake5 vs2022` or simply use the delivered `generate.bat`.
- Build via solution file in `build\h1-mod.sln`.
- Build via solution file in `build\h2m-mod.sln`.

### Premake arguments

Expand Down
1 change: 0 additions & 1 deletion premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ filter "configurations:Release"
buildoptions {"/GL"}
linkoptions { "/IGNORE:4702", "/LTCG" }
defines {"NDEBUG"}
flags {"FatalCompileWarnings"}
filter {}

filter "configurations:Debug"
Expand Down