Skip to content

Commit

Permalink
ci: Add almalinux and rockylinux
Browse files Browse the repository at this point in the history
* remove centos
  • Loading branch information
Mizux committed Jul 4, 2024
1 parent 41d2dfb commit ce4921d
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/aarch64_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
matrix:
targets: [
# https://go.dev/doc/install/source#environment
[arm64], # OCI alias
[aarch64-linux-gnu], # linaro
[aarch64_be-linux-gnu], # linaro
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/amd64_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [alpine, archlinux, centos, debian, fedora, opensuse, ubuntu]
distro: [almalinux, alpine, archlinux, debian, fedora, opensuse, rockylinux, ubuntu]
fail-fast: false
env:
DISTRO: amd64_${{ matrix.distro }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/arm64_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [alpine, centos, debian, fedora, opensuse, ubuntu]
distro: [almalinux, alpine, debian, fedora, opensuse, rockylinux, ubuntu]
fail-fast: false
env:
DISTRO: arm64_${{ matrix.distro }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/arm_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
matrix:
targets: [
# https://go.dev/doc/install/source#environment
[arm-linux-gnueabihf],
[armv8l-linux-gnueabihf],
[arm-linux-gnueabi],
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mips64_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
matrix:
targets: [
# https://go.dev/doc/install/source#environment
[mips64], # OCI alias
[mips64le], # OCI alias
[mips64-r6],
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mips_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
matrix:
targets: [
# https://go.dev/doc/install/source#environment
[mips], # OCI alias
[mipsle], # OCI alias
[mips32-r6],
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/powerpc_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
matrix:
targets: [
# https://go.dev/doc/install/source#environment
[ppc], # alias
[ppc-440fp],
# [ppc-e500mc], # TODO(mizux) To fix
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/riscv64_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ jobs:
strategy:
matrix:
distro: [
# almalinux,
alpine,
# centos,
debian, # currently only unstable not latest
# fedora,
# opensuse,
# rockylinux,
#ubuntu,
]
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/riscv64_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
matrix:
targets: [
# https://go.dev/doc/install/source#environment
[riscv64], # bootlin
]
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/s390x_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
matrix:
targets: [
# https://go.dev/doc/install/source#environment
[s390x],
]
fail-fast: false
Expand Down
5 changes: 3 additions & 2 deletions ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ help:
@echo -e "\t${BOLD}clean_native${RESET}: Remove ALL caches and docker images."
@echo
@echo -e "\tWith ${BOLD}<distro>${RESET}:"
@echo -e "\t\t${BOLD}almalinux${RESET} (latest)"
@echo -e "\t\t${BOLD}alpine${RESET} (edge)"
@echo -e "\t\t${BOLD}archlinux${RESET} (latest)"
@echo -e "\t\t${BOLD}centos${RESET} (latest)"
@echo -e "\t\t${BOLD}debian${RESET} (latest)"
@echo -e "\t\t${BOLD}fedora${RESET} (latest)"
@echo -e "\t\t${BOLD}opensuse${RESET} (tumbleweed)"
@echo -e "\t\t${BOLD}rockylinux${RESET} (9)"
@echo -e "\t\t${BOLD}ubuntu${RESET} (rolling)"
@echo -e "\t\t${BOLD}all${RESET} trigger ALL DISTROS."
@echo
Expand Down Expand Up @@ -163,7 +164,7 @@ endif
DOCKER_RUN_CMD := docker run --rm --init --net=host

# Currently supported distro
DISTROS := alpine archlinux centos debian fedora opensuse ubuntu
DISTROS := almalinux alpine archlinux debian fedora opensuse rockylinux ubuntu

# $* stem
# $< first prerequist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Create a virtual environment with all tools installed
# ref: https://quay.io/repository/centos/centos
FROM quay.io/centos/centos:stream AS env
# ref: https://hub.docker.com/_/almalinux
FROM almalinux:latest AS env
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
Expand All @@ -16,7 +16,7 @@ WORKDIR /home/project
COPY . .

FROM devel AS build
RUN cmake -version
RUN cmake --version
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --target all -v
RUN cmake --build build --target install -v
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/archlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WORKDIR /home/project
COPY . .

FROM devel AS build
RUN cmake -version
RUN cmake --version
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --target all -v
RUN cmake --build build --target install -v
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /home/project
COPY . .

FROM devel AS build
RUN cmake -version
RUN cmake --version
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --target all -v
RUN cmake --build build --target install -v
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/opensuse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /home/project
COPY . .

FROM devel AS build
RUN cmake -version
RUN cmake --version
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --target all -v
RUN cmake --build build --target install -v
Expand Down
41 changes: 41 additions & 0 deletions ci/docker/rockylinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/rockylinux
FROM rockylinux:9 AS env

# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]

# Add the library src to our build env
FROM env AS devel
WORKDIR /home/project
COPY . .

FROM devel AS build
RUN cmake --version
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --target all -v
RUN cmake --build build --target install -v

FROM build AS test
RUN cmake --build build --target test -v

# Test install rules
FROM env AS install_env
COPY --from=build /usr/local /usr/local/

FROM install_env AS install_devel
WORKDIR /home/samples
COPY ci/samples .

FROM install_devel AS install_build
RUN cmake -S. -Bbuild
RUN cmake --build build --target all -v

FROM install_build AS install_test
RUN cmake --build build --target test -v
2 changes: 1 addition & 1 deletion ci/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /home/project
COPY . .

FROM devel AS build
RUN cmake -version
RUN cmake --version
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --target all -v
RUN cmake --build build --target install -v
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /home/project
COPY . .

FROM devel AS build
RUN cmake -version
RUN cmake --version
RUN emcmake cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --target all -v

Expand Down

0 comments on commit ce4921d

Please sign in to comment.