Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
add auto-build on github actions (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov authored and fl0werD committed Feb 19, 2021
1 parent 64e95d8 commit 77d790c
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build

on:
push:
pull_request:
schedule:
- cron: "15 0 */7 * *"

jobs:
build:
name: Build plugins
runs-on: ubuntu-latest
strategy:
matrix:
amxmodx: ["1.9", "1.10"]
fail-fast: false
steps:
- name: Checkout repo
uses: actions/checkout@v1

- name: Download AMXX && ReAPI and unpacking
env:
AMXMODX: ${{ matrix.amxmodx }}
run: |
curl -s https://www.amxmodx.org/amxxdrop/$AMXMODX/$(curl https://www.amxmodx.org/amxxdrop/$AMXMODX/amxmodx-latest-base-linux) -# | tar xz
curl -OL https://github.com/s1lentq/reapi/releases/download/5.19.0.211/reapi_5.19.0.211-dev.zip -#
unzip reapi_*-dev.zip && rm reapi_*-dev.zip
cd addons/amxmodx && rm scripting/*.sma && rm plugins/*.amxx
- name: Compile plugins AMXX Version
run: |
cp -Rf ./rezombieplague/* ./addons/amxmodx/scripting
mkdir -p ./addons/amxmodx/plugins/rezp/addons
mkdir -p ./addons/amxmodx/plugins/rezp/classes
mkdir -p ./addons/amxmodx/plugins/rezp/gamemodes
mkdir -p ./addons/amxmodx/plugins/rezp/items
mkdir -p ./addons/amxmodx/plugins/rezp/menus
mkdir -p ./addons/amxmodx/plugins/rezp/subclasses
mkdir -p ./addons/amxmodx/plugins/rezp/weapons
cd addons/amxmodx/scripting
chmod +x amxxpc32.so
chmod +x amxxpc
function realpath {
echo $(cd $(dirname $1); pwd)/$(basename $1);
}
amxxpc_path=$(realpath amxxpc)
find * -name "*.sma" \
-exec echo -e "\n\n> Compile {} <" \;\
-exec ${amxxpc_path} {} \
-iinclude \
-o../plugins/{} \
\;

0 comments on commit 77d790c

Please sign in to comment.