diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-01-24 18:00:26 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-01-29 23:59:23 +0200 |
commit | 71baca7abe4dc3f6e11cf6147cf9841820244858 (patch) | |
tree | 54ea1b15b5b61ce42610b79fa7b83734614cfb2d /ci/ciimage | |
parent | 95de289d0dbbb37ae7451723060a6cacc936f039 (diff) | |
download | meson-71baca7abe4dc3f6e11cf6147cf9841820244858.zip meson-71baca7abe4dc3f6e11cf6147cf9841820244858.tar.gz meson-71baca7abe4dc3f6e11cf6147cf9841820244858.tar.bz2 |
ci: Add Arch Linux OS test
Diffstat (limited to 'ci/ciimage')
-rw-r--r-- | ci/ciimage/arch/Dockerfile | 4 | ||||
-rwxr-xr-x | ci/ciimage/arch/install.sh | 48 | ||||
-rw-r--r-- | ci/ciimage/eoan/Dockerfile | 36 |
3 files changed, 88 insertions, 0 deletions
diff --git a/ci/ciimage/arch/Dockerfile b/ci/ciimage/arch/Dockerfile new file mode 100644 index 0000000..b8a36cd --- /dev/null +++ b/ci/ciimage/arch/Dockerfile @@ -0,0 +1,4 @@ +FROM archlinux:latest + +ADD install.sh /usr/sbin/docker-arch-install +RUN docker-arch-install diff --git a/ci/ciimage/arch/install.sh b/ci/ciimage/arch/install.sh new file mode 100755 index 0000000..f7f0f6d --- /dev/null +++ b/ci/ciimage/arch/install.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Inspired by https://github.com/greyltc/docker-archlinux-aur/blob/master/add-aur.sh + +pkgs=( + python python-setuptools python-wheel python-pip python-pytest-xdist python-gobject + ninja make git sudo fakeroot autoconf automake patch + libelf gcc gcc-fortran gcc-objc vala rust bison flex cython go dlang-dmd + mono boost qt5-base gtkmm3 gtest gmock protobuf wxgtk gobject-introspection + itstool gtk3 java-environment=8 gtk-doc llvm clang sdl2 graphviz + doxygen vulkan-validation-layers openssh mercurial gtk-sharp-2 qt5-tools + libwmf valgrind cmake netcdf-fortran openmpi nasm gnustep-base gettext + # cuda +) + +aur_pkgs=(hotdoc scalapack) +cleanup_pkgs=(go) + +AUR_USER=docker +PACMAN_OPTS='--needed --noprogressbar --noconfirm' + +# Patch config files +sed -i 's/#Color/Color/g' /etc/pacman.conf +sed -i 's,#MAKEFLAGS="-j2",MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf +sed -i "s,PKGEXT='.pkg.tar.xz',PKGEXT='.pkg.tar',g" /etc/makepkg.conf + +# Install packages +pacman -Syu $PACMAN_OPTS "${pkgs[@]}" + +# Setup the user +useradd -m $AUR_USER +echo "${AUR_USER}:" | chpasswd -e +echo "$AUR_USER ALL = NOPASSWD: ALL" >> /etc/sudoers + +# Install yay +su $AUR_USER -c 'cd; git clone https://aur.archlinux.org/yay.git' +su $AUR_USER -c 'cd; cd yay; makepkg' +pushd /home/$AUR_USER/yay/ +pacman -U *.pkg.tar --noprogressbar --noconfirm +popd +rm -rf /home/$AUR_USER/yay + +# Install yay deps +su $AUR_USER -c "yay -S $PACMAN_OPTS ${aur_pkgs[*]}" + +# cleanup +pacman -Rs --noconfirm "${cleanup_pkgs[@]}" +su $AUR_USER -c "yes | yay -Scc" diff --git a/ci/ciimage/eoan/Dockerfile b/ci/ciimage/eoan/Dockerfile new file mode 100644 index 0000000..a98662c --- /dev/null +++ b/ci/ciimage/eoan/Dockerfile @@ -0,0 +1,36 @@ +FROM ubuntu:eoan + +ENV DEBIAN_FRONTEND noninteractive +ENV LANG='C.UTF-8' +ENV DC=gdc + +RUN sed -i '/^#\sdeb-src /s/^#//' "/etc/apt/sources.list" \ +&& apt-get -y update && apt-get -y upgrade \ +&& apt-get -y install eatmydata \ +&& eatmydata apt-get -y build-dep meson \ +&& eatmydata apt-get -y install python3-pytest-xdist \ +&& eatmydata apt-get -y install python3-pip libxml2-dev libxslt1-dev libyaml-dev libjson-glib-dev \ +&& eatmydata python3 -m pip install hotdoc codecov \ +&& eatmydata apt-get -y install wget unzip \ +&& eatmydata apt-get -y install qt5-default clang \ +&& eatmydata apt-get -y install pkg-config-arm-linux-gnueabihf \ +&& eatmydata apt-get -y install qt4-linguist-tools \ +&& eatmydata apt-get -y install python-dev \ +&& eatmydata apt-get -y install libomp-dev \ +&& eatmydata apt-get -y install dub ldc \ +&& eatmydata apt-get -y install mingw-w64 mingw-w64-tools nim \ +&& eatmydata apt-get -y install --no-install-recommends wine-stable \ +&& eatmydata apt-get -y install libclang-dev \ +&& eatmydata apt-get -y install libgcrypt20-dev \ +&& eatmydata apt-get -y install libgpgme-dev \ +&& eatmydata apt-get -y install libhdf5-dev \ +&& eatmydata apt-get -y install libboost-python-dev \ +&& eatmydata apt-get -y install libblocksruntime-dev \ +&& eatmydata apt-get -y install libperl-dev \ +&& eatmydata apt-get -y install liblapack-dev libscalapack-mpi-dev \ +&& eatmydata dub fetch urld && dub build urld --compiler=gdc \ +&& eatmydata dub fetch dubtestproject \ +&& eatmydata dub build dubtestproject:test1 --compiler=ldc2 \ +&& eatmydata dub build dubtestproject:test2 --compiler=ldc2 +# OpenSSH client is needed to run openmpi binaries. + |