Commit 3500218e authored by Yunus Sevinchan's avatar Yunus Sevinchan
Browse files

Merge branch '375-upgrade-ci-to-ubuntu-24-04-lts' into 'master'

Resolve "Upgrade CI test image to Ubuntu 24.04 LTS"

Closes #375

See merge request utopia-project/utopia!312
parents 2a5aea8a b275284b
Loading
Loading
Loading
Loading
Loading
+37 −35
Original line number Diff line number Diff line
@@ -14,24 +14,23 @@ variables:
  # Need to clone submodules as well
  GIT_SUBMODULE_STRATEGY: recursive

  #
  # Variables needed for docker image deployment
  # The different segments of the resulting test image tag
  BASE_IMAGE_UBUNTU_VERSION: jammy  # NOTE Adjust upon new Ubuntu Release
  BASE_IMAGE_VERSION: "2.1"         # NOTE Increment when changing dockerfile
  BASE_IMAGE_NAME: ccees/utopia-base
  BASE_IMAGE: "${BASE_IMAGE_NAME}:${BASE_IMAGE_UBUNTU_VERSION}-v${BASE_IMAGE_VERSION}"
  # NOTE Do not forget to increment the BASE_IMAGE_VERSION when changes to the
  #      docker file are introduced.

  # Variables controlling the deployed Utopia image and its development
  # counterpart (deployed from the ci_test stage for testing)
  UTOPIA_IMAGE_NAME: ccees/utopia
  UTOPIA_IMAGE_REMOTE_URL: https://gitlab.com/utopia-project/utopia.git
  UTOPIA_IMAGE_BRANCH: master
  #
  # The default values are set in docker/Makefile, but can be overwritten here
  # via environment variables. (Commented-out: use defaults)
  #

  # Utopia virtual environment shortcuts
  RUN_IN_UTOPIA_ENV: $CI_PROJECT_DIR/build/run-in-utopia-env
  ENTER_UTOPIA_ENV: source $CI_PROJECT_DIR/build/activate
  # UTOPIA_BASE_IMAGE_NAME: ccees/utopia-base
  # UTOPIA_BASE_IMAGE_UBUNTU_VERSION: jammy
  # UTOPIA_BASE_IMAGE_VERSION: "2.1"
  # UTOPIA_BASE_IMAGE_BUILD_OPTIONS:

  # UTOPIA_IMAGE_NAME: ccees/utopia
  # UTOPIA_IMAGE_REMOTE_URL: https://gitlab.com/utopia-project/utopia.git
  # UTOPIA_IMAGE_BRANCH: master
  # UTOPIA_IMAGE_BUILD_PROCNUM: 1
  # UTOPIA_IMAGE_BUILD_OPTIONS:

  # Docker Hub login command
  DOCKER_HUB_LOGIN: docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PW
@@ -42,8 +41,16 @@ variables:
  # The GitLab Pages where artifacts can be shown
  PAGES_URL: https://utopia-project.gitlab.io/-/utopia

  #
  # Utopia virtual environment shortcuts
  #
  RUN_IN_UTOPIA_ENV: $CI_PROJECT_DIR/build/run-in-utopia-env
  ENTER_UTOPIA_ENV: source $CI_PROJECT_DIR/build/activate

  #
  # Variables that control whether certain jobs are executed.
  # These can be overwritten via the GitLab CI/CD interface.
  #
  UPDATE_UTOPIA_BASE_IMAGE: "false"
  DEPLOY_DOCKER_IMAGE: "false"
  DEPLOY_DOCS: "false"
@@ -68,8 +75,11 @@ workflow:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH


# As base image for the jobs, use the Utopia image created in the setup stage
image: ${BASE_IMAGE}
# As default image for jobs, use the Utopia base image (created in setup stage)
#
# By choosing the :latest tag, the default values from docker/Makefile will be
# used (once there was a successful build and push).
image: ccees/utopia-base:latest


# .. YAML Templates ...........................................................
@@ -115,17 +125,21 @@ image: ${BASE_IMAGE}

