-
Notifications
You must be signed in to change notification settings - Fork 38
68 lines (56 loc) · 2.02 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Compile with SourceMod
on:
pull_request:
branches: master
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
SM_VERSION: ["1.11", "1.12"]
steps:
- uses: actions/checkout@v4
- name: Set environment variables
run: |
SOURCEMOD_PATH=$GITHUB_WORKSPACE/addons/sourcemod
echo "SOURCEMOD_PATH=$SOURCEMOD_PATH" >> $GITHUB_ENV
echo "SCRIPTS_PATH=$SOURCEMOD_PATH/scripting" >> $GITHUB_ENV
- name: Setup SourcePawn Compiler ${{ matrix.SM_VERSION }}
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.SM_VERSION }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: python3 -m pip install --upgrade pip setuptools wheel
- name: Download colorlib-gen
run: |
cd tools
git clone https://github.com/c0rp3n/colorlib-gen.git
- name: Install colorlib-gen
run: |
cd tools/colorlib-gen
pip install -r ./requirements.txt
python3 ./setup.py install
- name: Generate colorlib_map.inc
run: colorlib_gen -r --config "./ttt_colors.yaml" "../addons/sourcemod/scripting/include/colorlib_map.inc"
working-directory: ./tools
- name: Compile TTT
run: |
for file in *.sp
do
echo -e "\nCompiling $file..."
spcomp -E -w234 -O2 -v2 -i $includePath -i $SCRIPTS_PATH/include $file
done
working-directory: ${{ env.SCRIPTS_PATH }}/ttt
- name: Compile 3rd party plugins
run: |
for plugin in "block_messages" "customkeyvalues" "discord_api" "no_weapon_fix" "turret_core" "vphysics_crash_avoider"
do
echo -e "\nCompiling $plugin.sp..."
spcomp -E -w234 -O2 -v2 -i $includePath -i $SCRIPTS_PATH/include $plugin.sp
done
working-directory: ${{ env.SCRIPTS_PATH }}/