aboutsummaryrefslogtreecommitdiffstats
path: root/meson/ci/ciimage/arch
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/ci/ciimage/arch
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/ci/ciimage/arch')
-rw-r--r--meson/ci/ciimage/arch/image.json7
-rwxr-xr-xmeson/ci/ciimage/arch/install.sh54
2 files changed, 61 insertions, 0 deletions
diff --git a/meson/ci/ciimage/arch/image.json b/meson/ci/ciimage/arch/image.json
new file mode 100644
index 000000000..4a399d69e
--- /dev/null
+++ b/meson/ci/ciimage/arch/image.json
@@ -0,0 +1,7 @@
+{
+ "base_image": "archlinux:latest",
+ "env": {
+ "CI": "1",
+ "MESON_CI_JOBNAME": "linux-arch-gcc"
+ }
+}
diff --git a/meson/ci/ciimage/arch/install.sh b/meson/ci/ciimage/arch/install.sh
new file mode 100755
index 000000000..72816ab95
--- /dev/null
+++ b/meson/ci/ciimage/arch/install.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+set -e
+
+source /ci/common.sh
+
+# Inspired by https://github.com/greyltc/docker-archlinux-aur/blob/master/add-aur.sh
+
+pkgs=(
+ python python-pip
+ 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 wxgtk2 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
+ python-lxml hotdoc rust-bindgen qt6-base qt6-tools
+ # cuda
+)
+
+aur_pkgs=(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.zst',PKGEXT='.pkg.tar',g" /etc/makepkg.conf
+
+# Install packages
+pacman -Syu $PACMAN_OPTS "${pkgs[@]}"
+install_python_packages
+
+# 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"