# Use the Docker-in-Docker executor and services, log into Docker Hub
.dind:
  image: docker:stable
  image: docker:dind  # based on alpine linux
  extends:
    - .use_multicore_runner
  services:
    - docker:dind
  variables:
    DOCKER_DRIVER: overlay2
    UTOPIA_IMAGE_BUILD_PROCNUM: $CPUS_DIND
  before_script:
    - docker info
    - $DOCKER_HUB_LOGIN

    # need some build tools
    - apk add build-base make




@@ -143,13 +157,7 @@ setup:utopia-base:
      when: always
    - when: never
  script:
    - docker build -f docker/utopia-base.dockerfile
                   -t ${BASE_IMAGE}
                   -t ${BASE_IMAGE_NAME}:latest
                   --build-arg UBUNTU_VERSION=${BASE_IMAGE_UBUNTU_VERSION}
                   .
    - docker push ${BASE_IMAGE}
    - docker push ${BASE_IMAGE_NAME}:latest
    - cd docker && make build_and_push_base_image



@@ -520,7 +528,8 @@ docs:build:
    - cd build
    - cmake ..

    # Install dependencies and show installation result
    # Enter utopia-env and install dependencies
    - source activate
    - pip install -r ../doc/requirements.txt
    - pip freeze
  script:
@@ -654,14 +663,7 @@ deploy:dockerhub:
      when: always
    - when: never
  script:
    - docker build -f docker/utopia.dockerfile
                   --build-arg BASE_IMAGE=$BASE_IMAGE
                   --build-arg PROCNUM=$CPUS_DIND
                   --build-arg GIT_CHECKOUT=$UTOPIA_IMAGE_BRANCH
                   --build-arg GIT_REMOTE_URL=$UTOPIA_IMAGE_REMOTE_URL
                   -t $UTOPIA_IMAGE_NAME:latest
                   ./
    - docker push $UTOPIA_IMAGE_NAME:latest
    - cd docker && make build_and_push_utopia_image
  environment:
    name: production/docker-latest
    url: https://hub.docker.com/r/$UTOPIA_IMAGE_NAME
