diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a6e6ed5 --- /dev/null +++ b/.github/workflows/build.yml @@ -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/{} \ + \;