ci: tweak the dependency installation
This commit is contained in:
parent
3d0a45d5da
commit
86a23f38ab
|
@ -71,8 +71,7 @@ if [[ "$COMPILER" == clang ]]; then
|
||||||
# Following snippet was borrowed from https://apt.llvm.org/llvm.sh
|
# Following snippet was borrowed from https://apt.llvm.org/llvm.sh
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||||
add-apt-repository -y "deb http://apt.llvm.org/$RELEASE/ llvm-toolchain-$RELEASE-$COMPILER_VERSION main"
|
add-apt-repository -y "deb http://apt.llvm.org/$RELEASE/ llvm-toolchain-$RELEASE-$COMPILER_VERSION main"
|
||||||
apt-get -y update
|
PACKAGES+=(clang-$COMPILER_VERSION lldb-$COMPILER_VERSION lld-$COMPILER_VERSION clangd-$COMPILER_VERSION)
|
||||||
apt-get -y install clang-$COMPILER_VERSION lldb-$COMPILER_VERSION lld-$COMPILER_VERSION clangd-$COMPILER_VERSION
|
|
||||||
elif [[ "$COMPILER" == gcc ]]; then
|
elif [[ "$COMPILER" == gcc ]]; then
|
||||||
CC="gcc-$COMPILER_VERSION"
|
CC="gcc-$COMPILER_VERSION"
|
||||||
CXX="g++-$COMPILER_VERSION"
|
CXX="g++-$COMPILER_VERSION"
|
||||||
|
@ -80,19 +79,22 @@ elif [[ "$COMPILER" == gcc ]]; then
|
||||||
# Latest gcc stack deb packages provided by
|
# Latest gcc stack deb packages provided by
|
||||||
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
|
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
|
||||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||||
apt-get -y update
|
PACKAGES+=(gcc-$COMPILER_VERSION)
|
||||||
sudo apt-get -y install gcc-$COMPILER_VERSION
|
|
||||||
else
|
else
|
||||||
fatal "Unknown compiler: $COMPILER"
|
fatal "Unknown compiler: $COMPILER"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# PPA with some newer build dependencies (like zstd)
|
# PPA with some newer build dependencies (like zstd)
|
||||||
add-apt-repository -y ppa:upstream-systemd-ci/systemd-ci
|
add-apt-repository -y ppa:upstream-systemd-ci/systemd-ci
|
||||||
|
apt-get -y update
|
||||||
apt-get -y build-dep systemd
|
apt-get -y build-dep systemd
|
||||||
apt-get -y install "${PACKAGES[@]}"
|
apt-get -y install "${PACKAGES[@]}"
|
||||||
# Install latest meson and ninja form pip, since the distro versions don't
|
# Install the latest meson and ninja form pip, since the distro versions don't
|
||||||
# support all the features we need (like --optimization=)
|
# support all the features we need (like --optimization=). Since the build-dep
|
||||||
pip3 install meson ninja
|
# command above installs the distro versions, let's install the pip ones just
|
||||||
|
# locally and add the local bin directory to the $PATH.
|
||||||
|
pip3 install --user -U meson ninja
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
$CC --version
|
$CC --version
|
||||||
|
|
||||||
|
@ -104,6 +106,7 @@ for args in "${ARGS[@]}"; do
|
||||||
fatal "meson failed with $args"
|
fatal "meson failed with $args"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ninja --version
|
||||||
if ! ninja -C build; then
|
if ! ninja -C build; then
|
||||||
fatal "ninja failed with $args"
|
fatal "ninja failed with $args"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue