1
0
Fork 0
mirror of https://codeberg.org/spire/spcomp.git synced 2026-06-03 08:34:12 +02:00
Docker image for compiling sourcepawn scripts
  • Shell 82.1%
  • Dockerfile 17.9%
Find a file
2023-08-24 20:15:50 +00:00
.github/workflows docker ci 2021-07-31 16:45:44 +02:00
action.yml fix source 2020-02-09 22:27:04 +01:00
Dockerfile build improvements 2020-02-09 22:45:08 +01:00
install.sh Update install.sh 2023-08-24 20:15:50 +00:00
LICENSE add license 2020-05-08 19:14:49 +02:00
README.md explain action in readme 2020-02-09 23:00:36 +01:00
spcomp.sh overwrite the target without creating a new node 2020-05-19 22:12:27 +02:00

SPCOMP

Docker image for compiling sourcepawn scripts

Usage

docker run --rm -v "$PWD":/data spiretf/spcomp inputfile.sp

If the /output directory is mounted then the resulting plugins will be created there.

Extensions

The docker image comes with include files for the following sourcemod extensions

Additional include files can be added by mounting them inside /include

Github action

You can also use the github action to automatically compile your sourcepawn scripts whenever they are modified.

Create a .github/workflows/compile.yaml with the following contents, adjusting the paths to your plugin

name: Build sourcepawn and commit

on:
  push:
    paths:
      - '**.sp'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Compile sourcepawn
        uses: spiretf/spcomp@v0.1.0
        with:
          source: './plugin/myplugin.sp'
          target: './plugin/myplugin.smx'

      - name: Commit files
        run: |
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"
          git commit -m "Compile sourcepawn" -a
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}