summaryrefslogtreecommitdiff
path: root/travis-ci
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2020-06-11 13:29:01 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2020-06-11 14:17:40 +0200
commit4e1a13db899b89272bb4b6d6a51451cdfe2966d5 (patch)
tree412b200796326696c25f32615d7669d115436868 /travis-ci
parent0664249ffc788f672856ce1198b545afa3519388 (diff)
downloadsystemd-4e1a13db899b89272bb4b6d6a51451cdfe2966d5.tar.gz
ci: move the build check script to workflows directory
Diffstat (limited to 'travis-ci')
-rwxr-xr-xtravis-ci/managers/ubuntu-build-check.sh114
1 files changed, 0 insertions, 114 deletions
diff --git a/travis-ci/managers/ubuntu-build-check.sh b/travis-ci/managers/ubuntu-build-check.sh
deleted file mode 100755
index a2fade9de3..0000000000
--- a/travis-ci/managers/ubuntu-build-check.sh
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/bin/bash
-
-set -ex
-
-info() { echo -e "\033[33;1m$1\033[0m"; }
-fatal() { echo >&2 -e "\033[31;1m$1\033[0m"; exit 1; }
-success() { echo >&2 -e "\033[32;1m$1\033[0m"; }
-
-ARGS=(
- "--optimization=0"
- "--optimization=2"
- "--optimization=3"
- "--optimization=s"
- "-Db_lto=true"
- "-Db_ndebug=true"
-)
-PACKAGES=(
- cryptsetup-bin
- expect
- fdisk
- gettext
- iptables-dev
- iputils-ping
- isc-dhcp-client
- itstool
- kbd
- libblkid-dev
- libcap-dev
- libcurl4-gnutls-dev
- libfdisk-dev
- libgpg-error-dev
- liblz4-dev
- liblzma-dev
- libmicrohttpd-dev
- libmount-dev
- libp11-kit-dev
- libpwquality-dev
- libqrencode-dev
- libssl-dev
- libxkbcommon-dev
- libzstd-dev
- mount
- net-tools
- perl
- python-lxml
- python3-evdev
- python3-lxml
- python3-pip
- python3-pyparsing
- python3-setuptools
- quota
- strace
- unifont
- util-linux
- zstd
-)
-COMPILER="${COMPILER:?}"
-COMPILER_VERSION="${COMPILER_VERSION:?}"
-RELEASE="$(lsb_release -cs)"
-
-bash -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ $RELEASE main restricted universe multiverse' >>/etc/apt/sources.list"
-
-# Note: As we use postfixed clang/gcc binaries, we need to override $AR
-# as well, otherwise meson falls back to ar from binutils which
-# doesn't work with LTO
-if [[ "$COMPILER" == clang ]]; then
- CC="clang-$COMPILER_VERSION"
- CXX="clang++-$COMPILER_VERSION"
- AR="llvm-ar-$COMPILER_VERSION"
- # Latest LLVM stack deb packages provided by https://apt.llvm.org/
- # 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
-elif [[ "$COMPILER" == gcc ]]; then
- CC="gcc-$COMPILER_VERSION"
- CXX="g++-$COMPILER_VERSION"
- AR="gcc-ar-$COMPILER_VERSION"
- # 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
-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 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
-
-$CC --version
-
-for args in "${ARGS[@]}"; do
- SECONDS=0
-
- info "Checking build with $args"
- if ! AR="$AR" CC="$CC" CXX="$CXX" meson --werror $args build; then
- fatal "meson failed with $args"
- fi
-
- if ! ninja -C build; then
- fatal "ninja failed with $args"
- fi
-
- git clean -dxf
-
- success "Build with $args passed in $SECONDS seconds"
-done