mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-04-15 05:52:32 +03:00
Adapt build automation to new branch (WIP)
This commit is contained in:
parent
62331158d5
commit
14b5256b27
@ -18,14 +18,6 @@ on:
|
||||
options:
|
||||
- Release
|
||||
- Debug
|
||||
branch:
|
||||
description: 'Which Source 2013 engine branch to compile for'
|
||||
default: 'sp'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- sp
|
||||
- mp
|
||||
game:
|
||||
description: 'Name of the game to build (if relevant)'
|
||||
default: 'episodic'
|
||||
@ -34,6 +26,8 @@ on:
|
||||
options:
|
||||
- episodic
|
||||
- hl2
|
||||
- hl2mp
|
||||
- tf
|
||||
project-group:
|
||||
description: 'Which group of projects to compile'
|
||||
required: true
|
||||
@ -63,7 +57,6 @@ jobs:
|
||||
uses: ./.github/workflows/mapbase_build-base.yml
|
||||
with:
|
||||
configuration: '${{ github.event.inputs.configuration }}'
|
||||
branch: '${{ github.event.inputs.branch }}'
|
||||
game: '${{ github.event.inputs.game }}'
|
||||
project-group: '${{ github.event.inputs.project-group }}'
|
||||
solution-name: '${{ github.event.inputs.solution-name }}'
|
||||
|
77
.github/workflows/mapbase_build-base.yml
vendored
77
.github/workflows/mapbase_build-base.yml
vendored
@ -21,11 +21,6 @@ on:
|
||||
default: 'Release'
|
||||
required: true
|
||||
type: string
|
||||
branch:
|
||||
description: 'Which Source 2013 engine branch to compile for'
|
||||
default: 'sp'
|
||||
required: true
|
||||
type: string
|
||||
game:
|
||||
description: 'The name of the game to build (if relevant)'
|
||||
default: 'episodic'
|
||||
@ -52,38 +47,34 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
uses: compnerd/gha-setup-vsdevenv@v6
|
||||
|
||||
- name: Enable VS2022
|
||||
working-directory: '${{inputs.branch}}/src/vpc_scripts'
|
||||
shell: bash
|
||||
run: sed -i 's/^\($Conditional[ ]\+VS2022[ ]\+\).*/\1"1"/' newer_vs_toolsets.vpc
|
||||
|
||||
- name: Pick game
|
||||
if: inputs.project-group == 'game' || inputs.project-group == 'shaders'
|
||||
working-directory: '${{inputs.branch}}/src'
|
||||
working-directory: 'src'
|
||||
shell: bash
|
||||
run: sed -i 's/\/hl2 \/episodic/\/${{inputs.game}}/' create${{inputs.project-group}}projects.bat
|
||||
run: sed -i 's/\/hl2mp \/tf/\/${{inputs.game}}/' create${{inputs.project-group}}projects.bat
|
||||
|
||||
- name: Create project files
|
||||
working-directory: '${{inputs.branch}}/src'
|
||||
working-directory: 'src'
|
||||
shell: cmd
|
||||
# https://github.com/ValveSoftware/source-sdk-2013/issues/72
|
||||
run: |
|
||||
reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" /v DefaultProjectExtension /t REG_SZ /d vcproj /f
|
||||
create${{inputs.project-group}}projects.bat
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
- name: Build
|
||||
#if: steps.filter.outputs.game == 'true'
|
||||
working-directory: '${{inputs.branch}}/src'
|
||||
working-directory: 'src'
|
||||
shell: cmd
|
||||
run: |
|
||||
devenv ${{inputs.solution-name}}.sln /upgrade
|
||||
msbuild -m -t:Rebuild -p:Configuration=${{inputs.configuration}};Platform=x86 ${{inputs.solution-name}}.sln
|
||||
msbuild -m -t:Rebuild -p:Configuration=${{inputs.configuration}};Platform=win64 ${{inputs.solution-name}}.sln
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
@ -93,7 +84,7 @@ jobs:
|
||||
with:
|
||||
name: '${{inputs.project-group}}_${{inputs.game}}_win32_${{ inputs.configuration }}'
|
||||
path: |
|
||||
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*.dll
|
||||
game/mod_${{inputs.game}}/bin/*.dll
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Publish map tools
|
||||
@ -102,8 +93,8 @@ jobs:
|
||||
with:
|
||||
name: '${{inputs.project-group}}_win32_${{ inputs.configuration }}'
|
||||
path: |
|
||||
${{inputs.branch}}/game/bin/*.exe
|
||||
${{inputs.branch}}/game/bin/*.dll
|
||||
game/bin/*.exe
|
||||
game/bin/*.dll
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Publish everything
|
||||
@ -112,8 +103,8 @@ jobs:
|
||||
with:
|
||||
name: 'everything_win32_${{ inputs.configuration }}'
|
||||
path: |
|
||||
${{inputs.branch}}/game/bin
|
||||
${{inputs.branch}}/game/mod_*/bin
|
||||
game/bin
|
||||
game/mod_*/bin
|
||||
if-no-files-found: error
|
||||
|
||||
build_ubuntu:
|
||||
@ -124,36 +115,32 @@ jobs:
|
||||
config: ${{ inputs.configuration }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install GCC/G++ multilib
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-multilib g++-multilib
|
||||
sudo apt-get -y install podman python3
|
||||
|
||||
- name: Pick game
|
||||
if: inputs.project-group == 'game' || inputs.project-group == 'shaders'
|
||||
working-directory: '${{inputs.branch}}/src'
|
||||
working-directory: 'src'
|
||||
shell: bash
|
||||
run: sed -i 's/\/hl2 \/episodic/\/${{inputs.game}}/' create${{inputs.project-group}}projects
|
||||
run: sed -i 's/\/hl2mp \/tf/\/${{inputs.game}}/' build${{inputs.project-group}}projects
|
||||
|
||||
- name: Set configuration
|
||||
working-directory: '${{inputs.branch}}/src'
|
||||
working-directory: 'src'
|
||||
shell: bash
|
||||
run: |
|
||||
config=${{inputs.configuration}}
|
||||
export CFG=${config,,}
|
||||
echo "config=${CFG}" >> $GITHUB_ENV
|
||||
|
||||
- name: Create project files
|
||||
working-directory: '${{inputs.branch}}/src'
|
||||
run: ./create${{inputs.project-group}}projects
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
- name: Build
|
||||
working-directory: '${{inputs.branch}}/src'
|
||||
run: make CFG=${{env.config}} -f ${{inputs.solution-name}}.mak
|
||||
working-directory: 'src'
|
||||
run: ./build${{inputs.project-group}}projects ${config,,}
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
@ -163,8 +150,8 @@ jobs:
|
||||
with:
|
||||
name: '${{inputs.project-group}}_${{inputs.game}}_linux32_${{ inputs.configuration }}'
|
||||
path: |
|
||||
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*.so
|
||||
!${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*_srv.so
|
||||
game/mod_${{inputs.game}}/bin/*.so
|
||||
!game/mod_${{inputs.game}}/bin/*_srv.so
|
||||
if-no-files-found: error
|
||||
|
||||
#- name: Publish map tools
|
||||
@ -173,11 +160,11 @@ jobs:
|
||||
# with:
|
||||
# name: '${{inputs.project-group}}_linux32_${{ inputs.configuration }}'
|
||||
# path: |
|
||||
# ${{inputs.branch}}/game/bin/vbsp
|
||||
# ${{inputs.branch}}/game/bin/vvis
|
||||
# ${{inputs.branch}}/game/bin/vvis_dll.so
|
||||
# ${{inputs.branch}}/game/bin/vrad
|
||||
# ${{inputs.branch}}/game/bin/vrad_dll.so
|
||||
# game/bin/vbsp
|
||||
# game/bin/vvis
|
||||
# game/bin/vvis_dll.so
|
||||
# game/bin/vrad
|
||||
# game/bin/vrad_dll.so
|
||||
# if-no-files-found: error
|
||||
|
||||
# For now, don't publish the .dbg files even though we publish .pdb files on Windows
|
||||
@ -188,8 +175,8 @@ jobs:
|
||||
with:
|
||||
name: 'everything_linux32_${{ inputs.configuration }}'
|
||||
path: |
|
||||
${{inputs.branch}}/game/bin/*.so
|
||||
!${{inputs.branch}}/game/bin/*_srv.so
|
||||
${{inputs.branch}}/game/mod_*/bin/*.so
|
||||
!${{inputs.branch}}/game/mod_*/bin/*_srv.so
|
||||
game/bin/*.so
|
||||
!game/bin/*_srv.so
|
||||
game/mod_*/bin/*.so
|
||||
!game/mod_*/bin/*_srv.so
|
||||
if-no-files-found: error
|
||||
|
@ -14,14 +14,14 @@ on:
|
||||
- develop
|
||||
paths:
|
||||
- '.github/workflows/mapbase_build-base.yml'
|
||||
- '.github/workflows/mapbase_build-sp-rel-games.yml'
|
||||
- 'sp/src/vpc_scripts/**'
|
||||
- 'sp/src/game/**'
|
||||
- 'sp/src/mathlib/**'
|
||||
- 'sp/src/responserules/runtime/**'
|
||||
- 'sp/src/tier1/**'
|
||||
- 'sp/src/vgui2/vgui_controls/**'
|
||||
- 'sp/src/vscript/**'
|
||||
- '.github/workflows/mapbase_build-games.yml'
|
||||
- 'src/vpc_scripts/**'
|
||||
- 'src/game/**'
|
||||
- 'src/mathlib/**'
|
||||
- 'src/responserules/runtime/**'
|
||||
- 'src/tier1/**'
|
||||
- 'src/vgui2/vgui_controls/**'
|
||||
- 'src/vscript/**'
|
||||
|
||||
jobs:
|
||||
games:
|
||||
@ -31,7 +31,6 @@ jobs:
|
||||
uses: ./.github/workflows/mapbase_build-base.yml
|
||||
with:
|
||||
configuration: ${{ matrix.configuration }}
|
||||
branch: 'sp'
|
||||
game: 'episodic' # Change this if your mod is not using HL2/Episodic game projects
|
||||
project-group: 'game'
|
||||
solution-name: 'games'
|
@ -13,17 +13,17 @@ on:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- '.github/workflows/mapbase_build-sp-rel-maptools.yml'
|
||||
- 'sp/src/vpc_scripts/**'
|
||||
- 'sp/src/utils/vbsp/**'
|
||||
- 'sp/src/utils/vvis/**'
|
||||
- 'sp/src/utils/vvis_launcher/**'
|
||||
- 'sp/src/utils/vrad/**'
|
||||
- 'sp/src/utils/vrad_launcher/**'
|
||||
- 'sp/src/mathlib/**'
|
||||
- 'sp/src/tier1/**'
|
||||
- 'sp/src/vgui2/vgui_controls/**'
|
||||
- 'sp/src/vscript/**'
|
||||
- '.github/workflows/mapbase_build-maptools.yml'
|
||||
- 'src/vpc_scripts/**'
|
||||
- 'src/utils/vbsp/**'
|
||||
- 'src/utils/vvis/**'
|
||||
- 'src/utils/vvis_launcher/**'
|
||||
- 'src/utils/vrad/**'
|
||||
- 'src/utils/vrad_launcher/**'
|
||||
- 'src/mathlib/**'
|
||||
- 'src/tier1/**'
|
||||
- 'src/vgui2/vgui_controls/**'
|
||||
- 'src/vscript/**'
|
||||
|
||||
jobs:
|
||||
maptools:
|
||||
@ -33,6 +33,5 @@ jobs:
|
||||
uses: ./.github/workflows/mapbase_build-base.yml
|
||||
with:
|
||||
configuration: ${{ matrix.configuration }}
|
||||
branch: 'sp'
|
||||
project-group: 'maptools'
|
||||
solution-name: 'maptools'
|
1
.github/workflows/mapbase_build-master.yml
vendored
1
.github/workflows/mapbase_build-master.yml
vendored
@ -25,7 +25,6 @@ jobs:
|
||||
uses: ./.github/workflows/mapbase_build-base.yml
|
||||
with:
|
||||
configuration: ${{ matrix.configuration }}
|
||||
branch: 'sp'
|
||||
project-group: 'all'
|
||||
solution-name: 'everything'
|
||||
build-on-linux: true # Disable this if you don't want to compile for Linux
|
||||
|
@ -13,10 +13,10 @@ on:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- '.github/workflows/mapbase_build-sp-rel-shaders.yml'
|
||||
- 'sp/src/vpc_scripts/**'
|
||||
- 'sp/src/materialsystem/**'
|
||||
- 'sp/src/mathlib/**'
|
||||
- '.github/workflows/mapbase_build-shaders.yml'
|
||||
- 'src/vpc_scripts/**'
|
||||
- 'src/materialsystem/**'
|
||||
- 'src/mathlib/**'
|
||||
|
||||
jobs:
|
||||
shaders:
|
@ -24,7 +24,7 @@ fi
|
||||
solution_out="_vpc_/ninja/sdk_everything_$VPC_NINJA_BUILD_MODE"
|
||||
|
||||
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||
devtools/bin/vpc /hl2mp /tf /linux64 /ninja /define:SOURCESDK +everything /mksln "$solution_out"
|
||||
devtools/bin/vpc /hl2mp /tf /hl2 /episodic /linux64 /ninja /define:SOURCESDK +everything /mksln "$solution_out"
|
||||
|
||||
# Generate compile commands.
|
||||
ninja -f "$solution_out.ninja" -t compdb > compile_commands.json
|
||||
|
38
src/buildgameprojects
Executable file
38
src/buildgameprojects
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
script=$(readlink -f -- "$0")
|
||||
pushd "$(dirname -- "$script")" > /dev/null
|
||||
|
||||
source sdk_container
|
||||
run_in_sniper "$@"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
export VPC_NINJA_BUILD_MODE="release"
|
||||
else
|
||||
if [[ "$1" == "debug" ]]; then
|
||||
export VPC_NINJA_BUILD_MODE="debug"
|
||||
elif [[ "$1" == "release" ]]; then
|
||||
export VPC_NINJA_BUILD_MODE="release"
|
||||
else
|
||||
echo "Usage: $0 [debug|release]"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
solution_out="_vpc_/ninja/sdk_everything_$VPC_NINJA_BUILD_MODE"
|
||||
|
||||
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||
devtools/bin/vpc /hl2mp /tf /linux64 /ninja /define:SOURCESDK +game /mksln "$solution_out"
|
||||
|
||||
# Generate compile commands.
|
||||
ninja -f "$solution_out.ninja" -t compdb > compile_commands.json
|
||||
# Remove some unsupported clang commands.
|
||||
sed -i 's/-fpredictive-commoning//g; s/-fvar-tracking-assignments//g' compile_commands.json
|
||||
sed -i 's|/my_mod/src|.|g' compile_commands.json
|
||||
fi
|
||||
|
||||
ninja -f "$solution_out.ninja" -j$(nproc)
|
||||
|
||||
popd
|
38
src/buildgameprojects_hl2
Executable file
38
src/buildgameprojects_hl2
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
script=$(readlink -f -- "$0")
|
||||
pushd "$(dirname -- "$script")" > /dev/null
|
||||
|
||||
source sdk_container
|
||||
run_in_sniper "$@"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
export VPC_NINJA_BUILD_MODE="release"
|
||||
else
|
||||
if [[ "$1" == "debug" ]]; then
|
||||
export VPC_NINJA_BUILD_MODE="debug"
|
||||
elif [[ "$1" == "release" ]]; then
|
||||
export VPC_NINJA_BUILD_MODE="release"
|
||||
else
|
||||
echo "Usage: $0 [debug|release]"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
solution_out="_vpc_/ninja/sdk_everything_$VPC_NINJA_BUILD_MODE"
|
||||
|
||||
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||
devtools/bin/vpc /hl2 /episodic /linux64 /ninja /define:SOURCESDK +game /mksln "$solution_out"
|
||||
|
||||
# Generate compile commands.
|
||||
ninja -f "$solution_out.ninja" -t compdb > compile_commands.json
|
||||
# Remove some unsupported clang commands.
|
||||
sed -i 's/-fpredictive-commoning//g; s/-fvar-tracking-assignments//g' compile_commands.json
|
||||
sed -i 's|/my_mod/src|.|g' compile_commands.json
|
||||
fi
|
||||
|
||||
ninja -f "$solution_out.ninja" -j$(nproc)
|
||||
|
||||
popd
|
38
src/buildshadersprojects
Executable file
38
src/buildshadersprojects
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
script=$(readlink -f -- "$0")
|
||||
pushd "$(dirname -- "$script")" > /dev/null
|
||||
|
||||
source sdk_container
|
||||
run_in_sniper "$@"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
export VPC_NINJA_BUILD_MODE="release"
|
||||
else
|
||||
if [[ "$1" == "debug" ]]; then
|
||||
export VPC_NINJA_BUILD_MODE="debug"
|
||||
elif [[ "$1" == "release" ]]; then
|
||||
export VPC_NINJA_BUILD_MODE="release"
|
||||
else
|
||||
echo "Usage: $0 [debug|release]"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
solution_out="_vpc_/ninja/sdk_everything_$VPC_NINJA_BUILD_MODE"
|
||||
|
||||
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||
devtools/bin/vpc /hl2mp /tf /linux64 /ninja /define:SOURCESDK +shaders /mksln "$solution_out"
|
||||
|
||||
# Generate compile commands.
|
||||
ninja -f "$solution_out.ninja" -t compdb > compile_commands.json
|
||||
# Remove some unsupported clang commands.
|
||||
sed -i 's/-fpredictive-commoning//g; s/-fvar-tracking-assignments//g' compile_commands.json
|
||||
sed -i 's|/my_mod/src|.|g' compile_commands.json
|
||||
fi
|
||||
|
||||
ninja -f "$solution_out.ninja" -j$(nproc)
|
||||
|
||||
popd
|
38
src/buildshadersprojects_hl2
Executable file
38
src/buildshadersprojects_hl2
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
script=$(readlink -f -- "$0")
|
||||
pushd "$(dirname -- "$script")" > /dev/null
|
||||
|
||||
source sdk_container
|
||||
run_in_sniper "$@"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
export VPC_NINJA_BUILD_MODE="release"
|
||||
else
|
||||
if [[ "$1" == "debug" ]]; then
|
||||
export VPC_NINJA_BUILD_MODE="debug"
|
||||
elif [[ "$1" == "release" ]]; then
|
||||
export VPC_NINJA_BUILD_MODE="release"
|
||||
else
|
||||
echo "Usage: $0 [debug|release]"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
solution_out="_vpc_/ninja/sdk_everything_$VPC_NINJA_BUILD_MODE"
|
||||
|
||||
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||
devtools/bin/vpc /hl2 /episodic /linux64 /ninja /define:SOURCESDK +shaders /mksln "$solution_out"
|
||||
|
||||
# Generate compile commands.
|
||||
ninja -f "$solution_out.ninja" -t compdb > compile_commands.json
|
||||
# Remove some unsupported clang commands.
|
||||
sed -i 's/-fpredictive-commoning//g; s/-fvar-tracking-assignments//g' compile_commands.json
|
||||
sed -i 's|/my_mod/src|.|g' compile_commands.json
|
||||
fi
|
||||
|
||||
ninja -f "$solution_out.ninja" -j$(nproc)
|
||||
|
||||
popd
|
@ -1 +1 @@
|
||||
devtools\bin\vpc.exe /hl2mp /tf /define:SOURCESDK +everything /mksln everything.sln
|
||||
devtools\bin\vpc.exe /hl2mp /tf /hl2 /episodic /define:SOURCESDK +everything /mksln everything.sln
|
||||
|
2
src/creategameprojects.bat
Normal file
2
src/creategameprojects.bat
Normal file
@ -0,0 +1,2 @@
|
||||
devtools\bin\vpc.exe /hl2mp /tf /define:SOURCESDK +game /mksln games.sln
|
||||
pause
|
2
src/creategameprojects_hl2.bat
Normal file
2
src/creategameprojects_hl2.bat
Normal file
@ -0,0 +1,2 @@
|
||||
devtools\bin\vpc.exe /hl2 /define:SOURCESDK +game +shaders /mksln games.sln
|
||||
pause
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
pushd `dirname $0`
|
||||
devtools/bin/vpc /hl2 /episodic +maptools /mksln maptools
|
||||
popd
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
pushd `dirname $0`
|
||||
devtools/bin/vpc /hl2 /episodic +shaders /mksln shaders
|
||||
popd
|
@ -1 +1 @@
|
||||
devtools\bin\vpc.exe /hl2 /episodic +shaders /mksln shaders.sln
|
||||
devtools\bin\vpc.exe /hl2mp /tf +shaders /mksln shaders.sln
|
||||
|
1
src/createshadersprojects_hl2.bat
Normal file
1
src/createshadersprojects_hl2.bat
Normal file
@ -0,0 +1 @@
|
||||
devtools\bin\vpc.exe /hl2 /episodic +shaders /mksln shaders.sln
|
Loading…
x
Reference in New Issue
Block a user