This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add auto-build on github actions (#4)
- Loading branch information
1 parent
64e95d8
commit 77d790c
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
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/{} \ | ||
\; |