Skip to content

Drop Support For SM 1.11 #43

Drop Support For SM 1.11

Drop Support For SM 1.11 #43

Workflow file for this run

name: Compile Plugins
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Compile plugin for ${{ matrix.identifier }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
buildjobs:
- sourcemod-1.12
- sourcemod-1.13
include:
- buildjobs: sourcemod-1.12
os_version: ubuntu-latest
identifier: 'Sourcemod Stable'
sm-version: '1.12.x'
package-name: 'sm-stable'
- buildjobs: sourcemod-1.13
os_version: ubuntu-latest
identifier: 'Sourcemod Dev'
sm-version: '1.13.x'
package-name: 'sm-dev'
steps:
- name: Set environment variables
run: |
echo "SOURCEFILES_PATH=$GITHUB_WORKSPACE/sourcefiles" >> $GITHUB_ENV
echo "TPINCLUDES_PATH=$GITHUB_WORKSPACE/thirdparty/includes" >> $GITHUB_ENV
echo "BUILD_PATH=$GITHUB_WORKSPACE/build/source" >> $GITHUB_ENV
echo "PACKAGE_PATH=$GITHUB_WORKSPACE/build/package" >> $GITHUB_ENV
echo "CONFIGS_PATH=$GITHUB_WORKSPACE/build/package/addons/sourcemod/configs" >> $GITHUB_ENV
echo "SMDATA_PATH=$GITHUB_WORKSPACE/build/package/addons/sourcemod/data" >> $GITHUB_ENV
echo "GAMEDATA_PATH=$GITHUB_WORKSPACE/build/package/addons/sourcemod/gamedata" >> $GITHUB_ENV
echo "BINARY_PATH=$GITHUB_WORKSPACE/build/package/addons/sourcemod/plugins" >> $GITHUB_ENV
echo "LOC_PATH=$GITHUB_WORKSPACE/build/package/addons/sourcemod/translations" >> $GITHUB_ENV
- name: Create Folders
run: |
echo "Creating folders..."
mkdir -p ${{ env.TPINCLUDES_PATH }}
mkdir -p ${{ env.BUILD_PATH }}
mkdir -p ${{ env.CONFIGS_PATH }}
mkdir -p ${{ env.SMDATA_PATH }}
mkdir -p ${{ env.GAMEDATA_PATH }}
mkdir -p ${{ env.BINARY_PATH }}
mkdir -p ${{ env.LOC_PATH }}
- name: Fetch Plugins Sources
uses: actions/[email protected]
with:
path: sourcefiles
- name: Setup SourcePawn Compiler for ${{ matrix.identifier }} ( ${{ matrix.sm-version }} )
id: setup_sp
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.sm-version }}
- name: Fetch Third-Party Includes (WGET)
working-directory: ${{ env.TPINCLUDES_PATH }}
run: |
wget https://raw.githubusercontent.com/KyleSanderson/SteamWorks/master/Pawn/includes/SteamWorks.inc -O steamworks.inc
wget https://raw.githubusercontent.com/Sarrus1/DiscordWebhookAPI/master/include/discordWebhookAPI.inc -O discordWebhookAPI.inc
wget https://raw.githubusercontent.com/Impact123/AutoExecConfig/development/autoexecconfig.inc -O autoexecconfig.inc
wget https://raw.githubusercontent.com/peace-maker/sourcetvmanager/master/sourcetvmanager.inc -O sourcetvmanager.inc
wget https://raw.githubusercontent.com/nosoop/SM-SteamPawn/main/scripting/include/steampawn.inc -O steampawn.inc
wget https://raw.githubusercontent.com/Impact123/CallAdmin/development/gameserver/scripting/include/calladmin.inc -O calladmin.inc
ls -lah
- name: Fetch REST in SourcePawn
uses: actions/[email protected]
with:
repository: ErikMinekus/sm-ripext
path: ripext
- name: Fetch Left 4 DHooks Direct
uses: actions/[email protected]
with:
repository: SilvDev/Left4DHooks
path: left4dhooks
- name: Fetch SMLIB
uses: actions/[email protected]
with:
repository: bcserv/smlib
path: smlib
ref: transitional_syntax
- name: Fetch MultiColors
uses: actions/[email protected]
with:
repository: Bara/Multi-Colors
path: multicolors
- name: Fetch shqke
uses: actions/[email protected]
with:
repository: shqke/sp_public
path: shqkeplugins
- name: Fetch SourceBans++
uses: actions/[email protected]
with:
repository: sbpp/sourcebans-pp
path: sbpp
- name: Move Fetched Includes to Shared Includes Path
run: |
rsync -rv ${{ github.workspace }}/ripext/pawn/scripting/include/* ${{ env.TPINCLUDES_PATH }}/
rsync -rv ${{ github.workspace }}/left4dhooks/sourcemod/scripting/include/* ${{ env.TPINCLUDES_PATH }}/
rsync -rv ${{ github.workspace }}/smlib/scripting/include/* ${{ env.TPINCLUDES_PATH }}/
rsync -rv ${{ github.workspace }}/multicolors/addons/sourcemod/scripting/include/* ${{ env.TPINCLUDES_PATH }}/
rsync -rv ${{ github.workspace }}/shqkeplugins/.deps/include/* ${{ env.TPINCLUDES_PATH }}/
rsync -rv ${{ github.workspace }}/sbpp/game/addons/sourcemod/scripting/include/* ${{ env.TPINCLUDES_PATH }}/
ls -lah ${{ env.TPINCLUDES_PATH }}/
- name: Move Plugin Source Files to Build Directory
run: |
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/discordstatus_v2/scripting/* ${{ env.BUILD_PATH }}/
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/tf_mvm_credits/scripting/* ${{ env.BUILD_PATH }}/
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/autorecorder/scripting/* ${{ env.BUILD_PATH }}/
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/l4d_automod/scripting/* ${{ env.BUILD_PATH }}/
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/geolanguage/scripting/* ${{ env.BUILD_PATH }}/
cp ${{ github.workspace }}/sourcefiles/source/connectlog.sp ${{ env.BUILD_PATH }}/
cp ${{ github.workspace }}/sourcefiles/source/l4d_antiearlyvote.sp ${{ env.BUILD_PATH }}/
cp ${{ github.workspace }}/sourcefiles/source/sessionbans.sp ${{ env.BUILD_PATH }}/
cp ${{ github.workspace }}/sourcefiles/source/l4d2_admin_stealth.sp ${{ env.BUILD_PATH }}/
cp ${{ github.workspace }}/sourcefiles/source/sm_gamedata_tester.sp ${{ env.BUILD_PATH }}/
- name: Compile Plugins
working-directory: ${{ env.BUILD_PATH }}
run: |
for file in *.sp; do
echo -e "\nCompiling $file..."
spcomp -v2 -i ${{ env.TPINCLUDES_PATH }}/ $file
done
echo "===OUT FILES==="
ls -lah *.smx
- name: Move Compiled Plugins to Package Directory
run: |
rsync -rv ${{ env.BUILD_PATH }}/*.smx ${{ env.BINARY_PATH }}/
- name: Move Additional Files to Package Directory
run: |
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/discordstatus_v2/configs/* ${{ env.CONFIGS_PATH }}/
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/l4d_automod/configs/* ${{ env.CONFIGS_PATH }}/
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/l4d_automod/translations/* ${{ env.LOC_PATH }}/
rsync -rv ${{ github.workspace }}/sourcefiles/plugins/geolanguage/configs/* ${{ env.CONFIGS_PATH }}/
rsync -rv ${{ github.workspace }}/sourcefiles/gamedata/* ${{ env.GAMEDATA_PATH }}/
- name: Fetch Short SHA
uses: benjlevesque/[email protected]
id: short-sha
- name: Upload Compiled Plugins Artifact
uses: actions/[email protected]
with:
name: plugins-${{ matrix.package-name }}-${{ steps.short-sha.outputs.sha }}
path: |
build/package/*