CI: v16 - Verified on runner, all 3 projects build
- Tested on alm-ci runner at /opt/gbo/work/botserver - All submodules initialize correctly - botserver, botui, botlib all compile successfully - Removed problematic .github submodule - Pre-installed on runner: Rust 1.95, Node 22, Python 3.11, sccache 0.7
This commit is contained in:
parent
fc9c4b7bdf
commit
39d907c323
1 changed files with 13 additions and 15 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# HASH-BUSTER-20260418-CONTAINER-v15
|
||||
# Dev machine approach: work folder is /opt/gbo/work/
|
||||
# Pre-installed: Rust, Node, Python, sccache on runner
|
||||
# HASH-BUSTER-20260418-CONTAINER-v16
|
||||
# Dev machine approach: /opt/gbo/work/botserver
|
||||
# Pre-installed globally: Rust, Node.js, Python, sccache
|
||||
name: BotServer CI/CD
|
||||
|
||||
on:
|
||||
|
|
@ -13,6 +13,7 @@ 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:
|
||||
|
|
@ -21,21 +22,19 @@ jobs:
|
|||
- name: Pull Latest
|
||||
run: |
|
||||
echo "=== Pull Latest ==="
|
||||
cd /opt/gbo/work
|
||||
if [ ! -d "gb" ]; then
|
||||
git clone https://alm.pragmatismo.com.br/GeneralBots/gb.git
|
||||
fi
|
||||
cd /opt/gbo/work/gb
|
||||
git pull --rebase
|
||||
cd /opt/gbo/work/gb/botserver
|
||||
git pull --rebase
|
||||
cd /opt/gbo/work/gb/botlib
|
||||
cd /opt/gbo/work/botserver
|
||||
git pull --rebase
|
||||
# Remove .github submodule (causes auth issues)
|
||||
rm -rf .github
|
||||
grep -v "github" .gitmodules > .gitmodules.tmp || true
|
||||
mv .gitmodules.tmp .gitmodules
|
||||
# Initialize all submodules
|
||||
git submodule update --init --recursive
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "=== Build ==="
|
||||
cd /opt/gbo/work/gb
|
||||
cd /opt/gbo/work/botserver
|
||||
cargo build -p botserver
|
||||
cargo build -p botui
|
||||
cargo build -p botlib
|
||||
|
|
@ -45,10 +44,9 @@ jobs:
|
|||
- name: Deploy
|
||||
run: |
|
||||
echo "=== Deploy ==="
|
||||
BINARY="/opt/gbo/work/gb/target/debug/botserver"
|
||||
BINARY="/opt/gbo/work/botserver/target/debug/botserver"
|
||||
if [ -f "$BINARY" ]; then
|
||||
echo "Binary exists: $BINARY"
|
||||
# Copy to system container
|
||||
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 system@localhost \
|
||||
"bash -c 'cd /opt/gbo/bin && pkill -f botserver || true; sleep 2'"
|
||||
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 system@localhost \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue