Skip to content

Commit

Permalink
Streamline gtest dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilos committed Jul 21, 2023
1 parent e5e812a commit 98decef
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions ci/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ debian_build_gtest() {
centos_build_inih() {
[-d inih_build ] || git clone https://github.com/benhoyt/inih.git inih_build
cd inih_build
git checkout r56
git checkout r57
meson --buildtype=plain builddir
meson compile -C builddir
meson install -C builddir
Expand All @@ -41,13 +41,13 @@ distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g')

case "$distro_id" in
'fedora')
dnf -y --refresh install gcc-c++ clang cmake make expat-devel zlib-devel brotli-devel libssh-devel libcurl-devel gtest-devel which dos2unix glibc-langpack-en diffutils inih-devel
dnf -y --refresh install gcc-c++ clang cmake make expat-devel zlib-devel brotli-devel libssh-devel libcurl-devel gmock-devel which dos2unix glibc-langpack-en diffutils inih-devel
;;

'debian')
apt-get update
apt-get install -y cmake g++ clang make libexpat1-dev zlib1g-dev libbrotli-dev libssh-dev libcurl4-openssl-dev libgtest-dev libxml2-utils libinih-dev
debian_build_gtest
apt-get install -y cmake g++ clang make libexpat1-dev zlib1g-dev libbrotli-dev libssh-dev libcurl4-openssl-dev libgmock-dev libxml2-utils libinih-dev
# debian_build_gtest
;;

'arch')
Expand All @@ -57,8 +57,8 @@ case "$distro_id" in

'ubuntu')
apt-get update
apt-get install -y cmake g++ clang make libexpat1-dev zlib1g-dev libbrotli-dev libssh-dev libcurl4-openssl-dev libgtest-dev google-mock libxml2-utils libinih-dev
debian_build_gtest
apt-get install -y cmake g++ clang make libexpat1-dev zlib1g-dev libbrotli-dev libssh-dev libcurl4-openssl-dev libgmock-dev libxml2-utils libinih-dev
# debian_build_gtest
;;

'alpine')
Expand All @@ -80,15 +80,7 @@ case "$distro_id" in

'opensuse-tumbleweed')
zypper --non-interactive refresh
zypper --non-interactive install gcc-c++ clang cmake make libexpat-devel zlib-devel libbrotli-devel libssh-devel curl libcurl-devel git which dos2unix libxml2-tools libinih-devel
pushd /tmp
curl -LO https://github.com/google/googletest/archive/release-1.8.0.tar.gz
tar xzf release-1.8.0.tar.gz
mkdir -p googletest-release-1.8.0/build
pushd googletest-release-1.8.0/build
cmake .. ; make ; make install
popd
popd
zypper --non-interactive install gcc-c++ clang cmake make libexpat-devel zlib-devel libbrotli-devel libssh-devel libcurl-devel gmock which dos2unix libxml2-tools libinih-devel
;;
*)
echo "Sorry, no predefined dependencies for your distribution $distro_id exist yet"
Expand Down

0 comments on commit 98decef

Please sign in to comment.