diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-06-11 15:00:15 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-06-11 16:11:26 +0200 |
commit | 86a23f38abd902e767c1a89696ce98ee19df864c (patch) | |
tree | cf3f2ec89b46d771b4c980c1872d19c088762837 /.github | |
parent | 3d0a45d5dae3945919b48aedc005732bfae2fe3d (diff) | |
download | systemd-86a23f38abd902e767c1a89696ce98ee19df864c.tar.gz |
ci: tweak the dependency installation
Diffstat (limited to '.github')
-rwxr-xr-x | .github/workflows/ubuntu-build-check.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/.github/workflows/ubuntu-build-check.sh b/.github/workflows/ubuntu-build-check.sh index 4b9f689047..fb7c71ecb8 100755 --- a/.github/workflows/ubuntu-build-check.sh +++ b/.github/workflows/ubuntu-build-check.sh @@ -71,8 +71,7 @@ if [[ "$COMPILER" == clang ]]; then # Following snippet was borrowed from https://apt.llvm.org/llvm.sh 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" - apt-get -y update - apt-get -y install clang-$COMPILER_VERSION lldb-$COMPILER_VERSION lld-$COMPILER_VERSION clangd-$COMPILER_VERSION + PACKAGES+=(clang-$COMPILER_VERSION lldb-$COMPILER_VERSION lld-$COMPILER_VERSION clangd-$COMPILER_VERSION) elif [[ "$COMPILER" == gcc ]]; then CC="gcc-$COMPILER_VERSION" CXX="g++-$COMPILER_VERSION" @@ -80,19 +79,22 @@ elif [[ "$COMPILER" == gcc ]]; then # Latest gcc stack deb packages provided by # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - apt-get -y update - sudo apt-get -y install gcc-$COMPILER_VERSION + PACKAGES+=(gcc-$COMPILER_VERSION) else fatal "Unknown compiler: $COMPILER" fi # PPA with some newer build dependencies (like zstd) add-apt-repository -y ppa:upstream-systemd-ci/systemd-ci +apt-get -y update apt-get -y build-dep systemd apt-get -y install "${PACKAGES[@]}" -# Install latest meson and ninja form pip, since the distro versions don't -# support all the features we need (like --optimization=) -pip3 install meson ninja +# Install the latest meson and ninja form pip, since the distro versions don't +# support all the features we need (like --optimization=). Since the build-dep +# 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 @@ -104,6 +106,7 @@ for args in "${ARGS[@]}"; do fatal "meson failed with $args" fi + ninja --version if ! ninja -C build; then fatal "ninja failed with $args" fi |