|
| 1 | +#!/bin/bash |
| 2 | +set -e |
| 3 | + |
| 4 | +source /ci/common.sh |
| 5 | + |
| 6 | +# We divide the package list into 'pkgs_stable' and 'pkgs_latest'. The trade-off |
| 7 | +# is that latest stuff may not have a binpkg available, but of course we get |
| 8 | +# better test coverage with the bleeding edge then. |
| 9 | +pkgs_stable=( |
| 10 | + app-portage/portage-utils |
| 11 | + dev-build/cmake |
| 12 | + dev-vcs/git |
| 13 | + |
| 14 | + # language support |
| 15 | + dev-python/cython |
| 16 | + dev-python/lxml |
| 17 | + dev-python/pip |
| 18 | + virtual/fortran |
| 19 | + dev-lang/nasm |
| 20 | + dev-lang/vala |
| 21 | + dev-lang/python:2.7 |
| 22 | + dev-java/openjdk-bin |
| 23 | + # requires rustfmt, bin rebuild (TODO: file bug) |
| 24 | + #dev-util/bindgen |
| 25 | + |
| 26 | + dev-libs/elfutils |
| 27 | + dev-libs/gobject-introspection |
| 28 | + dev-util/itstool |
| 29 | + dev-libs/protobuf |
| 30 | + |
| 31 | + # custom deps |
| 32 | + net-libs/libpcap |
| 33 | + dev-util/gtk-doc |
| 34 | + media-libs/libwmf |
| 35 | + sys-cluster/openmpi |
| 36 | + sci-libs/netcdf |
| 37 | + media-libs/libsdl2 |
| 38 | + dev-cpp/gtest |
| 39 | + sci-libs/hdf5 |
| 40 | + dev-qt/linguist-tools |
| 41 | + sys-devel/llvm |
| 42 | + # qt6 unstable |
| 43 | + #dev-qt/qttools |
| 44 | + |
| 45 | + # misc |
| 46 | + app-admin/sudo |
| 47 | + app-text/doxygen |
| 48 | + sys-apps/fakeroot |
| 49 | + sys-devel/bison |
| 50 | + sys-devel/gettext |
| 51 | + |
| 52 | + # TODO: vulkan-validation-layers |
| 53 | + # TODO: cuda |
| 54 | + #dev-cpp/gtkmm:3.0 |
| 55 | + #dev-java/openjdk-bin:8 |
| 56 | + #dev-lang/go |
| 57 | + #dev-lang/mono |
| 58 | + #dev-lang/python |
| 59 | + #dev-lang/rust-bin |
| 60 | + #dev-libs/wayland |
| 61 | + #dev-libs/wayland-protocols |
| 62 | + #dev-python/pypy3 |
| 63 | + #dev-qt/qtbase:6 |
| 64 | + #dev-qt/qtcore:5 |
| 65 | + #dev-qt/qttools:6 |
| 66 | + #dev-vcs/mercurial |
| 67 | + #gnustep-base/gnustep-base |
| 68 | + #media-gfx/graphviz |
| 69 | + #sci-libs/netcdf-fortran |
| 70 | + #sys-devel/clang |
| 71 | + #x11-libs/gtk+:3 |
| 72 | +) |
| 73 | +pkgs_latest=( |
| 74 | + # ~arch boost needed for py3.12 for now (needs 1.84) |
| 75 | + dev-build/b2 |
| 76 | + dev-libs/boost |
| 77 | + |
| 78 | + dev-build/autoconf |
| 79 | + dev-build/automake |
| 80 | + |
| 81 | + # ~arch only |
| 82 | + sci-libs/scalapack |
| 83 | +) |
| 84 | +pkgs=( "${pkgs_stable[@]}" "${pkgs_latest[@]}" ) |
| 85 | + |
| 86 | +emerge-webrsync --quiet |
| 87 | + |
| 88 | +# This means we can't really take advantage of the binhost but a lot of the |
| 89 | +# advantages of using Gentoo in CI come from the bleeding edge side. |
| 90 | +# With full ~arch, we don't get binpkgs for much at all. Instead, let's just |
| 91 | +# do ~arch for the test deps we have. |
| 92 | +#echo 'ACCEPT_KEYWORDS="~amd64"' >> /etc/portage/make.conf |
| 93 | + |
| 94 | +printf "%s\n" ${pkgs[@]} >> /var/lib/portage/world |
| 95 | +printf "%s\n" ${pkgs_latest[@]} >> /etc/portage/package.accept_keywords/meson |
| 96 | +cat /etc/portage/package.accept_keywords/meson |
| 97 | + |
| 98 | +cat <<-EOF > /etc/portage/package.accept_keywords/misc |
| 99 | + dev-lang/python-exec |
| 100 | + dev-lang/python |
| 101 | +EOF |
| 102 | + |
| 103 | +mkdir /etc/portage/binrepos.conf || true |
| 104 | +mkdir /etc/portage/profile || true |
| 105 | +cat <<-EOF > /etc/portage/package.use/ci |
| 106 | + dev-cpp/gtkmm X |
| 107 | +
|
| 108 | + dev-libs/boost python |
| 109 | + sys-libs/zlib static-libs |
| 110 | +EOF |
| 111 | + |
| 112 | +cat <<-EOF >> /etc/portage/make.conf |
| 113 | + EMERGE_DEFAULT_OPTS="--complete-graph --quiet=y --quiet-build=y --jobs=$(nproc) --load-average=$(nproc)" |
| 114 | + EMERGE_DEFAULT_OPTS="\${EMERGE_DEFAULT_OPTS} --autounmask-write --autounmask-continue --autounmask-keep-keywords=y --autounmask-use=y" |
| 115 | + EMERGE_DEFAULT_OPTS="\${EMERGE_DEFAULT_OPTS} --binpkg-respect-use=y" |
| 116 | +
|
| 117 | + FEATURES="\${FEATURES} parallel-fetch parallel-install -merge-sync" |
| 118 | + FEATURES="\${FEATURES} getbinpkg binpkg-request-signature" |
| 119 | +
|
| 120 | + # These don't work in Docker, so reduce noise in logs |
| 121 | + FEATURES="\${FEATURES} -ipc-sandbox -network-sandbox -pid-sandbox" |
| 122 | +EOF |
| 123 | + |
| 124 | +# TODO: Enable all Pythons / add multiple jobs with diff. Python impls? |
| 125 | +#echo '*/* PYTHON_TARGETS: python3_10 python3_11 python3_12' >> /etc/portage/package.use/python |
| 126 | +echo '*/* PYTHON_TARGETS: python3_12' >> /etc/portage/package.use/python |
| 127 | +cat <<-EOF >> /etc/portage/profile/use.mask |
| 128 | +-python_targets_python3_12 |
| 129 | +-python_single_target_python3_12 |
| 130 | +EOF |
| 131 | +cat <<-EOF >> /etc/portage/profile/use.stable.mask |
| 132 | +-python_targets_python3_12 |
| 133 | +-python_single_target_python3_12 |
| 134 | +EOF |
| 135 | + |
| 136 | +echo 'dev-lang/python ensurepip' >> /etc/portage/package.use/python |
| 137 | + |
| 138 | +# Silly mono circular dep |
| 139 | +#USE=minimal emerge --oneshot dev-lang/mono |
| 140 | + |
| 141 | +# If we don't want to do this, we could use the 'portage' container instead |
| 142 | +# so the stage3/repo match. |
| 143 | +emerge --update --deep --changed-use @world |
| 144 | +qlop -d 'yesterday' |
| 145 | + |
| 146 | +env-update && . /etc/profile |
| 147 | + |
| 148 | +rm /usr/lib/python/EXTERNALLY-MANAGED |
| 149 | +python3 -m ensurepip |
| 150 | +install_python_packages |
| 151 | +python3 -m pip install "${base_python_pkgs[@]}" |
0 commit comments