Skip to content

Commit

Permalink
Merge #6379: ci: update containers and CI to use Ubuntu 22.04 LTS (`j…
Browse files Browse the repository at this point in the history
…ammy`)

1592a0f ci: update containers and CI to use Ubuntu 22.04 LTS (`jammy`) (Kittywhiskers Van Gogh)
decbd05 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](#4622) to adopt `std::ranges` and for backporting PRs like [bitcoin#28687](bitcoin#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](https://github.com/bitcoin/bitcoin/blob/a2317e27b7fb86df4e32cd1674c06e09cb808248/ci/test/00_setup_env_native_tsan.sh#L10)) and `jammy` to determine the minimum version to CMake ([source](https://github.com/bitcoin/bitcoin/blob/a2317e27b7fb86df4e32cd1674c06e09cb808248/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](https://github.com/dashpay/dash/blob/396573d09cff5c65b2e3b4ba965185ac532b8b5c/contrib/guix/manifest.scm#L152), currently 2.28), runs `check-symbols` ([source](https://github.com/dashpay/dash/blob/396573d09cff5c65b2e3b4ba965185ac532b8b5c/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](https://github.com/dashpay/dash/blob/396573d09cff5c65b2e3b4ba965185ac532b8b5c/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](bitcoin#26423 (comment))). 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 1592a0f
  knst:
    utACK 1592a0f
  PastaPastaPasta:
    utACK 1592a0f

Tree-SHA512: cbe6505211246c711dc0fd8645b8a4c6123b5ac163341dca4c686f8905a630c57d483a91a6e29bd9e23bac79d774e339181d2cb17bb3affeb5902e5f548ffa54
  • Loading branch information
PastaPastaPasta committed Nov 4, 2024
2 parents 396573d + 1592a0f commit 444d7a9
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 32 deletions.
28 changes: 14 additions & 14 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"

Expand All @@ -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"

Expand All @@ -124,40 +124,40 @@ 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:
MAKEJOBS: "-j8"
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:
MAKEJOBS: "-j8"
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"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ubuntu:focal"
image: "ubuntu:jammy"

variables:
DOCKER_DRIVER: overlay2
Expand Down
4 changes: 0 additions & 4 deletions ci/dash/build_src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion ci/test/00_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 0 additions & 1 deletion ci/test/00_setup_env_native_qt5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions contrib/containers/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion contrib/containers/deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
4 changes: 2 additions & 2 deletions contrib/containers/deploy/Dockerfile.GitHubActions.Dispatch
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion contrib/containers/develop/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax = edrevo/dockerfile-plus

FROM ubuntu:focal
FROM ubuntu:jammy

INCLUDE+ ci/Dockerfile

Expand Down
2 changes: 1 addition & 1 deletion contrib/containers/guix/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit 444d7a9

Please sign in to comment.