fix: CI system dependencies check before apt-get update
All checks were successful
BotServer CI/CD / build (push) Successful in 3m47s
All checks were successful
BotServer CI/CD / build (push) Successful in 3m47s
- Check if packages already installed with dpkg before running apt-get - Skip apt-get update/install if all dependencies present - Reduces CI time from ~30s to instant on subsequent runs
This commit is contained in:
parent
ba7f1ba5eb
commit
b47d928608
1 changed files with 11 additions and 2 deletions
|
|
@ -49,8 +49,17 @@ jobs:
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -qq
|
PKGS="libpq-dev libssl-dev liblzma-dev pkg-config"
|
||||||
sudo apt-get install -y libpq-dev libssl-dev liblzma-dev pkg-config
|
MISSING=""
|
||||||
|
for pkg in $PKGS; do
|
||||||
|
dpkg -s "$pkg" >/dev/null 2>&1 || MISSING="$MISSING $pkg"
|
||||||
|
done
|
||||||
|
if [ -n "$MISSING" ]; then
|
||||||
|
sudo apt-get update -qq -o Acquire::Retries=3 -o Acquire::http::Timeout=30
|
||||||
|
sudo apt-get install -y --no-install-recommends $MISSING
|
||||||
|
else
|
||||||
|
echo "All system dependencies already installed"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build BotServer
|
- name: Build BotServer
|
||||||
working-directory: /opt/gbo/ci/botserver
|
working-directory: /opt/gbo/ci/botserver
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue