Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build Flow

on:
push:
branches:
- dev
pull_request:
branches:
- dev

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sm-version: [ '1.12.x' ]

steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive

- name: Setup SourcePawn ${{ matrix.sm-version }}
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.sm-version }}

- name: Setup Build Env
run: |
mkdir -p build/ccp build/include

cp -r -f ccp-* build/
cp -r -f ccp/* build/ccp/
cp -r -f include/* build/include/

cp -r -f third-party/packager/include/* build/include/
cp -r -f third-party/storage/src/include/* build/include/
cp -r -f third-party/sm-jansson/pawn/scripting/include/* build/include/
cp -r -f third-party/shop/addons/sourcemod/scripting/include/* build/include/
cp -r -f third-party/vip/addons/sourcemod/scripting/include/* build/include/

for dir in build/ccp-*/; do
mkdir -p "$dir/plugins" 2>/dev/null
done

mkdir -p build/ccp/plugins

- name: Build All
working-directory: build
run: |
for dir in ccp-*/; do
folder_name=$(basename "$dir")

s_file=$folder_name/scripting/$folder_name.sp
o_file=$folder_name/plugins/$folder_name.smx

echo "Compiling $s_file ..."

spcomp $s_file -O2 -v2 -iinclude -o $o_file
done

49 changes: 0 additions & 49 deletions .github/workflows/ci.yml

This file was deleted.

67 changes: 48 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,71 @@ jobs:
- name: Checkout
uses: actions/checkout@v7
with:
path: build
submodules: recursive

- uses: actions/checkout@v7
- name: Tag
id: get_tag
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "TAG=$TAG" >> $GITHUB_ENV

- name: Setup SourcePawn
- name: Setup SourcePawn ${{ matrix.sm-version }}
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.sm-version }}

- name: Setup Working Directory
- name: Setup Build Env
run: |
mkdir -p sourcemod/plugins
mkdir -p sourcemod/scripting
mkdir -p build/ccp build/include

cp -r -f ccp-* build/
cp -r -f ccp/* build/ccp/
cp -r -f include/* build/include/

cp -r -f third-party/packager/include/* build/include/
cp -r -f third-party/storage/src/include/* build/include/
cp -r -f third-party/sm-jansson/pawn/scripting/include/* build/include/
cp -r -f third-party/shop/addons/sourcemod/scripting/include/* build/include/
cp -r -f third-party/vip/addons/sourcemod/scripting/include/* build/include/

for dir in build/ccp-*/; do
mkdir -p "$dir/plugins" 2>/dev/null
done

mkdir -p build/ccp/plugins

cp -r -f src/* sourcemod/scripting/

- name: Build
working-directory: src
working-directory: build
run: |
for file in *.sp;
do
filename="${file%.*}"
for dir in ccp-*/; do
folder_name=$(basename "$dir")

echo "Compiling $filename..."
spcomp $file -O2 -v2 -iinclude -o ../sourcemod/plugins/$filename.smx
s_file=$folder_name/scripting/$folder_name.sp
o_file=$folder_name/plugins/$folder_name.smx

echo "Compiling $s_file ..."

spcomp $s_file -O2 -v2 -iinclude -o $o_file
done

- name: Package
working-directory: sourcemod
run: 7z a ccprocessor-${{ matrix.sm-version }}.zip ./*
working-directory: build
run: |
TAG="${{ steps.get_tag.outputs.tag }}"

7z a ccp-${TAG}.${{ github.run_number }}-bundle.zip ./*

for dir in ccp-*/; do
name=$(basename "$dir")

(cd $dir && 7z a "../${name}-${TAG}.${{ github.run_number }}.zip" ./*)
done

- name: Attach extension
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'sourcemod/ccprocessor-${{ matrix.sm-version }}.zip'
asset_name: ccprocessor-$tag.${{ github.run_number }}.zip
file: 'build/*.zip'
tag: ${{ github.ref }}
file_glob: false
file_glob: true
17 changes: 17 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[submodule "third-party/packager"]
path = third-party/packager
url = https://github.com/rej-clown/packager.git
[submodule "third-party/storage"]
path = third-party/storage
url = https://github.com/rej-clown/storage.git
[submodule "third-party/sm-jansson"]
path = third-party/sm-jansson
url = https://github.com/rejchev/sm-jansson.git
branch = main
[submodule "third-party/shop"]
path = third-party/shop
url = https://github.com/hlmod/Shop-Core.git
branch = master
[submodule "third-party/vip"]
path = third-party/vip
url = https://github.com/R1KO/VIP-Core.git
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ Handlers intercept and expand the engine’s message channels by virtualizing th
| `TextMsg` | `ccp-textmsg.smx` | `Yes` | `TM` = Server chat |
| `SayText` | `ccp-saytext.smx` | `Yes` | `ST` = Server chat |
| `RadioText` | `ccp-radiomsg.smx` | `Yes` | `RT` = Radio chat |

## [Supported Modules](https://github.com/rejchev/ccp-modules)

## License
[GNU Public License v3](https://github.com/rejchev/ccprocessor/blob/main/LICENSE)
Loading