Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests,docker: Drop support for GCC <v11 and Clang <v14 #1020

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/compiler-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
strategy:
fail-fast: false
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,
image: [gcc-version-13, gcc-version-12, gcc-version-11, clang-version-16, clang-version-15, clang-version-14, ubuntu-20.04_all-dependencies,
ubuntu-22.04_all-dependencies, ubuntu-22.04_min-dependencies]
opts: [.opt, .fast]
runs-on: [self-hosted, linux, x64]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,22 +23,13 @@
# 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:22.04

# Valid version values:
# 13
# 15
ARG version

ENV DEBIAN_FRONTEND=noninteractive
RUN apt -y update && apt -y upgrade && \
apt -y install git m4 scons zlib1g zlib1g-dev libprotobuf-dev \
protobuf-compiler libprotoc-dev libgoogle-perftools-dev python3-dev \
python-is-python3 doxygen libboost-all-dev libhdf5-serial-dev \
python3-pydot libpng-dev clang-${version} make
FROM --platform=${BUILDPLATFORM} ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest

RUN apt-get --purge -y remove gcc

ARG version
RUN apt update && apt -y install clang-${version}

RUN update-alternatives --install \
/usr/bin/clang++ clang++ /usr/bin/clang++-${version} 100
RUN update-alternatives --install \
Expand Down
47 changes: 6 additions & 41 deletions util/dockerfiles/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ group "ubuntu-releases" {
}

group "clang-compilers" {
targets = ["clang-compilers-base-20-04", "clang-compilers-base-22-04", "clang-compilers-16"]
targets = ["clang-compilers"]
}

group "gcc-compilers" {
targets = ["gcc-compilers-base-20-04", "gcc-compilers-base-22-04"]
targets = ["gcc-compilers"]
}

# Common attributes across all targets. Note: these can be overwritten.
Expand Down Expand Up @@ -119,21 +119,7 @@ target "ubuntu-22-04_min-dependencies" {
tags = ["${IMAGE_URI}/ubuntu-22.04_min-dependencies:${TAG}"]
}

target "gcc-compilers-base-20-04" {
name = "gcc-compilers-${replace(ver, ".", "-")}"
inherits = ["common"]
context = "ubuntu-20.04_gcc-version"
dockerfile = "Dockerfile"
matrix = {
ver = ["8", "9", "10"]
}
args = {
version = ver
}
tags = ["${IMAGE_URI}/gcc-version-${ver}:${TAG}"]
}