+4 −4
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ These instructions are intended for 'clean' __macOS__ (both Intel and Apple Sili
Since __Windows__ supports the installation of Ubuntu via [Windows Subsystem for Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux), Utopia can also be used on Windows.
Follow the [WSL Installation Guide](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to install Ubuntu, then follow the instructions for Ubuntu in this README.

**Note:** Utopia is always tested against a recent Ubuntu release, currently [Ubuntu 22.04](https://releases.ubuntu.com/22.04/).
**Note:** Utopia is always tested against a recent Ubuntu release, currently [Ubuntu 24.04 (LTS)](https://releases.ubuntu.com/24.04/).
However, you can use Utopia with any earlier release, as long as the [dependencies](#dependencies) can be fulfilled.

⚠️ If you encounter difficulties, have a look at the [**troubleshooting section**](#troubleshooting).
@@ -98,7 +98,7 @@ Install the third-party dependencies using a package manager.
However, notice that there might be issues during [the configuration step](#3-configure-and-build).
Have a look at the [troubleshooting](#troubleshooting) section to see how to address them.

##### On Ubuntu (22.04)
##### On Ubuntu (24.04 LTS)
```bash
apt update
apt install cmake gcc g++ gfortran git libarmadillo-dev libboost-all-dev \
@@ -489,8 +489,8 @@ cmake -DCMAKE_EXPORT_PACKAGE_REGISTRY=On ..
| [Python3](https://www.python.org/downloads/)   | >= 3.6           | 3.10.4          | |

Utopia aims to allow rapid development, and is thus being tested only against the more recent releases of its dependencies.
Currently, Utopia is tested against the packages provided by [**Ubuntu 22.04**][Ubuntu-packages].
However the above version _requirements_ (i.e., those _enforced_ by the build system) can be fulfilled also with Ubuntu 19.10.
Currently, Utopia is tested against the packages provided by [**Ubuntu 24.04**][Ubuntu-packages].
However the above version _requirements_ (i.e., those _enforced_ by the build system) can be fulfilled also with Ubuntu 19.10; we just don't test against them any more.

To get Utopia running on a system with an earlier Ubuntu version, the above dependencies still need to be fulfilled.
You can use the [Ubuntu Package Search][Ubuntu-packages] to find the versions available on your system.
+8 −8
Original line number Diff line number Diff line
@@ -409,13 +409,14 @@ for line in open(f"{doc_dir}/.nitpick-ignore"):
        nitpick_ignore.append((reftype, target.strip()))




# -----------------------------------------------------------------------------
# Link-checking
# -- Link-checking ------------------------------------------------------------
# -----------------------------------------------------------------------------
# Docs:
#   https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder

linkcheck_retries = 2

# Link patterns to ignore
linkcheck_ignore = [
    # With linkcheck failing to check relative links to the doxygen output,
@@ -431,15 +432,14 @@ linkcheck_ignore = [
    # And the IUP homepage, which has some weird certificate settings
    r".*(www\.)?iup\.uni-heidelberg\.de/.*",
    #
    # Sites that do not allow the sphinx linkcheck client (403 client error)
    # Sites that do not allow the sphinx linkcheck user agent, or forward to
    # such sites (typically shows a 403 client error) ... even if a custom
    # user agent is set, these sites are not happy.
    r".*(www\.)?intel\.com/.*",
    r".*doi\.org/10\.1103/[Pp]hys[Rr]ev[Ll]ett.*",
]


linkcheck_retries = 2






+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ The first line of your output should confirm that you are now on your new branch

Well done! You have now created your own development branch. Utopia comes with a host of pre-implemented models for you to use and experiment with. And in the :ref:`impl_step_by_step` on how to build a model you can learn how to use these as a starting point, meaning you do not have to start from scratch when developing new models.

Now that you have created a new branch, you are ready to code and upload your changes using git. There are a lot of guides and tutorials online where you can learn how to use git. A quick start would be `this one <https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>`_; a longer one can be found on `git-tower <https://www.git-tower.com/learn/git/ebook>`_. Also, the `git documentation <https://git-scm.com/doc>`_ is quite comprehensive and well-written.
Now that you have created a new branch, you are ready to code and upload your changes using git. There are a lot of guides and tutorials online where you can learn how to use git. A quick start would be `this one <https://git-scm.com/book/en/v2>`_; a longer one can be found on `git-tower <https://www.git-tower.com/learn/git/ebook>`_. Also, the `git documentation <https://git-scm.com/doc>`_ is quite comprehensive and well-written.

Here, we provide only a small selection of commands that you will use a lot during your code development and address some frequent issues encountered when starting to use git. If you have questions or run into problems, it is always worth consulting the ``git <command> --help`` or checking out the guides linked above. Also, searching the internet for what you want to do is usually quite effective when it comes to questions with git.

+11 −0
Original line number Diff line number Diff line
@@ -5,10 +5,16 @@ if (DOXYGEN_FOUND)
    # configure doxygen
    set(DOXYGEN_QUIET YES)
    set(DOXYGEN_EXTRACT_ALL YES)
    set(DOXYGEN_EXTRACT_PACKAGE YES)
    set(DOXYGEN_EXTRACT_PRIVATE YES)
    set(DOXYGEN_EXTRACT_PRIV_VIRTUAL YES)
    set(DOXYGEN_EXTRACT_STATIC YES)
    set(DOXYGEN_EXTRACT_LOCAL_CLASSES YES)
    set(DOXYGEN_EXTRACT_LOCAL_METHODS YES)
    set(DOXYGEN_GENERATE_HTML YES)
    set(DOXYGEN_GENERATE_XML YES)
    set(DOXYGEN_INLINE_SOURCES YES)
    set(DOXYGEN_FULL_PATH_NAMES YES)
    set(DOXYGEN_WARN_LOGFILE ${CMAKE_CURRENT_BINARY_DIR}/doxygen_warnings.log)

    # For persistent HTML page names, explicitly set file names to be generated
@@ -19,6 +25,11 @@ if (DOXYGEN_FOUND)
    # Use MathJax for nicer formulas
    set(DOXYGEN_USE_MATHJAX YES)

    # Increase verbosity
    set(DOXYGEN_WARN_NO_PARAMDOC YES)
    set(DOXYGEN_WARN_UNDOC_ENUM_VAL YES)
    set(DOXYGEN_WARN_AS_ERROR NO)  # TODO ... worth considering though!

    # register the target
    doxygen_add_docs(doxygen_utopia
        ${doxygen_dirs}
Loading