IT'S YOUR TURN TRAVIS MUHAHAH

This commit is contained in:
Kreyren 2020-02-09 16:45:47 +00:00
parent 15051a2cf9
commit e986a637e8
6 changed files with 66 additions and 82 deletions

@ -46,10 +46,11 @@ matrix:
group: travis_latest
env:
DOCKER="ubuntu:eoan"
VARIANT="ubuntu"
VARIANT="ubuntu-19.10"
TOOL="compile"
COMPILER_C="gcc"
COMPILER_CXX="g++"
REPOSITORY="https://github.com/RXT0112/Zernit.git"
# Ubuntu 19.10 (Eoan Ermine) with Clang
- name: "Ubuntu 19.10 (Eoan Ermine) with Clang"
os: linux
@ -60,10 +61,11 @@ matrix:
group: travis_latest
env:
DOCKER="ubuntu:eoan"
VARIANT="ubuntu"
VARIANT="ubuntu-19.10"
TOOL="compile"
COMPILER_C="clang"
COMPILER_CXX="clang++"
REPOSITORY="https://github.com/RXT0112/Zernit.git"
# Debian Linux
# Debian Testing

@ -9,7 +9,7 @@
. "QA/travis-ci/travis-common.sh"
# shellcheck source=QA/travis-ci/get-container.sh
. "$(dirname "$0")/get-container.sh"
. "QA/travis-ci/get-container.sh"
fixme "Travis - before-install.sh disables SC1117 as hotfix"

@ -5,7 +5,7 @@
# Copyright (C) 2018-2019 by Thomas Dreibholz <dreibh@iem.uni-due.de> as GPLv3 or any other GPL at your option
# shellcheck source=QA/travis-ci/travis-common.sh
. "$(dirname "$0")/travis-common.sh"
. "QA/travis-ci/travis-common.sh"
if [ -n "$DOCKER" ]; then
@ -18,7 +18,8 @@ if [ -n "$DOCKER" ]; then
fi
# Get name of package
PACKAGE="Kreyrock"
fixme "Output package name based on repository name"
PACKAGE="Zernit"
# Set container name
CONTAINER=$(printf '%s\n' "$PACKAGE-$DOCKER-$TOOL" | sed -e "s/:/_/g")
@ -27,7 +28,9 @@ if [ -n "$DOCKER" ]; then
fi
export CONTAINER
else
elif [ -z "$DOCKER" ]; then
info "Docker is not used"
unset CONTAINER
else
die 256 "Unexpected happend while processing DOCKER variable"
fi