target "gcc-compilers-base-22-04" {
target "gcc-compilers" {
name = "gcc-compilers-${replace(ver, ".", "-")}"
inherits = ["common"]
context = "ubuntu-22.04_gcc-version"
Expand All @@ -147,41 +133,20 @@ target "gcc-compilers-base-22-04" {
tags = ["${IMAGE_URI}/gcc-version-${ver}:${TAG}"]
}

target "clang-compilers-base-20-04" {
target "clang-compilers" {
name = "clang-compilers-${replace(ver, ".", "-")}"
inherits = ["common"]
context = "ubuntu-20.04_clang-version"
context = "clang-compilers"
dockerfile = "Dockerfile"
matrix = {
ver = ["7", "8", "9", "10", "11", "12"]
}
args = {
version = ver
}
tags = ["${IMAGE_URI}/clang-version-${ver}:${TAG}"]
}

target "clang-compilers-base-22-04" {
name = "clang-compilers-${replace(ver, ".", "-")}"
inherits = ["common"]
context = "ubuntu-22.04_clang-version"
dockerfile = "Dockerfile"
matrix = {
ver = ["13", "14", "15"]
ver = ["14", "15", "16"]
}
args = {
version = ver
}
tags = ["${IMAGE_URI}/clang-version-${ver}:${TAG}"]
}

target "clang-compilers-16" {
inherits = ["common"]
dockerfile = "Dockerfile"
context = "ubuntu-22.04_clang_16"
tags = ["${IMAGE_URI}/clang-version-16:${TAG}"]
}

target "llvm-gnu-cross-compiler-riscv64" {
inherits = ["common"]
dockerfile = "Dockerfile"
Expand Down
75 changes: 6 additions & 69 deletions util/dockerfiles/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,105 +37,42 @@ services:
context: ubuntu-22.04_min-dependencies
dockerfile: Dockerfile
image: ghcr.io/gem5/ubuntu-22.04_min-dependencies:latest
gcc-8:
build:
context: ubuntu-20.04_gcc-version
dockerfile: Dockerfile
args:
- version=8
image: ghcr.io/gem5/gcc-version-8:latest
gcc-10:
build:
context: ubuntu-20.04_gcc-version
dockerfile: Dockerfile
args:
- version=10
image: ghcr.io/gem5/gcc-version-10:latest
gcc-11:
build:
context: ubuntu-22.04_gcc-version
context: gcc-version
dockerfile: Dockerfile
args:
- version=11
image: ghcr.io/gem5/gcc-version-11:latest
gcc-12:
build:
context: ubuntu-22.04_gcc-version
context: gcc-version
dockerfile: Dockerfile
args:
- version=12
image: ghcr.io/gem5/gcc-version-12:latest
gcc-13:
build:
context: ubuntu-22.04_gcc_13-version
context: clang-version
dockerfile: Dockerfile
image: ghcr.io/gem5/gcc-version-13:latest
clang-7:
build:
context: ubuntu-20.04_clang-version
dockerfile: Dockerfile
args:
- version=7
image: ghcr.io/gem5/clang-version-7:latest
clang-8:
build:
context: ubuntu-20.04_clang-version
dockerfile: Dockerfile
args:
- version=8
image: ghcr.io/gem5/clang-version-8:latest
clang-9:
build:
context: ubuntu-20.04_clang-version
dockerfile: Dockerfile
args:
- version=9
image: ghcr.io/gem5/clang-version-9:latest
clang-10:
build:
context: ubuntu-20.04_clang-version
dockerfile: Dockerfile
args:
- version=10
image: ghcr.io/gem5/clang-version-10:latest
clang-11:
build:
context: ubuntu-20.04_clang-version
dockerfile: Dockerfile
args:
- version=11
image: ghcr.io/gem5/clang-version-11:latest
clang-12:
build:
context: ubuntu-20.04_clang-version
dockerfile: Dockerfile
args:
- version=12
image: ghcr.io/gem5/clang-version-12:latest
clang-13:
build:
context: ubuntu-22.04_clang-version
dockerfile: Dockerfile
args:
- version=13
image: ghcr.io/gem5/clang-version-13:latest
clang-14:
build:
context: ubuntu-22.04_clang-version
context: clang-version
dockerfile: Dockerfile
args:
- version=14
image: ghcr.io/gem5/clang-version-14:latest
clang-15:
build:
context: ubuntu-22.04_clang-version
context: clang-version
dockerfile: Dockerfile
args:
- version=15
image: ghcr.io/gem5/clang-version-15:latest
clang-16:
build:
context: ubuntu-22.04_clang-16
context: clang-version
dockerfile: Dockerfile
image: ghcr.io/gem5/clang-version-16:latest
llvm-gnu-cross-compiler-riscv64:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,20 +23,12 @@
# 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:22.04
FROM --platform=${BUILDPLATFORM} ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest

# Valid version values:
# 11
# 12
RUN apt-get --purge -y remove gcc

ARG version

ENV DEBIAN_FRONTEND=noninteractive
RUN apt -y update && apt -y upgrade && \
apt -y install git m4 scons zlib1g zlib1g-dev libprotobuf-dev \
protobuf-compiler libprotoc-dev libgoogle-perftools-dev python3-dev \
doxygen libboost-all-dev libhdf5-serial-dev python3-pydot libpng-dev \
gcc-${version} g++-${version} make
RUN apt update && apt -y install gcc-${version} g++-${version}

RUN update-alternatives --install \
/usr/bin/g++ g++ /usr/bin/g++-${version} 100
Expand Down
57 changes: 0 additions & 57 deletions util/dockerfiles/ubuntu-20.04_clang-version/Dockerfile

This file was deleted.

49 changes: 0 additions & 49 deletions util/dockerfiles/ubuntu-20.04_gcc-version/Dockerfile

This file was deleted.