ci: Forçar refresh do workflow (v2) e remover erros de sintaxe
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 1s
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 1s
- Renomeado para 'BotServer CI/CD v2' - Estrutura totalmente reescrita - Removido blocos if/else quebrados - Adicionado variáveis de ambiente para cache isolado
This commit is contained in:
parent
6c84840739
commit
f388e5b380
1 changed files with 24 additions and 22 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
name: BotServer CI/CD
|
# NOVO WORKFLOW - Forçar refresh do cache
|
||||||
|
name: BotServer CI/CD v2
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -6,32 +7,33 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
SCCACHE_DIR: /opt/gbo/work/botserver/.sccache
|
||||||
|
CARGO_TARGET_DIR: /opt/gbo/work/botserver/target
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: gbo:host
|
runs-on: gbo
|
||||||
steps:
|
steps:
|
||||||
- name: Pull and Build (Debug)
|
- name: Setup Isolado
|
||||||
run: |
|
run: |
|
||||||
echo "=== Iniciando Pull and Build (Debug Rápido) ==="
|
echo "=== Setup Inicial ==="
|
||||||
|
mkdir -p $SCCACHE_DIR
|
||||||
|
mkdir -p $CARGO_TARGET_DIR
|
||||||
|
pkill -9 sccache || true
|
||||||
|
echo "Setup concluído."
|
||||||
|
|
||||||
# 1. Navegar para o diretório fixo
|
- name: Pull Sources
|
||||||
|
run: |
|
||||||
|
echo "=== Atualizando Código ==="
|
||||||
cd /opt/gbo/work/botserver/src
|
cd /opt/gbo/work/botserver/src
|
||||||
|
|
||||||
# 2. Atualizar o código
|
|
||||||
git pull origin main
|
git pull origin main
|
||||||
|
|
||||||
# 3. Atualizar submódulo botlib
|
|
||||||
cd ../botlib && git pull && cd ..
|
cd ../botlib && git pull && cd ..
|
||||||
|
echo "Código atualizado."
|
||||||
|
|
||||||
# 4. Preparar Cargo.toml (limpar workspace members indesejados)
|
- name: Build Debug
|
||||||
# Isso garante que apenas botserver e botlib sejam compilados
|
run: |
|
||||||
cp Cargo.toml Cargo.toml.bak
|
echo "=== Compilando (Debug) ==="
|
||||||
grep -v '"botapp\|"botdevice\|"bottest\|"botui\|"botbook\|"botmodels\|"botplugin\|"bottemplates"' Cargo.toml > Cargo.toml.tmp
|
cd /opt/gbo/work/botserver/src
|
||||||
mv Cargo.toml.tmp Cargo.toml
|
|
||||||
|
|
||||||
# 5. BUILD RÁPIDO (Debug mode - sem otimizações, compila mais rápido)
|
|
||||||
cargo build
|
cargo build
|
||||||
|
echo "Build finalizado."
|
||||||
# O binário estará em: target/debug/botserver
|
|
||||||
|
|
||||||
echo "=== Build Debug Concluído ==="
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue