Skip to content
Permalink
Browse files

Use of our own runner

  • Loading branch information
Bara committed Dec 15, 2019
1 parent f6ac96f commit 6d77d31c21fa8ba5d6a5b5219179c175d67bbf5b
Showing with 55 additions and 3 deletions.
  1. +1 −3 .github/workflows/master.yml
  2. +54 −0 .github/workflows/pull_request.yml
@@ -3,12 +3,10 @@ name: Compile with SourceMod
on:
push:
branches: master
pull_request:
branches: master

jobs:
build:
runs-on: ubuntu-latest
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
@@ -0,0 +1,54 @@
name: Compile with SourceMod

on:
pull_request:
branches: master

jobs:
build:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
sm_version: ["1.10", "1.11"]


steps:
- uses: actions/checkout@v1

- name: Set environment variables
run: |
VERSION=$(git rev-list --count HEAD)
SHORT=$(git describe --always --long --dirty)
SOURCEMOD_PATH=$GITHUB_WORKSPACE/addons/sourcemod
echo ::set-env name=PLUGIN_VERSION::${{ matrix.SM_VERSION }}.$VERSION-$SHORT
echo ::set-env name=SOURCEMOD_PATH::$SOURCEMOD_PATH
echo ::set-env name=SCRIPTS_PATH::$SOURCEMOD_PATH/scripting
echo ::set-env name=PLUGINS_PATH::$SOURCEMOD_PATH/plugins
- name: Setup SourcePawn Compiler ${{ matrix.SM_VERSION }}
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.SM_VERSION }}

- name: Set TTT version
run: |
sed -i "s/<VERSION>/$PLUGIN_VERSION/g" $SCRIPTS_PATH/include/ttt_stock.inc
- name: Compile TTT
run: |
for file in *.sp
do
echo -e "\nCompiling $file..."
spcomp -w234 -O2 -v2 -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" "tripmines" "turret_core"
do
echo -e "\nCompiling $plugin.sp..."
spcomp -E -w234 -O2 -v2 -i $SCRIPTS_PATH/include $plugin.sp
done
working-directory: ${{ env.SCRIPTS_PATH }}/

0 comments on commit 6d77d31

Please sign in to comment.
You can’t perform that action at this time.