Skip to content

Commit

Permalink
Trac #32966: tox / GH Actions: Add ubuntu variants using ppa:ubuntu-t…
Browse files Browse the repository at this point in the history
…oolchain-r

(from #30876)

see https://askubuntu.com/a/1149383/309919

To test:

- https://launchpad.net/~ubuntu-
toolchain-r/+archive/ubuntu/test?field.series_filter=trusty:
  {{{
tox -e docker-ubuntu-trusty-standard-toolchain-gcc_9
  }}}
- https://launchpad.net/~ubuntu-
toolchain-r/+archive/ubuntu/test?field.series_filter=xenial
  {{{
tox -e docker-ubuntu-xenial-standard-toolchain-gcc_9
  }}}
- https://launchpad.net/~ubuntu-
toolchain-r/+archive/ubuntu/test?field.series_filter=bionic
  {{{
tox -e docker-ubuntu-bionic-standard-toolchain-gcc_9
tox -e docker-ubuntu-bionic-standard-toolchain-gcc_10
tox -e docker-ubuntu-bionic-standard-toolchain-gcc_11
  }}}
- https://launchpad.net/~ubuntu-
toolchain-r/+archive/ubuntu/test?field.series_filter=jammy
  {{{
tox -e docker-ubuntu-jammy-standard-toolchain-gcc_12
  }}}

NB: Your Docker should have enough RAM allowed  (I'd advice 8GB). In
Docker Desktop this setting is in Preferences->Resources -> Advanced.

URL: https://trac.sagemath.org/32966
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Feb 16, 2022
2 parents 22221ae + d42bc03 commit 03d78e2
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ EOF
UPDATE="$SUDO apt-get update &&"
INSTALL="$SUDO DEBIAN_FRONTEND=noninteractive apt-get install -qqq --no-install-recommends --yes"
CLEAN="&& $SUDO apt-get clean"
if [ -n "$EXTRA_REPOSITORY" ]; then
cat <<EOF
RUN $UPDATE $INSTALL software-properties-common && ($INSTALL gpg gpg-agent || echo "(ignored)")
RUN $SUDO add-apt-repository $EXTRA_REPOSITORY
EOF
fi
;;
fedora*|redhat*|centos*)
cat <<EOF
Expand Down
3 changes: 3 additions & 0 deletions build/pkgs/_gcc10/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcc-10
g++-10
gfortran-10
1 change: 1 addition & 0 deletions build/pkgs/_gcc10/distros/homebrew.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gcc@10
1 change: 1 addition & 0 deletions build/pkgs/_gcc10/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
3 changes: 3 additions & 0 deletions build/pkgs/_gcc11/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcc-11
g++-11
gfortran-11
1 change: 1 addition & 0 deletions build/pkgs/_gcc11/distros/homebrew.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gcc@11
1 change: 1 addition & 0 deletions build/pkgs/_gcc11/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
3 changes: 3 additions & 0 deletions build/pkgs/_gcc12/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcc-12
g++-12
gfortran-12
1 change: 1 addition & 0 deletions build/pkgs/_gcc12/distros/homebrew.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gcc@12
1 change: 1 addition & 0 deletions build/pkgs/_gcc12/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
3 changes: 3 additions & 0 deletions build/pkgs/_gcc9/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcc-9
g++-9
gfortran-9
1 change: 1 addition & 0 deletions build/pkgs/_gcc9/distros/homebrew.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gcc@9
1 change: 1 addition & 0 deletions build/pkgs/_gcc9/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
4 changes: 4 additions & 0 deletions src/doc/en/developer/portability_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ To get started, you need to install a `Docker client
Linux, Mac, and Windows. The clients for the latter are known as
"Docker Desktop".

Make sure that your Docker client is configured to provide enough RAM
to the containers (8 GB are a good choice). In Docker Desktop this
setting is in Preferences -> Resources -> Advanced.

All examples in this section were obtained using Docker Desktop for
Mac; but the `command-line user interface
<https://docs.docker.com/engine/reference/commandline/cli/>`_ for the
Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ setenv =
#
ubuntu: SYSTEM=debian
ubuntu: BASE_IMAGE=ubuntu
ubuntu-toolchain: EXTRA_REPOSITORY=ppa:ubuntu-toolchain-r/test
ubuntu-trusty: BASE_TAG=trusty
ubuntu-trusty: IGNORE_MISSING_SYSTEM_PACKAGES=yes
ubuntu-xenial: BASE_TAG=xenial
Expand Down Expand Up @@ -530,8 +531,13 @@ setenv =
#
gcc_spkg: CONFIG_CONFIGURE_ARGS_2=--without-system-gcc
gcc_9: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-9 CXX=g++-9 FC=gfortran-9
gcc_9: EXTRA_SAGE_PACKAGES_2=_gcc9
gcc_10: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-10 CXX=g++-10 FC=gfortran-10
gcc_10: EXTRA_SAGE_PACKAGES_2=_gcc10
gcc_11: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-11 CXX=g++-11 FC=gfortran-11
gcc_11: EXTRA_SAGE_PACKAGES_2=_gcc11
gcc_12: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-12 CXX=g++-12 FC=gfortran-12
gcc_12: EXTRA_SAGE_PACKAGES_2=_gcc12
llvm: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=clang CXX=clang++
llvm: EXTRA_SAGE_PACKAGES_2=llvm
# LLVM is keg-only
Expand Down

0 comments on commit 03d78e2

Please sign in to comment.