Merge #6379: ci: update containers and CI to use Ubuntu 22.04 LTS (jammy)

1592a0f92e ci: update containers and CI to use Ubuntu 22.04 LTS (`jammy`) (Kittywhiskers Van Gogh)
decbd05b77 ci: stop running `check-symbols` during builds (Kittywhiskers Van Gogh)

Pull request description:

  ## Motivation

  While some aspects of C++20 are supported by GCC 9.3 (the version shipped with `focal`, [source](https://packages.ubuntu.com/focal/g++)), P0896R4 ("The One Ranges Proposal") is not ([source](https://en.cppreference.com/w/cpp/compiler_support)), required for moving away from [dash#4622](https://github.com/dashpay/dash/pull/4622) to adopt `std::ranges` and for backporting PRs like [bitcoin#28687](https://github.com/bitcoin/bitcoin/pull/28687).

  They're supported from GCC 10.1 onwards ([source](https://stackoverflow.com/questions/56118941/do-we-have-c20-ranges-library-in-gcc-9/56118997#56118997)) and the next available LTS, `jammy`, currently ships with GCC 11.2 ([source](https://packages.ubuntu.com/jammy/g++)). As we're now using Guix to build our releases, there shouldn't be any adverse effects from our containers having a higher version of `glibc`.

  Additionally, upstream uses 24.04 (`noble`) for their build images ([source](a2317e27b7/ci/test/00_setup_env_native_tsan.sh (L10))) and `jammy` to determine the minimum version to CMake ([source](a2317e27b7/CMakeLists.txt (L5-L6))) (for reference, `focal` ships with CMake 3.16, [source](https://packages.ubuntu.com/focal/cmake)).

  ## Additional Information

  * Builds will no longer run `check-symbols` (and the option to do so, `RUN_SYMBOL_TESTS` has been removed) as portable builds (builds expected for distributions) are built with Guix, which pins its version of `glibc` ([source](396573d09c/contrib/guix/manifest.scm (L152)), currently 2.28), runs `check-symbols` ([source](396573d09c/contrib/guix/libexec/build.sh (L304-L305))), which in turn make sure that it doesn't contain symbols expected in versions higher than `glibc` 2.31 ([source](396573d09c/contrib/devtools/symbol-check.py (L38-L42))).

    Upstream does not use `check-symbols` during their builds nor do we have a reason to (as we no longer using Gitian).

  * CI build failures w.r.t. `pthread_yield` ([build](https://github.com/dashpay/dash/actions/runs/11645989968/job/32437272177?pr=6379#step:7:3136), [build](https://github.com/dashpay/dash/actions/runs/11645989968/job/32430165640#step:7:3157)) should be resolved by rebuilding `bdb4` (see [bitcoin#26423](https://github.com/bitcoin/bitcoin/issues/26423#issuecomment-1296271654)). This problem has only been observed on GitHub CI and locally (the latter resolved by rebuilding depends, I use a separate target triple for testing, `x86_64-jammy-linux-gnu`), GitLab CI has not observed such failures ([build](https://gitlab.com/dashpay/dash/-/jobs/8253943710)).

  ## Breaking changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 1592a0f92e
  knst:
    utACK 1592a0f92e
  PastaPastaPasta:
    utACK 1592a0f92e

Tree-SHA512: cbe6505211246c711dc0fd8645b8a4c6123b5ac163341dca4c686f8905a630c57d483a91a6e29bd9e23bac79d774e339181d2cb17bb3affeb5902e5f548ffa54
This commit is contained in:
pasta 2024-11-04 10:27:44 -06:00
commit 444d7a946b
No known key found for this signature in database
GPG Key ID: E2F3D7916E722D38
11 changed files with 26 additions and 32 deletions

View File

@ -70,10 +70,10 @@ task:
QEMU_USER_CMD: "" # Disable qemu and run the test natively
task:
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [focal]'
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
@ -87,12 +87,12 @@ task:
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
task:
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [focal]'
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [jammy]'
# For faster CI feedback, immediately schedule a task that compiles most modules
<< : *CREDITS_TEMPLATE
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
@ -108,10 +108,10 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
task:
name: '[depends, sanitizers: memory (MSan)] [focal]'
name: '[depends, sanitizers: memory (MSan)] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
@ -124,10 +124,10 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
task:
name: '[no depends, sanitizers: fuzzer,address,undefined,integer] [focal]'
name: '[no depends, sanitizers: fuzzer,address,undefined,integer] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
cpu: 4 # Increase CPU and memory to avoid timeout
memory: 16G
env:
@ -135,10 +135,10 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
task:
name: '[multiprocess, DEBUG] [focal]'
name: '[multiprocess, DEBUG] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
cpu: 4
memory: 16G # The default memory is sometimes just a bit too small, so double everything
env:
@ -146,18 +146,18 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh"
task:
name: '[no wallet] [focal]'
name: '[no wallet] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"
task:
name: 'macOS 10.12 [gui, no tests] [focal]'
name: 'macOS 10.12 [gui, no tests] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_mac.sh"

View File

@ -15,7 +15,7 @@ env:
jobs:
build-image:
name: Build Image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
image-tag: ${{ steps.prepare.outputs.image-tag }}
repo-name: ${{ steps.prepare.outputs.repo-name }}
@ -59,7 +59,7 @@ jobs:
build-depends:
name: Build Dependencies
needs: build-image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
@ -116,7 +116,7 @@ jobs:
build:
name: Build
needs: [build-image, build-depends]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
@ -198,7 +198,7 @@ jobs:
# test:
# name: Test
# needs: [build-image, build]
# runs-on: ubuntu-20.04
# runs-on: ubuntu-22.04
# container:
# image: ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-ci-runner:${{ needs.build-image.outputs.image-tag }}
# options: --user root

View File

@ -1,4 +1,4 @@
image: "ubuntu:focal"
image: "ubuntu:jammy"
variables:
DOCKER_DRIVER: overlay2

View File

@ -63,7 +63,3 @@ fi
if [ "$RUN_SECURITY_TESTS" = "true" ]; then
make test-security-check
fi
if [ "$RUN_SYMBOL_TESTS" = "true" ]; then
make $MAKEJOBS -C src check-symbols
fi

View File

@ -46,7 +46,6 @@ export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-4}
export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-}
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
export RUN_SYMBOL_TESTS=${RUN_SYMBOL_TESTS:-false}
export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000}
export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed}

View File

@ -16,4 +16,3 @@ export RUN_UNIT_TESTS="false"
export GOAL="install"
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.0.0 v0.16.1.1 v0.17.0.3 v18.2.2 v19.3.0 v20.0.1"
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --enable-reduce-exports --disable-fuzz-binary LDFLAGS=-static-libstdc++ --with-boost-process"
export RUN_SYMBOL_TESTS="true"

View File

@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:jammy
# Needed to prevent tzdata hanging while expecting user input
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
@ -11,7 +11,7 @@ ENV APT_ARGS="-y --no-install-recommends --no-upgrade"
# Install packages for i386; disabled on aarch64 and arm64 hosts
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || dpkg --add-architecture i386)
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || (apt-get update && apt-get install $APT_ARGS \
g++-9-multilib \
g++-multilib \
wine32) && rm -rf /var/lib/apt/lists/*)
RUN apt-get update && apt-get install $APT_ARGS \

View File

@ -1,4 +1,4 @@
FROM phusion/baseimage:focal-1.0.0
FROM phusion/baseimage:jammy-1.0.4
LABEL maintainer="Dash Developers <dev@dash.org>"
LABEL description="Dockerised DashCore, built from CI"

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.3
FROM --platform=$BUILDPLATFORM ubuntu:focal as builder
FROM --platform=$BUILDPLATFORM ubuntu:jammy as builder
RUN apt-get update && \
apt-get -y install --no-install-recommends \
automake \
@ -42,7 +42,7 @@ RUN mkdir built-target && \
"linux/amd64") cp depends/x86_64-pc-linux-gnu/bin/dash* /home/dash/built-target ;; \
esac
FROM ubuntu:focal
FROM ubuntu:jammy
LABEL maintainer="Dash Developers <dev@dash.org>"
LABEL description="Dockerised DashCore"

View File

@ -1,6 +1,6 @@
# syntax = edrevo/dockerfile-plus
FROM ubuntu:focal
FROM ubuntu:jammy
INCLUDE+ ci/Dockerfile

View File

@ -2,7 +2,7 @@
# to use 'docker compose run guix_ubuntu' to drop into an
# interactive shell
FROM ubuntu:focal
FROM ubuntu:jammy
SHELL ["/bin/bash", "-c"]