diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index 4d56fb81e0..502a82296d 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -50,7 +50,7 @@ jobs: unittests-all-opt: runs-on: [self-hosted, linux, x64] if: github.event.pull_request.draft == false - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest needs: [pre-commit, check-for-change-id] # only runs if pre-commit and change-id passes timeout-minutes: 60 steps: @@ -65,7 +65,7 @@ jobs: if: github.event.pull_request.draft == false # In order to make sure the environment is exactly the same, we run in # the same container we use to build gem5 and run the testlib tests. This - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest needs: [pre-commit, check-for-change-id] steps: - uses: actions/checkout@v4 @@ -108,7 +108,7 @@ jobs: testlib-quick-gem5-builds: runs-on: [self-hosted, linux, x64] if: github.event.pull_request.draft == false - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest needs: [pre-commit, check-for-change-id, testlib-quick-matrix] strategy: matrix: @@ -138,7 +138,7 @@ jobs: testlib-quick-execution: runs-on: [self-hosted, linux, x64] if: github.event.pull_request.draft == false - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest needs: [pre-commit, check-for-change-id, testlib-quick-matrix, testlib-quick-gem5-builds] timeout-minutes: 360 # 6 hours strategy: diff --git a/.github/workflows/compiler-tests.yaml b/.github/workflows/compiler-tests.yaml index 7b698d6ed8..1c1ef88fd4 100644 --- a/.github/workflows/compiler-tests.yaml +++ b/.github/workflows/compiler-tests.yaml @@ -18,7 +18,7 @@ jobs: matrix: image: [gcc-version-13, gcc-version-12, gcc-version-11, gcc-version-10, gcc-version-8, clang-version-16, clang-version-15, clang-version-14, clang-version-13, clang-version-12, clang-version-11, clang-version-10, clang-version-9, clang-version-8, clang-version-7, ubuntu-20.04_all-dependencies, - ubuntu-22.04_all-dependencies, ubuntu-22.04_min-dependencies] + ubuntu-22.04_all-dependencies, ubuntu-24.04_all-dependencies, ubuntu-24.04_min-dependencies] opts: [.opt, .fast] runs-on: [self-hosted, linux, x64] timeout-minutes: 2880 # 48 hours diff --git a/.github/workflows/daily-tests.yaml b/.github/workflows/daily-tests.yaml index 3b97220a53..73788d3c9c 100644 --- a/.github/workflows/daily-tests.yaml +++ b/.github/workflows/daily-tests.yaml @@ -46,7 +46,7 @@ jobs: isa-option: 'NULL' runs-on: [self-hosted, linux, x64] needs: name-artifacts - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest steps: - uses: actions/checkout@v4 with: @@ -74,7 +74,7 @@ jobs: matrix: type: [fast, debug] runs-on: [self-hosted, linux, x64] - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest timeout-minutes: 60 steps: - uses: actions/checkout@v4 @@ -93,7 +93,7 @@ jobs: test-type: [arm_boot_tests, fs, gpu, insttest_se, learning_gem5, m5threads_test_atomic, memory, multi_isa, replacement_policies, riscv_boot_tests, stdlib, x86_boot_tests] runs-on: [self-hosted, linux, x64] - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest needs: [name-artifacts, build-gem5] timeout-minutes: 1440 # 24 hours for entire matrix to run steps: @@ -182,7 +182,7 @@ jobs: matrix: test-type: [gem5-library-example-x86-ubuntu-run-ALL-x86_64-opt, gem5-library-example-riscv-ubuntu-run-ALL-x86_64-opt, lupv-example-ALL-x86_64-opt, gem5-library-example-arm-ubuntu-run-test-ALL-x86_64-opt, gem5-library-example-riscvmatched-hello-ALL-x86_64-opt] - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest needs: [name-artifacts, build-gem5] timeout-minutes: 1440 # 24 hours steps: diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index c9e259d7f4..2afa907d0d 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -6,7 +6,7 @@ on: jobs: obtain-dockerfiles: runs-on: [self-hosted, linux, x64] - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/weekly-tests.yaml b/.github/workflows/weekly-tests.yaml index 2960453c9f..3773557504 100644 --- a/.github/workflows/weekly-tests.yaml +++ b/.github/workflows/weekly-tests.yaml @@ -92,7 +92,7 @@ jobs: build-gem5: runs-on: [self-hosted, linux, x64] - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest outputs: build-name: ${{ steps.artifact-name.outputs.name }} steps: @@ -120,7 +120,7 @@ jobs: matrix: test-type: [gem5_library_example_tests, gem5_resources, parsec_benchmarks, x86_boot_tests] runs-on: [self-hosted, linux, x64] - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest needs: [build-gem5] timeout-minutes: 4320 # 3 days steps: @@ -157,7 +157,7 @@ jobs: dramsys-tests: runs-on: [self-hosted, linux, x64] - container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest + container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest timeout-minutes: 4320 # 3 days steps: - uses: actions/checkout@v4 diff --git a/util/dockerfiles/docker-bake.hcl b/util/dockerfiles/docker-bake.hcl index 2af05bb546..7092d9cdb1 100644 --- a/util/dockerfiles/docker-bake.hcl +++ b/util/dockerfiles/docker-bake.hcl @@ -44,7 +44,7 @@ group "default" { } group "ubuntu-releases" { - targets=["ubuntu-22-04_all-dependencies", "ubuntu-20-04_all-dependencies", "ubuntu-22-04_min-dependencies"] + targets=["ubuntu-24-04_all-dependencies", "ubuntu-22-04_all-dependencies", "ubuntu-20-04_all-dependencies", "ubuntu-24-04_min-dependencies"] } group "clang-compilers" { @@ -90,6 +90,13 @@ target "systemc" { tags = ["${IMAGE_URI}/systemc-env:${TAG}"] } +target "ubuntu-24-04_all-dependencies" { + inherits = ["common"] + dockerfile = "Dockerfile" + context = "ubuntu-24.04_all-dependencies" + tags = ["${IMAGE_URI}/ubuntu-24.04_all-dependencies:${TAG}"] +} + target "ubuntu-22-04_all-dependencies" { inherits = ["common"] dockerfile = "Dockerfile" @@ -112,11 +119,11 @@ target "ubuntu-20-04_all-dependencies" { tags = ["${IMAGE_URI}/ubuntu-20.04_all-dependencies:${TAG}"] } -target "ubuntu-22-04_min-dependencies" { +target "ubuntu-24-04_min-dependencies" { inherits = ["common"] dockerfile = "Dockerfile" - context = "ubuntu-22.04_min-dependencies" - tags = ["${IMAGE_URI}/ubuntu-22.04_min-dependencies:${TAG}"] + context = "ubuntu-24.04_min-dependencies" + tags = ["${IMAGE_URI}/ubuntu-24.04_min-dependencies:${TAG}"] } target "gcc-compilers-base-20-04" { diff --git a/util/dockerfiles/docker-compose.yaml b/util/dockerfiles/docker-compose.yaml index fe1275f02b..dca22c8e18 100644 --- a/util/dockerfiles/docker-compose.yaml +++ b/util/dockerfiles/docker-compose.yaml @@ -32,11 +32,16 @@ services: context: ubuntu-22.04_all-dependencies dockerfile: Dockerfile image: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest - ubuntu-22.04_min-dependencies: + ubuntu-24.04_all-dependencies: build: - context: ubuntu-22.04_min-dependencies + context: ubuntu-24.04_all-dependencies dockerfile: Dockerfile - image: ghcr.io/gem5/ubuntu-22.04_min-dependencies:latest + image: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest + ubuntu-24.04_min-dependencies: + build: + context: ubuntu-24.04_min-dependencies + dockerfile: Dockerfile + image: ghcr.io/gem5/ubuntu-24.04_min-dependencies:latest gcc-8: build: context: ubuntu-20.04_gcc-version diff --git a/util/dockerfiles/ubuntu-24.04_all-dependencies/Dockerfile b/util/dockerfiles/ubuntu-24.04_all-dependencies/Dockerfile new file mode 100644 index 0000000000..fc157261ab --- /dev/null +++ b/util/dockerfiles/ubuntu-24.04_all-dependencies/Dockerfile @@ -0,0 +1,66 @@ +# Copyright (c) 2024 The Regents of the University of California +# All Rights Reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer; +# redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution; +# neither the name of the copyright holders nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM --platform=${BUILDPLATFORM} ubuntu:24.04 + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt -y update && apt -y upgrade && apt -y install \ + build-essential \ + scons \ + python3-dev \ + git \ + pre-commit \ + zlib1g \ + zlib1g-dev \ + libprotobuf-dev \ + protobuf-compiler \ + libprotoc-dev \ + libgoogle-perftools-dev \ + libboost-all-dev \ + libhdf5-serial-dev \ + python3-pydot \ + python3-venv \ + python3-tk \ + mypy \ + m4 \ + libcapstone-dev \ + libpng-dev \ + libelf-dev \ + pkg-config \ + wget \ + cmake \ + doxygen + +# pre-commit, as installed via apt in 24.04, attempts to create a cache +# directory at "${HOME}/.cache/pre-commit". If running docker with non-root, +# the HOME directory is set to "/". Since non-root users do not have permission +# to write to this directory, an error is returned when pre-commit is executed. +# pre-commit's default cache directory can be changed via the `XDG_CACHE_HOME` +# enivoronment variable. Here we set it to "/tmp". With this pre-commit will +# create a "/tmp/pre-commit" directory to use for caching. "/tmp" was chosen +# as it's a directory any user can access and write to. Given this only stores +# caching information, the "/tmp" directory being wiped is not a concern. +ENV XDG_CACHE_HOME=/tmp/ diff --git a/util/dockerfiles/ubuntu-22.04_min-dependencies/Dockerfile b/util/dockerfiles/ubuntu-24.04_min-dependencies/Dockerfile similarity index 93% rename from util/dockerfiles/ubuntu-22.04_min-dependencies/Dockerfile rename to util/dockerfiles/ubuntu-24.04_min-dependencies/Dockerfile index 690959da91..cdac54a791 100644 --- a/util/dockerfiles/ubuntu-22.04_min-dependencies/Dockerfile +++ b/util/dockerfiles/ubuntu-24.04_min-dependencies/Dockerfile @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2024 The Regents of the University of California # All Rights Reserved. # # Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM --platform=${BUILDPLATFORM} ubuntu:22.04 +FROM --platform=${BUILDPLATFORM} ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt -y update && apt -y upgrade && \