Fix 2 issues and small things #191
Workflow file for this run
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
name: Compile with SourceMod | |
on: | |
pull_request: | |
branches: | |
- master | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
SM_VERSION: [ "1.11", "1.12" ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set environment variables | |
run: | | |
SOURCEMOD_PATH=$GITHUB_WORKSPACE/addons/sourcemod | |
echo "SOURCEMOD_PATH=$SOURCEMOD_PATH" >> $GITHUB_ENV | |
echo "PLUGINS_PATH=$SOURCEMOD_PATH/plugins" >> $GITHUB_ENV | |
echo "GAMEDATA_PATH=$SOURCEMOD_PATH/gamedata" >> $GITHUB_ENV | |
echo "SCRIPTING_PATH=$SOURCEMOD_PATH/scripting" >> $GITHUB_ENV | |
echo "INCLUDE_PATH=$SOURCEMOD_PATH/scripting/include" >> $GITHUB_ENV | |
echo "TRANSLATIONS_PATH=$SOURCEMOD_PATH/translations" >> $GITHUB_ENV | |
- name: Setup SourcePawn Compiler ${{ matrix.SM_VERSION }} | |
uses: rumblefrog/setup-sp@master | |
with: | |
version: ${{ matrix.SM_VERSION }} | |
- name: Fetch plugin dependencies | |
run: | | |
wget https://raw.githubusercontent.com/peace-maker/DHooks2/dynhooks/sourcemod_files/scripting/include/dhooks.inc -P $INCLUDE_PATH | |
wget https://raw.githubusercontent.com/Impact123/AutoExecConfig/development/autoexecconfig.inc -P $INCLUDE_PATH | |
wget https://raw.githubusercontent.com/c0rp3n/colorlib-sm/master/addons/sourcemod/scripting/include/colorlib.inc -P $INCLUDE_PATH | |
- name: Compile plugins | |
run: | | |
mkdir -p $PLUGINS_PATH | |
for file in *.sp | |
do | |
echo -e "\nCompiling $file..." | |
spcomp -w234 -O2 -v2 -i $includePath -i $INCLUDE_PATH -o $PLUGINS_PATH/$file $file | |
done | |
working-directory: ${{ env.SCRIPTING_PATH }} |