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
|
# HASH-BUSTER-20260418-CONTAINER-v16
|
||||||
# Dev machine approach: work folder is /opt/gbo/work/
|
# Dev machine approach: /opt/gbo/work/botserver
|
||||||
# Pre-installed: Rust, Node, Python, sccache on runner
|
# Pre-installed globally: Rust, Node.js, Python, sccache
|
||||||
name: BotServer CI/CD
|
name: BotServer CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|
@ -13,6 +13,7 @@ env:
|
||||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
SCCACHE_DIR: /opt/gbo/work/.sccache
|
||||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
CARGO_TARGET_DIR: /opt/gbo/work/target
|
||||||
RUSTC_WRAPPER: sccache
|
RUSTC_WRAPPER: sccache
|
||||||
|
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -21,21 +22,19 @@ jobs:
|
||||||
- name: Pull Latest
|
- name: Pull Latest
|
||||||
run: |
|
run: |
|
||||||
echo "=== Pull Latest ==="
|
echo "=== Pull Latest ==="
|
||||||
cd /opt/gbo/work
|
cd /opt/gbo/work/botserver
|
||||||
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
|
|
||||||
git pull --rebase
|
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
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
echo "=== Build ==="
|
echo "=== Build ==="
|
||||||
cd /opt/gbo/work/gb
|
cd /opt/gbo/work/botserver
|
||||||
cargo build -p botserver
|
cargo build -p botserver
|
||||||
cargo build -p botui
|
cargo build -p botui
|
||||||
cargo build -p botlib
|
cargo build -p botlib
|
||||||
|
|
@ -45,10 +44,9 @@ jobs:
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
echo "=== Deploy ==="
|
echo "=== Deploy ==="
|
||||||
BINARY="/opt/gbo/work/gb/target/debug/botserver"
|
BINARY="/opt/gbo/work/botserver/target/debug/botserver"
|
||||||
if [ -f "$BINARY" ]; then
|
if [ -f "$BINARY" ]; then
|
||||||
echo "Binary exists: $BINARY"
|
echo "Binary exists: $BINARY"
|
||||||
# Copy to system container
|
|
||||||
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 system@localhost \
|
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 system@localhost \
|
||||||
"bash -c 'cd /opt/gbo/bin && pkill -f botserver || true; sleep 2'"
|
"bash -c 'cd /opt/gbo/bin && pkill -f botserver || true; sleep 2'"
|
||||||
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 system@localhost \
|
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 system@localhost \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue