generalbots/.forgejo/workflows/botserver-v2.yaml
Rodrigo Rodriguez (Pragmatismo) 79cd3a45d3
Some checks failed
BotServer CI/CD / build (push) Failing after 2m25s
Fix: Use Ubuntu container with shell (v13)
Changes:
- Use ubuntu:22.04 container image
- Install git, curl, ssh in container
- Install Rust via rustup
- Ensures sh/bash is available
- Self-contained build environment
2026-04-18 18:03:31 -03:00

60 lines
1.9 KiB
YAML

# HASH-BUSTER-20260418-CONTAINER-v13
# Uses container with full shell support
name: BotServer CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
SCCACHE_DIR: /opt/gbo/work/.sccache
CARGO_TARGET_DIR: /opt/gbo/work/target
jobs:
build:
runs-on: gbo
container:
image: ubuntu:22.04
steps:
- name: Install Dependencies
run: |
apt-get update
apt-get install -y git curl ssh ca-certificates
- name: Setup Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Clone Clean
run: |
echo "=== Clone Clean Workspace ==="
rm -rf /opt/gbo/work/build
mkdir -p /opt/gbo/work/build
cd /opt/gbo/work/build
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/gb.git workspace
cd workspace
echo "Initializing submodules..."
git config -f .gitmodules submodule.botserver.url https://alm.pragmatismo.com.br/GeneralBots/BotServer.git
git config -f .gitmodules submodule.botlib.url https://alm.pragmatismo.com.br/GeneralBots/botlib.git
git submodule update --init --depth 1 botserver
git submodule update --init --depth 1 botlib
echo "Preparing Cargo.toml..."
grep -v '"botapp\|"botdevice\|"bottest\|"botui\|"botbook\|"botmodels\|"botplugin\|"bottemplates"' Cargo.toml > Cargo.toml.clean || true
if [ -s Cargo.toml.clean ]; then
mv Cargo.toml.clean Cargo.toml
fi
- name: Build
run: |
echo "=== Build ==="
cd /opt/gbo/work/build/workspace
cargo build -p botserver
ls -lh target/debug/botserver
- name: Deploy
run: |
echo "=== Deploy ==="
echo "Deploy step placeholder"