@ -6,10 +6,10 @@
# Copyright (C) 2018-2019 by Thomas Dreibholz <dreibh@iem.uni-due.de> as GPLv3 or any other GPL at your option
# shellcheck source=QA/travis-ci/travis-common.sh
. "$(dirname "$0")/travis-common.sh"
. "QA/travis-ci/travis-common.sh"
# shellcheck source=QA/travis-ci/get-container.sh
. "$(dirname "$0")/get-container.sh"
. "QA/travis-ci/get-container.sh"
fixme "Travis - install.sh is disabling SC1117 as hotfix"
@ -19,86 +19,59 @@ RETRY_MAXTRIALS=5
RETRY_PAUSE=60
# Linux as-is
if [ "$TRAVIS_OS_NAME" = linux ] && [ -z "$DOCKER" ] && [ -z "$QEMU" ] && [ "$VARIANT" = ubuntu ]; then
sudo apt update
if [ "$(apt-cache search libfuse3-dev | grep -o "libfuse3-dev")" = "libfuse3-dev" ]; then
# Fetch all dependencies
sudo apt-get install meson uthash-dev libcap-dev cppcheck libattr1-dev clang libfuse3-dev gcc git ninja-build bison libtool autoconf pkg-config libcap-dev indent fakeroot uthash-dev gzip rsync autopoint uthash-dev shellcheck -y
elif [ "$(apt-cache search libfuse3-dev | grep -o "libfuse3-dev")" = "libfuse3-dev" ]; then
sudo apt-get install meson uthash-dev libcap-dev cppcheck clang gcc git libattr1-dev ninja-build bison libtool autoconf pkg-config libcap-dev indent fakeroot uthash-dev gzip rsync autopoint shellcheck -y
# Travis is incompetent to provide usefull version of linux (https://travis-ci.community/t/more-virtual-environments/6213/7) so we have to fetch libfuse3-dev manually
warn "Travis-CI's ubuntu still doesn NOT offer 'libfuse3-dev', using hack to fetch it manually"
mkdir "$HOME/build/fuse3"
fixme "Export latest fuse3 instead of hard-coded in ci/before-install.sh"
wget https://github.com/libfuse/libfuse/releases/download/fuse-3.6.2/fuse-3.6.2.tar.xz -O "$HOME/build/fuse3/fuse-3.6.2.tar.xz"
tar xpf "$HOME/build/fuse3/fuse-3.6.2.tar.xz" --directory="$HOME/build/fuse3/"
mkdir "$HOME/build/fuse3/fuse-3.6.2/build"
fixme "Avoid using cd in ci/before-install.sh"
cd "$HOME/build/fuse3/fuse-3.6.2/build"|| die
meson .. --prefix /usr
ninja
sudo ninja install
if [ "$TRAVIS_OS_NAME" = linux ] && [ -z "$DOCKER" ] && [ -z "$QEMU" ]; then
# Update repositories based on available package manager
if command -v apt >/dev/null; then
sudo apt update || die 1 "Unable to update repositories on VARIANT '$VARIANT'"
elif command -v cave >/dev/null; then
cave sync || die 1 "Unable to update repositories on paludis"
else
die "Unexpected in install.sh configuring linux as-is"
die 256 "Unsupported package manager has been used"
fi
# Fetch shfmt (HACK!)
if [ "$(apt-cache search shfmt | grep -o "shfmt")" = "shfmt" ]; then
info "Installing shfmt"
apt install -y shfmt
# Install dependencies based on variant used
case "$VARIANT" in
ubuntu-19.10)
# Install dependencies
if [ -n "$PACKAGES" ]; then
sudo apt install -y "$PACKAGES" || die 1 "Unable to install following packages: '$PACKAGES'"
elif [ -z "$PACKAGES" ]; then
info "Dependencies are not specified in PACKAGES variable"
else
die 256 "Unexpected happend while processing PACKAGES variable"
fi
;;
*) die 2 "Unsupported variant '$VARIANT' has been parsed"
esac
elif [ "$(apt-cache search shfmt | grep -o "shfmt")" != "shfmt" ]; then
warn "Package shfmt is not available, using hack to fetch it manually.."
# Get shfmt
if [ -e /usr/bin/shfmt ]; then
warn "File /usr/bin/shfmt already exists! This is unexpected assuming that shfmt is already provided on linux as-is?"
elif [ ! -e /usr/bin/shfmt ]; then
sudo wget https://github.com/mvdan/sh/releases/download/v3.0.0-beta1/shfmt_v3.0.0-beta1_linux_amd64 -O /usr/bin/shfmt
[ ! -x /usr/bin/shfmt ] && sudo chmod +x /usr/bin/shfmt
else
die "Unexpected happend in /usr/bin/shfmt"
fi
else
die "Unexpected happend in feteching shfmt in linux as-is"
fi
# Do not clean repositories since docker images are not saved
# Linux via Docker
elif [ "$TRAVIS_OS_NAME" = linux ] && [ -n "$DOCKER" ] && [ -z "$QEMU" ]; then
# Apt-based
if [ "$VARIANT" = ubuntu ] || [ "$VARIANT" = debian ]; then
# QA: Why are these variables? Looks like perfect scenario for a function..
APT_UPDATE='env LANG=C.UTF-8 apt-get update -o Acquire::GzipIndexes=false'
APT_INSTALL="env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef --no-install-recommends"
# APT_UPGRADE="env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef --no-install-recommends"
# APT_ADD_REPOSITORY="env LANG=C.UTF-8 apt-add-repository -y"
fixme "Fix duplicates of repository update"
# Prepare container
info "Preparing container ..."
# Use uncompressed package lists. Necessary to work around
# "apt-show-version" problems due to usage of compressed lists in
# Docker containers:
# https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container
sudo docker exec "$CONTAINER" env LANG=C.UTF-8 sed -e "s#http://archive.ubuntu.com/ubuntu/#http://$UBUNTU_MIRROR/ubuntu/#g" -i /etc/apt/sources.list
fixme "Do not use bash in install.sh"
#sudo docker exec "$CONTAINER" bash -c "find /var/lib/apt/lists/ -maxdepth 1 -type f | xargs rm -f"
info "Updating docker's repositories for $VARIANT"
sudo docker exec "$CONTAINER" ci/travis-ci/retry.sh -t "$RETRY_MAXTRIALS" -p "$RETRY_PAUSE" -- "$APT_UPDATE"
case "$VARIANT" in
ubuntu-19.10)
# Update repositories
docker exec "$CONTAINER" apt update || die 1 "Unable to update repositories on '$VARIANT' using DOCKER '$DOCKER'"
info "Installing dependencies for $VARIANT"
sudo docker exec "$CONTAINER" ci/travis-ci/retry.sh -t "$RETRY_MAXTRIALS" -p "$RETRY_PAUSE" -- "$APT_INSTALL" build-essential meson cppcheck libcap-dev clang libfuse3-dev gcc git ninja-build bison libtool autoconf pkg-config libcap-dev indent fakeroot libattr1-dev uthash-dev gzip rsync autopoint uthash-dev shellcheck ca-certificates || die "Unable to install all required dependencies"
# Install dependencies
if [ -n "$PACKAGES" ]; then
docker exec "$CONTAINER" apt install -y "$PACKAGES" || die 1 "Unable to install following packages on '$CONTAINER': '$PACKAGES'"
elif [ -n "$PACKAGES" ]; then
true
else
die 256 "Resolving packages for '$CONTAINER'"
fi
;;
*) die 256 "Unsupported variant '$VARIANT' has been parsed in DOCKER '$DOCKER'"
esac
info "Fetching repository for $VARIANT"
sudo docker exec "$CONTAINER" git clone https://github.com/Kreyrock/Kreyrock.git
info "Fetching repository for $VARIANT"
sudo docker exec "$CONTAINER" git clone "$REPOSITORY" || die 1 "Unable to fetch '$REPOSITORY'"
# Exherbo
elif [ "$VARIANT" = exherbo ]; then

