Skip to content

Commit

Permalink
feat: use gcc-10
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Oct 13, 2024
1 parent 4de87fd commit cc94af4
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 13 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ jobs:
matrix:
arch:
- alpine-x64
# - alpine-arm64
- bionic-x64
- bionic-arm64
- bionic-armhf
- bionic-ppc64le
- alpine-arm64
- focal-riscv64
- focal-x64
- focal-arm64
- focal-armhf
# - focal-ppc64le
# - centos7-devtoolset8-arm32v7
- centos7-devtoolset8-arm64
- centos7-devtoolset8-ppc64le
- centos7-devtoolset8-x64
- bionic-devtoolset-arm32v7
- bionic-devtoolset-ppc64le
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 12 additions & 2 deletions focal-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ RUN echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-security main un
RUN echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-updates main universe multiverse restricted" | tee -a /etc/apt/sources.list
RUN dpkg --add-architecture arm64
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-8-aarch64-linux-gnu \
g++-8-aarch64-linux-gnu \
gcc-10 \
g++-10 \
gcc-10-aarch64-linux-gnu \
g++-10-aarch64-linux-gnu \
binutils-aarch64-linux-gnu \
build-essential \
git \
Expand Down Expand Up @@ -59,6 +61,14 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN sudo apt-get update && sudo apt-get install -y docker-ce

# Set gcc-10 as default
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10

# Check compiler toolchain
RUN gcc --version
RUN g++ --version

# Disable user so it can run on GH (VSCodium)
# USER builduser
# WORKDIR /home/builduser
Expand Down
14 changes: 12 additions & 2 deletions focal-armhf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ RUN echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-security main un
RUN echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-updates main universe multiverse restricted" | tee -a /etc/apt/sources.list
RUN dpkg --add-architecture armhf
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-8-arm-linux-gnueabihf \
g++-8-arm-linux-gnueabihf \
gcc-10 \
g++-10 \
gcc-10-arm-linux-gnueabihf \
g++-10-arm-linux-gnueabihf \
binutils-arm-linux-gnueabihf \
build-essential \
git \
Expand Down Expand Up @@ -59,6 +61,14 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN sudo apt-get update && sudo apt-get install -y docker-ce

# Set gcc-10 as default
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10

# Check compiler toolchain
RUN gcc --version
RUN g++ --version

# Disable user so it can run on GH (VSCodium)
# USER builduser
# WORKDIR /home/builduser
Expand Down
14 changes: 12 additions & 2 deletions focal-riscv64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ RUN echo "deb [arch=riscv64] http://ports.ubuntu.com/ focal-security main univer
RUN echo "deb [arch=riscv64] http://ports.ubuntu.com/ focal-updates main universe multiverse restricted" | tee -a /etc/apt/sources.list
RUN dpkg --add-architecture riscv64
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-8-riscv64-linux-gnu \
g++-8-riscv64-linux-gnu \
gcc-10 \
g++-10 \
gcc-10-riscv64-linux-gnu \
g++-10-riscv64-linux-gnu \
binutils-aarch64-linux-gnu \
build-essential \
git \
Expand Down Expand Up @@ -60,6 +62,14 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN sudo apt-get update && sudo apt-get install -y docker-ce

# Set gcc-10 as default
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10

# Check compiler toolchain
RUN gcc --version
RUN g++ --version

# Disable user so it can run on GH (VSCodium)
# USER builduser
# WORKDIR /home/builduser
Expand Down
8 changes: 8 additions & 0 deletions focal-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ARG REPO=mcr.microsoft.com/mirror/docker/library/ubuntu
ARG TAG=20.04
FROM ${REPO}:${TAG}

docker run -ti mcr.microsoft.com/mirror/docker/library/ubuntu:20.04 bash

ARG DEBIAN_FRONTEND=noninteractive

# Disable user so it can run on GH (VSCodium)
Expand Down Expand Up @@ -53,6 +55,8 @@ RUN apt-get update && apt-get install -y \
# VSCodium
jq \
imagemagick \
gcc-10 \
g++-10 \
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.sh\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.sh \
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.py\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.py \
# Remove snapcraft to avoid issues on docker build
Expand Down Expand Up @@ -82,6 +86,10 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN sudo apt-get update && sudo apt-get install -y docker-ce

# Set gcc-10 as default
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10

# Check compiler toolchain
RUN gcc --version
RUN g++ --version
Expand Down

0 comments on commit cc94af4

Please sign in to comment.