-
Notifications
You must be signed in to change notification settings - Fork 72
49 lines (42 loc) · 1.73 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 }}