@ -3,18 +3,18 @@
# Distributed under the terms of the GNU General Public License v3 (https://www.gnu.org/licenses/gpl-3.0.en.html) or later
# shellcheck source=QA/travis-ci/travis-common.sh
. "$(dirname "$0")/travis-common.sh"
. "QA/travis-ci/travis-common.sh"
# shellcheck source=QA/travis-ci/get-container.sh
. "$(dirname "$0")/get-container.sh"
. "QA/travis-ci/get-container.sh"
# Linux as-is
if [ "$TRAVIS_OS_NAME" = linux ] && [ -z "$DOCKER" ] && [ -z "$QEMU" ]; then
make check
make check-rustlang
# Linux via Docker
elif [ "$TRAVIS_OS_NAME" = linux ] && [ -n "$DOCKER" ] && [ -z "$QEMU" ]; then
sudo docker exec "$CONTAINER" make --directory="/travis/Kreyrock" check
sudo docker exec "$CONTAINER" make --directory="/travis/Zernit" check-rustlang
# MacOS X
elif [ "$TRAVIS_OS_NAME" = osx ]; then

@ -1,3 +1,9 @@
Directory used for translations
files in this directory can be translated in different format on demand if development requires it.
files in this directory can be translated in different format on demand if development requires it.
### Abstract
This is expected to be crowd-sourced using Crowdin and alike
Expecting sourcing from various programming languages