fix: Update CI workflows for monorepo structure
Some checks failed
Botlib CI / build (push) Successful in 4m37s
BotServer CI / build (push) Failing after 3m55s
Bottest CI / build (push) Failing after 10m21s
BotUI CI / build (push) Failing after 2m40s

- Fix all workflows to use /opt/gbo/work/generalbots (monorepo)
- Add proper env vars (SCCACHE, CARGO_TARGET_DIR, PATH) to all workflows
- Add deploy steps for botui (with process restart)
- Remove broken workflows for non-Rust packages (botapp, botbook,
  botdevice, botmodels, botplugin)
- Add botlib test workflow
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-22 01:23:37 +00:00
parent 5ab886e6e3
commit b537b021c4
9 changed files with 91 additions and 118 deletions

View file

@ -1,16 +0,0 @@
name: Botapp CI
on:
push:
branches: [main]
paths:
- 'botapp/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botapp
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -1,16 +0,0 @@
name: Botbook CI
on:
push:
branches: [main]
paths:
- 'botbook/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botbook
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -1,16 +0,0 @@
name: Botdevice CI
on:
push:
branches: [main]
paths:
- 'botdevice/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botdevice
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -0,0 +1,26 @@
name: Botlib CI
on:
push:
branches: [main]
paths:
- 'botlib/**'
- '.forgejo/workflows/botlib.yaml'
env:
SCCACHE_DIR: /opt/gbo/work/.sccache
CARGO_TARGET_DIR: /opt/gbo/work/target
RUSTC_WRAPPER: sccache
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jobs:
build:
runs-on: gbo
steps:
- name: Setup
run: |
cd /opt/gbo/work/generalbots
git reset --hard HEAD
git clean -fd
git pull
- name: Test
run: |
cd /opt/gbo/work/generalbots
cargo test -p botlib

View file

@ -1,16 +0,0 @@
name: Botmodels CI
on:
push:
branches: [main]
paths:
- 'botmodels/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botmodels
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -1,16 +0,0 @@
name: Botplugin CI
on:
push:
branches: [main]
paths:
- 'botplugin/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botplugin
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -3,10 +3,10 @@ on:
push:
branches: [main]
paths:
- 'botserver/**'
- 'botlib/**'
- 'Cargo.lock'
- '.forgejo/workflows/botserver.yaml'
- 'botserver/**'
- 'botlib/**'
- 'Cargo.lock'
- '.forgejo/workflows/botserver.yaml'
env:
SCCACHE_DIR: /opt/gbo/work/.sccache
CARGO_TARGET_DIR: /opt/gbo/work/target
@ -16,22 +16,22 @@ jobs:
build:
runs-on: gbo
steps:
- name: Setup
run: |
cd /opt/gbo/work/generalbots
git reset --hard HEAD
git clean -fd
git pull
- name: Build
run: |
cd /opt/gbo/work/generalbots
cargo build -p botserver
- name: Deploy
run: |
timeout 5 bash -c 'while pgrep -x botserver > /dev/null; do pkill -x botserver; sleep 0.5; done' || true
mkdir -p /opt/gbo/bin
cp -f /opt/gbo/work/generalbots/target/debug/botserver /opt/gbo/bin/
chmod +x /opt/gbo/bin/botserver
cd /opt/gbo/bin && ./botserver --noconsole &
sleep 3
pgrep -x botserver && echo "BotServer Deployed" || echo "Failed"
- name: Setup
run: |
cd /opt/gbo/work/generalbots
git reset --hard HEAD
git clean -fd
git pull
- name: Build
run: |
cd /opt/gbo/work/generalbots
cargo build -p botserver --bin botserver
- name: Deploy
run: |
timeout 5 bash -c 'while pgrep -x botserver > /dev/null; do pkill -x botserver; sleep 0.5; done' || true
mkdir -p /opt/gbo/bin
cp -f /opt/gbo/work/generalbots/target/debug/botserver /opt/gbo/bin/
chmod +x /opt/gbo/bin/botserver
cd /opt/gbo/bin && RUST_LOG=info nohup ./botserver --noconsole > /opt/gbo/logs/stdout.log 2> /opt/gbo/logs/stderr.log &
sleep 5
pgrep -x botserver && echo "BotServer Deployed" || echo "Failed"

View file

@ -4,13 +4,24 @@ on:
branches: [main]
paths:
- 'bottest/**'
- 'botlib/**'
- '.forgejo/workflows/bottest.yaml'
env:
SCCACHE_DIR: /opt/gbo/work/.sccache
CARGO_TARGET_DIR: /opt/gbo/work/target
RUSTC_WRAPPER: sccache
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/bottest
git reset --hard HEAD && git clean -fd
git pull
cargo build
- name: Setup
run: |
cd /opt/gbo/work/generalbots
git reset --hard HEAD
git clean -fd
git pull
- name: Test
run: |
cd /opt/gbo/work/generalbots
cargo test -p bottest

View file

@ -5,16 +5,32 @@ on:
paths:
- 'botui/**'
- 'botlib/**'
- '.forgejo/workflows/botui.yaml'
env:
SCCACHE_DIR: /opt/gbo/work/.sccache
CARGO_TARGET_DIR: /opt/gbo/work/target
RUSTC_WRAPPER: sccache
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botui
git reset --hard HEAD && git clean -fd
git pull
cargo build
- name: Deploy
run: |
echo "BotUI deployed"
- name: Setup
run: |
cd /opt/gbo/work/generalbots
git reset --hard HEAD
git clean -fd
git pull
- name: Build
run: |
cd /opt/gbo/work/generalbots
cargo build -p botui --bin botui
- name: Deploy
run: |
timeout 5 bash -c 'while pgrep -x botui > /dev/null; do pkill -x botui; sleep 0.5; done' || true
mkdir -p /opt/gbo/bin
cp -f /opt/gbo/work/generalbots/target/debug/botui /opt/gbo/bin/
chmod +x /opt/gbo/bin/botui
cd /opt/gbo/bin && RUST_LOG=info nohup ./botui --noconsole >> /opt/gbo/logs/stdout.log 2>> /opt/gbo/logs/stderr.log &
sleep 3
pgrep -x botui && echo "BotUI Deployed" || echo "Failed"