From 2634521d9e9a10b74613162a506f3f383624a75b Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Fri, 10 Apr 2026 11:38:13 -0300 Subject: [PATCH] Optimize CI Setup Workspace - avoid full codebase download - Remove gb-ws clone (unnecessary intermediate step) - Use --depth 1 for shallow clones (only latest commit) - Create minimal Cargo.toml directly (only botlib + botserver members) - Use git pull --ff-only for updates (no full history) - Significantly reduces CI time and disk usage - Maintains single-pull strategy --- .forgejo/workflows/botserver.yaml | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.forgejo/workflows/botserver.yaml b/.forgejo/workflows/botserver.yaml index f75e1400..ddcbf7be 100644 --- a/.forgejo/workflows/botserver.yaml +++ b/.forgejo/workflows/botserver.yaml @@ -28,30 +28,30 @@ jobs: run: | mkdir -p $WORKSPACE cd $WORKSPACE - - # Clone or update repos + + # Create minimal Cargo.toml for building botserver only + cat > Cargo.toml << 'EOF' +[workspace] +members = ["botlib", "botserver"] + +[workspace.dependencies] +# Empty - all deps defined in member crates +EOF + + # Clone or update botlib if [ -d botlib/.git ]; then git -C botlib pull --ff-only origin main else - git clone --branch main https://alm.pragmatismo.com.br/GeneralBots/botlib.git botlib + git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/botlib.git botlib fi - + + # Clone or update botserver if [ -d botserver/.git ]; then git -C botserver pull --ff-only origin main else - git clone --branch main https://alm.pragmatismo.com.br/GeneralBots/BotServer.git botserver + git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/BotServer.git botserver fi - - if [ -d /opt/gbo/data/gb-ws/.git ]; then - git -C /opt/gbo/data/gb-ws pull --ff-only origin main - else - git clone --branch main https://alm.pragmatismo.com.br/GeneralBots/gb.git /opt/gbo/data/gb-ws - fi - - cp /opt/gbo/data/gb-ws/Cargo.toml Cargo.toml - for m in botapp botdevice bottest botui botbook botmodels botplugin bottemplates; do - grep -v "\"$m\"" Cargo.toml > /tmp/c.toml && mv /tmp/c.toml Cargo.toml - done + mkdir -p /opt/gbo/data/botserver/target - name: Cache sccache