summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/images.yml1
-rw-r--r--.github/workflows/os_comp.yml1
-rwxr-xr-xci/ciimage/build.py4
-rw-r--r--ci/ciimage/gentoo/image.json8
-rwxr-xr-xci/ciimage/gentoo/install.sh151
-rw-r--r--test cases/frameworks/15 llvm/test.json2
-rw-r--r--test cases/frameworks/25 hdf5/test.json2
7 files changed, 167 insertions, 2 deletions
diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml
index dd4fe9ac4..c43a1cf62 100644
--- a/.github/workflows/images.yml
+++ b/.github/workflows/images.yml
@@ -41,6 +41,7 @@ jobs:
- { name: Arch Linux, id: arch }
- { name: CUDA (on Arch), id: cuda }
- { name: Fedora, id: fedora }
+ - { name: Gentoo, id: gentoo }
- { name: OpenSUSE, id: opensuse }
- { name: Ubuntu Bionic, id: bionic }
- { name: Ubuntu Rolling, id: ubuntu-rolling }
diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml
index 298963db1..e9f5b7a1c 100644
--- a/.github/workflows/os_comp.yml
+++ b/.github/workflows/os_comp.yml
@@ -40,6 +40,7 @@ jobs:
- { name: Arch Linux, id: arch }
- { name: CUDA (on Arch), id: cuda }
- { name: Fedora, id: fedora }
+ - { name: Gentoo, id: gentoo }
- { name: OpenSUSE, id: opensuse }
- { name: Ubuntu Bionic, id: bionic }
container: mesonbuild/${{ matrix.cfg.id }}:latest
diff --git a/ci/ciimage/build.py b/ci/ciimage/build.py
index b9d318158..10fd09905 100755
--- a/ci/ciimage/build.py
+++ b/ci/ciimage/build.py
@@ -78,6 +78,10 @@ class Builder(BuilderBase):
if [ -f "$HOME/.cargo/env" ]; then
source "$HOME/.cargo/env"
fi
+
+ if [ -f /etc/profile.env ]; then
+ source /etc/profile.env
+ fi
'''
out_file.write_text(out_data, encoding='utf-8')
diff --git a/ci/ciimage/gentoo/image.json b/ci/ciimage/gentoo/image.json
new file mode 100644
index 000000000..e59eee5ee
--- /dev/null
+++ b/ci/ciimage/gentoo/image.json
@@ -0,0 +1,8 @@
+{
+ "base_image": "gentoo/stage3:desktop",
+ "env": {
+ "CI": "1",
+ "MESON_CI_JOBNAME": "linux-gentoo-gcc",
+ "SKIP_STATIC_BOOST": "1"
+ }
+}
diff --git a/ci/ciimage/gentoo/install.sh b/ci/ciimage/gentoo/install.sh
new file mode 100755
index 000000000..dc6383c14
--- /dev/null
+++ b/ci/ciimage/gentoo/install.sh
@@ -0,0 +1,151 @@
+#!/bin/bash
+set -e
+
+source /ci/common.sh
+
+# We divide the package list into 'pkgs_stable' and 'pkgs_latest'. The trade-off
+# is that latest stuff may not have a binpkg available, but of course we get
+# better test coverage with the bleeding edge then.
+pkgs_stable=(
+ app-portage/portage-utils
+ dev-build/cmake
+ dev-vcs/git
+
+ # language support
+ dev-python/cython
+ dev-python/lxml
+ dev-python/pip
+ virtual/fortran
+ dev-lang/nasm
+ dev-lang/vala
+ dev-lang/python:2.7
+ dev-java/openjdk-bin
+ # requires rustfmt, bin rebuild (TODO: file bug)
+ #dev-util/bindgen
+
+ dev-libs/elfutils
+ dev-libs/gobject-introspection
+ dev-util/itstool
+ dev-libs/protobuf
+
+ # custom deps
+ net-libs/libpcap
+ dev-util/gtk-doc
+ media-libs/libwmf
+ sys-cluster/openmpi
+ sci-libs/netcdf
+ media-libs/libsdl2
+ dev-cpp/gtest
+ sci-libs/hdf5
+ dev-qt/linguist-tools
+ sys-devel/llvm
+ # qt6 unstable
+ #dev-qt/qttools
+
+ # misc
+ app-admin/sudo
+ app-text/doxygen
+ sys-apps/fakeroot
+ sys-devel/bison
+ sys-devel/gettext
+
+ # TODO: vulkan-validation-layers
+ # TODO: cuda
+ #dev-cpp/gtkmm:3.0
+ #dev-java/openjdk-bin:8
+ #dev-lang/go
+ #dev-lang/mono
+ #dev-lang/python
+ #dev-lang/rust-bin
+ #dev-libs/wayland
+ #dev-libs/wayland-protocols
+ #dev-python/pypy3
+ #dev-qt/qtbase:6
+ #dev-qt/qtcore:5
+ #dev-qt/qttools:6
+ #dev-vcs/mercurial
+ #gnustep-base/gnustep-base
+ #media-gfx/graphviz
+ #sci-libs/netcdf-fortran
+ #sys-devel/clang
+ #x11-libs/gtk+:3
+)
+pkgs_latest=(
+ # ~arch boost needed for py3.12 for now (needs 1.84)
+ dev-build/b2
+ dev-libs/boost
+
+ dev-build/autoconf
+ dev-build/automake
+
+ # ~arch only
+ sci-libs/scalapack
+)
+pkgs=( "${pkgs_stable[@]}" "${pkgs_latest[@]}" )
+
+emerge-webrsync --quiet
+
+# This means we can't really take advantage of the binhost but a lot of the
+# advantages of using Gentoo in CI come from the bleeding edge side.
+# With full ~arch, we don't get binpkgs for much at all. Instead, let's just
+# do ~arch for the test deps we have.
+#echo 'ACCEPT_KEYWORDS="~amd64"' >> /etc/portage/make.conf
+
+printf "%s\n" ${pkgs[@]} >> /var/lib/portage/world
+printf "%s\n" ${pkgs_latest[@]} >> /etc/portage/package.accept_keywords/meson
+cat /etc/portage/package.accept_keywords/meson
+
+cat <<-EOF > /etc/portage/package.accept_keywords/misc
+ dev-lang/python-exec
+ dev-lang/python
+EOF
+
+mkdir /etc/portage/binrepos.conf || true
+mkdir /etc/portage/profile || true
+cat <<-EOF > /etc/portage/package.use/ci
+ dev-cpp/gtkmm X
+
+ dev-libs/boost python
+ sys-libs/zlib static-libs
+EOF
+
+cat <<-EOF >> /etc/portage/make.conf
+ EMERGE_DEFAULT_OPTS="--complete-graph --quiet=y --quiet-build=y --jobs=$(nproc) --load-average=$(nproc)"
+ EMERGE_DEFAULT_OPTS="\${EMERGE_DEFAULT_OPTS} --autounmask-write --autounmask-continue --autounmask-keep-keywords=y --autounmask-use=y"
+ EMERGE_DEFAULT_OPTS="\${EMERGE_DEFAULT_OPTS} --binpkg-respect-use=y"
+
+ FEATURES="\${FEATURES} parallel-fetch parallel-install -merge-sync"
+ FEATURES="\${FEATURES} getbinpkg binpkg-request-signature"
+
+ # These don't work in Docker, so reduce noise in logs
+ FEATURES="\${FEATURES} -ipc-sandbox -network-sandbox -pid-sandbox"
+EOF
+
+# TODO: Enable all Pythons / add multiple jobs with diff. Python impls?
+#echo '*/* PYTHON_TARGETS: python3_10 python3_11 python3_12' >> /etc/portage/package.use/python
+echo '*/* PYTHON_TARGETS: python3_12' >> /etc/portage/package.use/python
+cat <<-EOF >> /etc/portage/profile/use.mask
+-python_targets_python3_12
+-python_single_target_python3_12
+EOF
+cat <<-EOF >> /etc/portage/profile/use.stable.mask
+-python_targets_python3_12
+-python_single_target_python3_12
+EOF
+
+echo 'dev-lang/python ensurepip' >> /etc/portage/package.use/python
+
+# Silly mono circular dep
+#USE=minimal emerge --oneshot dev-lang/mono
+
+# If we don't want to do this, we could use the 'portage' container instead
+# so the stage3/repo match.
+emerge --update --deep --changed-use @world
+qlop -d 'yesterday'
+
+env-update && . /etc/profile
+
+rm /usr/lib/python/EXTERNALLY-MANAGED
+python3 -m ensurepip
+install_python_packages
+python3 -m pip install "${base_python_pkgs[@]}"
diff --git a/test cases/frameworks/15 llvm/test.json b/test cases/frameworks/15 llvm/test.json
index f9d730514..177ecdead 100644
--- a/test cases/frameworks/15 llvm/test.json
+++ b/test cases/frameworks/15 llvm/test.json
@@ -7,7 +7,7 @@
{ "val": "combination", "skip_on_jobname": ["msys2"] }
],
"link-static": [
- { "val": true, "skip_on_jobname": ["opensuse"] },
+ { "val": true, "skip_on_jobname": ["opensuse", "linux-gentoo-gcc"] },
{ "val": false }
]
}
diff --git a/test cases/frameworks/25 hdf5/test.json b/test cases/frameworks/25 hdf5/test.json
index e42be3d65..a5c816f66 100644
--- a/test cases/frameworks/25 hdf5/test.json
+++ b/test cases/frameworks/25 hdf5/test.json
@@ -2,7 +2,7 @@
"matrix": {
"options": {
"method": [
- { "val": "pkg-config" },
+ { "val": "pkg-config", "skip_on_jobname": ["linux-gentoo-gcc"] },
{ "val": "config-tool", "skip_on_jobname": ["macos"] }
]
}