Skip to content

Trigger build on build scripts change #9

Trigger build on build scripts change

Trigger build on build scripts change #9

Workflow file for this run

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