Fix CI workflow to cache dependencies and preserve workspace between runs
Some checks failed
BotServer CI/CD / build (push) Has been cancelled

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-17 19:45:18 -03:00
parent 843298ee54
commit 3a027e6619

View file

@ -16,17 +16,29 @@ jobs:
run: |
set -e
# Clean and setup
rm -rf ~/workspace ~/gb-ws
mkdir -p ~/workspace/target
mkdir -p ~/cache
# Setup directories
mkdir -p ~/workspace ~/cache
cd ~/workspace
# Clone fresh
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/botlib.git
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/BotServer.git botserver
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/gb.git ~/gb-ws
# Clone or update repos
if [ ! -d botlib ]; then
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/botlib.git
else
cd botlib && git pull && cd ..
fi
if [ ! -d botserver ]; then
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/BotServer.git botserver
else
cd botserver && git pull && cd ..
fi
if [ ! -d ~/gb-ws ]; then
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/gb.git ~/gb-ws
else
cd ~/gb-ws && git pull && cd ~/workspace
fi
# Setup Cargo.toml
cp ~/gb-ws/Cargo.toml ~/workspace/Cargo.toml