-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger build on build scripts change
- Loading branch information
1 parent
181c6af
commit 5f0df05
Showing
1 changed file
with
90 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,90 @@ | ||
name: Build game | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
- hotfix* | ||
paths: | ||
- src/** | ||
- forcebuild.txt | ||
- .github/workflows/* | ||
|
||
# NOTE: Each step sets cwd back to git folder. | ||
jobs: | ||
build-linux: | ||
name: Build for Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install build-essential gcc-multilib g++-multilib | ||
- name: Download Steam Runtime | ||
run: | | ||
sudo mkdir /valve | ||
sudo wget http://media.steampowered.com/client/runtime/steam-runtime-sdk_latest.tar.xz | ||
sudo tar xvf steam-runtime-sdk_latest.tar.xz | ||
sudo mv steam-runtime-sdk_2013-09-05 /valve/steam-runtime | ||
- name: Install Runtime | ||
run: cat build/steam-runtime-install.txt | sudo /valve/steam-runtime/setup.sh | ||
- name: Create make file | ||
run: | | ||
cd src | ||
./creategameprojects | ||
- name: Make | ||
run: cat build/make-game-script.txt | sudo /valve/steam-runtime/shell-i386.sh | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-artifact | ||
path: | | ||
game/zombie_master_reborn/bin/client.sp | ||
game/zombie_master_reborn/bin/client.so.dbg | ||
game/zombie_master_reborn/bin/game_shader_dx9.so | ||
game/zombie_master_reborn/bin/game_shader_dx9.so.dbg | ||
game/zombie_master_reborn/bin/server.so | ||
game/zombie_master_reborn/bin/server.so.dbg | ||
game/zombie_master_reborn/bin/server_srv.so | ||
game/zombie_master_reborn/bin/server_srv.so.dbg | ||
if-no-files-found: error | ||
|
||
build-windows: | ||
name: Build for Windows | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup msbuild | ||
uses: microsoft/[email protected] | ||
- name: Run fix_vcxproj.bat | ||
run: | | ||
cd src | ||
./fix_vcxproj.bat | ||
- name: Run creategameprojects.bat | ||
run: | | ||
cd src | ||
./creategameprojects.bat | ||
- name: Fix solution | ||
shell: cmd | ||
run: | | ||
cd src | ||
COPY zmr-games.sln+sln_fix.txt zmr-games.sln /b | ||
- name: Build | ||
run: msbuild src/zmr-games.sln -property:Configuration=Release | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: windows-artifact | ||
path: | | ||
game/zombie_master_reborn/bin/client.dll | ||
game/zombie_master_reborn/bin/client.pdb | ||
game/zombie_master_reborn/bin/game_shader_dx9.dll | ||
game/zombie_master_reborn/bin/game_shader_dx9.pdb | ||
game/zombie_master_reborn/bin/server.dll | ||
game/zombie_master_reborn/bin/server.pdb | ||
if-no-files-found: error | ||
name: Build game | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
- hotfix* | ||
paths: | ||
- src/** | ||
- build/** | ||
- forcebuild.txt | ||
- .github/workflows/* | ||
|
||
# NOTE: Each step sets cwd back to git folder. | ||
jobs: | ||
build-linux: | ||
name: Build for Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install build-essential gcc-multilib g++-multilib | ||
- name: Download Steam Runtime | ||
run: | | ||
sudo mkdir /valve | ||
sudo wget http://media.steampowered.com/client/runtime/steam-runtime-sdk_latest.tar.xz | ||
sudo tar xvf steam-runtime-sdk_latest.tar.xz | ||
sudo mv steam-runtime-sdk_2013-09-05 /valve/steam-runtime | ||
- name: Install Runtime | ||
run: cat build/steam-runtime-install.txt | sudo /valve/steam-runtime/setup.sh | ||
- name: Create make file | ||
run: | | ||
cd src | ||
./creategameprojects | ||
- name: Make | ||
run: cat build/make-game-script.txt | sudo /valve/steam-runtime/shell-i386.sh | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-artifact | ||
path: | | ||
game/zombie_master_reborn/bin/client.sp | ||
game/zombie_master_reborn/bin/client.so.dbg | ||
game/zombie_master_reborn/bin/game_shader_dx9.so | ||
game/zombie_master_reborn/bin/game_shader_dx9.so.dbg | ||
game/zombie_master_reborn/bin/server.so | ||
game/zombie_master_reborn/bin/server.so.dbg | ||
game/zombie_master_reborn/bin/server_srv.so | ||
game/zombie_master_reborn/bin/server_srv.so.dbg | ||
if-no-files-found: error | ||
|
||
build-windows: | ||
name: Build for Windows | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup msbuild | ||
uses: microsoft/[email protected] | ||
- name: Run fix_vcxproj.bat | ||
run: | | ||
cd src | ||
./fix_vcxproj.bat | ||
- name: Run creategameprojects.bat | ||
run: | | ||
cd src | ||
./creategameprojects.bat | ||
- name: Fix solution | ||
shell: cmd | ||
run: | | ||
cd src | ||
COPY zmr-games.sln+sln_fix.txt zmr-games.sln /b | ||
- name: Build | ||
run: msbuild src/zmr-games.sln -property:Configuration=Release | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: windows-artifact | ||
path: | | ||
game/zombie_master_reborn/bin/client.dll | ||
game/zombie_master_reborn/bin/client.pdb | ||
game/zombie_master_reborn/bin/game_shader_dx9.dll | ||
game/zombie_master_reborn/bin/game_shader_dx9.pdb | ||
game/zombie_master_reborn/bin/server.dll | ||
game/zombie_master_reborn/bin/server.pdb | ||
if-no-files-found: error |