build: crazy workflow idea
Some checks failed
Build / build-linux (push) Failing after 8s

This commit is contained in:
6arelyFuture 2024-03-20 17:31:05 +01:00
parent 09af9cba74
commit beb024ac38
3 changed files with 50 additions and 0 deletions

18
.gitea/scripts/ci.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
# setup
mkdir build
cd build
mkdir iw4
mkdir iw5
cd ..
cp iw4/scripts/mp/_jump.gsc build/iw4
# replace gsc extension with c so GCC is happy
mv iw5/scripts/mp/_jump.gsc iw5/scripts/mp/_jump.c
# perform macro expansion
gcc -D_UTILITY_DEBUG -DIW5 -DCI -E "iw5/scripts/mp/_jump.c" -o _jump.in
mv _jump.in build/iw5/_jump.gsc

26
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,26 @@
name: Build
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Check out files
uses: actions/checkout@main
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Create release
run: |
./gitea/scripts/ci.sh
- name: Upload release
uses: actions/upload-artifact@main
with:
name: release
path: |
build/iw4/_jump.gsc
build/iw5/_jump.gsc

View File

@ -4,7 +4,11 @@
#define TOOL #define TOOL
#endif #endif
#if !defined(TOOL)
#inline scripts\mp\_utility; #inline scripts\mp\_utility;
#else
#include "_utility.gsh"
#endif
GENERIC_INIT; GENERIC_INIT;
@ -14,7 +18,9 @@ onPlayerConnect()
{ {
level waittill( "connected", player ); level waittill( "connected", player );
#if defined(TOOL)
waittillframeend; waittillframeend;
#endif
BOT_CHK( player ); BOT_CHK( player );