1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 00:23:32 +02:00

CI: Install Conan using package manager

Before this change, the CI used `pip` to install Conan. This was not optimal.

Signed-off-by: Edgar <Edgar@AnotherFoxGuy.com>
This commit is contained in:
Edgar
2021-07-27 00:04:36 +02:00
committed by GitHub
parent 916def4061
commit 8a0502febd
2 changed files with 22 additions and 20 deletions

View File

@@ -6,11 +6,19 @@ set -euxo pipefail
if [[ "${OSTYPE}" == msys* ]]; then # Windows
# Python packages
pip_packages=(
conan
)
pip3 install "${pip_packages[@]}"
if which choco; then
# Chocolatey packages
choco_packages=(
sccache
conan
)
choco install "${choco_packages[@]}" -y
else
echo >&2 "$0: Error: You don't have a recognized package manager installed."
exit 1
fi
elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
@@ -41,24 +49,17 @@ else # Linux & others
libasound2-dev
libgtk2.0-dev
gettext
python3-pip
ccache
)
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends "${apt_packages[@]}"
# Download Conan from github
wget "https://github.com/conan-io/conan/releases/latest/download/conan-ubuntu-64.deb" -nv -O /tmp/conan.deb
sudo dpkg -i /tmp/conan.deb
else
echo >&2 "$0: Error: You don't have a recognized package manager installed."
exit 1
fi
# Python packages
pip_packages=(
conan
)
which cmake || pip_packages+=( cmake ) # get latest CMake when inside Docker image
pip3 install wheel setuptools # need these first to install other packages (e.g. conan)
pip3 install "${pip_packages[@]}"
fi