Fix CI workflow to cache dependencies and preserve workspace between runs
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
This commit is contained in:
parent
843298ee54
commit
3a027e6619
1 changed files with 20 additions and 8 deletions
|
|
@ -16,17 +16,29 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Clean and setup
|
# Setup directories
|
||||||
rm -rf ~/workspace ~/gb-ws
|
mkdir -p ~/workspace ~/cache
|
||||||
mkdir -p ~/workspace/target
|
|
||||||
mkdir -p ~/cache
|
|
||||||
|
|
||||||
cd ~/workspace
|
cd ~/workspace
|
||||||
|
|
||||||
# Clone fresh
|
# Clone or update repos
|
||||||
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/botlib.git
|
if [ ! -d botlib ]; then
|
||||||
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/botlib.git
|
||||||
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/gb.git ~/gb-ws
|
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
|
# Setup Cargo.toml
|
||||||
cp ~/gb-ws/Cargo.toml ~/workspace/Cargo.toml
|
cp ~/gb-ws/Cargo.toml ~/workspace/Cargo.toml
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue