aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/os_comp.yml15
-rw-r--r--ci/ciimage/arch/Dockerfile4
-rwxr-xr-xci/ciimage/arch/install.sh48
-rw-r--r--ci/ciimage/eoan/Dockerfile (renamed from ciimage/Dockerfile)0
4 files changed, 65 insertions, 2 deletions
diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml
index 387b9c1..a4417a1 100644
--- a/.github/workflows/os_comp.yml
+++ b/.github/workflows/os_comp.yml
@@ -1,10 +1,10 @@
-name: OS Compatibility Tests
+name: OS Comp Tests
on: [push, pull_request]
jobs:
xenial:
- name: Ubuntu 16.04 (xenial)
+ name: Ubuntu 16.04
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v1
@@ -25,3 +25,14 @@ jobs:
env:
CI: '1'
XENIAL: '1'
+
+ arch:
+ name: Arch Linux
+ runs-on: ubuntu-latest
+ container: mensinda/arch:latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Run tests
+ run: ./run_tests.py
+ env:
+ CI: '1'
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/ciimage/Dockerfile b/ci/ciimage/eoan/Dockerfile
index a98662c..a98662c 100644
--- a/ciimage/Dockerfile
+++ b/ci/ciimage/eoan/Dockerfile