Skip to content

Commit 496d7a3

Browse files
authored
chore(gha): introduce RockyLinux as an action runner (#2179)
Since the node16 has been removed in Github actions, the CentOS 7 is hard to run as a runner, we have to make many tricky works if we want to do that. As an alternative, this patch introduces RockyLinux 9 as a new github runner. https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default
1 parent 201b424 commit 496d7a3

File tree

9 files changed

+80
-24
lines changed

9 files changed

+80
-24
lines changed

.github/workflows/build-push-env-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
build_compilation_env_docker_images:
3636
runs-on: ubuntu-latest
3737
env:
38-
# The glibc version on ubuntu1804 and centos7 is lower than the node20 required, so
38+
# The glibc version on ubuntu1804 is lower than the node20 required, so
3939
# we need to force the node version to 16.
4040
# See more details: https://github.com/actions/checkout/issues/1809
4141
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
@@ -47,10 +47,10 @@ jobs:
4747
- ubuntu1804
4848
- ubuntu2004
4949
- ubuntu2204
50-
- centos7
50+
- rockylinux9
5151
steps:
5252
- name: Checkout
53-
# The glibc version on ubuntu1804 and centos7 is lower than the actions/checkout@v4 required, so
53+
# The glibc version on ubuntu1804 is lower than the actions/checkout@v4 required, so
5454
# we need to force to use actions/checkout@v3.
5555
uses: actions/checkout@v4
5656
- name: Set up QEMU

.github/workflows/lint_and_test_cpp.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -444,19 +444,17 @@ jobs:
444444
./run.sh build --test --skip_thirdparty -j $(sysctl -n hw.physicalcpu)
445445
ccache -s
446446
447-
build_debug_on_centos7:
448-
name: Build Debug on CentOS 7
447+
build_debug_on_rockylinux9:
448+
name: Build Debug on Rockylinux 9
449449
needs:
450450
- cpp_clang_format_linter
451451
runs-on: ubuntu-latest
452452
env:
453453
USE_JEMALLOC: OFF
454454
BUILD_OPTIONS: -t debug --test --separate_servers
455455
PACK_OPTIONS: --separate_servers
456-
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
457-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
458456
container:
459-
image: apache/pegasus:thirdparties-bin-centos7-${{ github.base_ref }}
457+
image: apache/pegasus:thirdparties-bin-rockylinux9-${{ github.base_ref }}
460458
steps:
461459
- name: Clone code
462460
uses: actions/checkout@v3

.github/workflows/regular-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
name: Build Cpp
4848
runs-on: ubuntu-latest
4949
env:
50-
# The glibc version on ubuntu1804 and centos7 is lower than the node20 required, so
50+
# The glibc version on ubuntu1804 is lower than the node20 required, so
5151
# we need to force the node version to 16.
5252
# See more details: https://github.com/actions/checkout/issues/1809
5353
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
@@ -59,7 +59,7 @@ jobs:
5959
- ubuntu1804
6060
- ubuntu2004
6161
- ubuntu2204
62-
- centos7
62+
- rockylinux9
6363
compiler:
6464
- "gcc,g++"
6565
include:
@@ -76,7 +76,7 @@ jobs:
7676
working-directory: /root/incubator-pegasus
7777
steps:
7878
- name: Clone Apache Pegasus Source
79-
# The glibc version on ubuntu1804 and centos7 is lower than the actions/checkout@v4 required, so
79+
# The glibc version on ubuntu1804 is lower than the actions/checkout@v4 required, so
8080
# we need to force to use actions/checkout@v3.
8181
uses: actions/checkout@v3
8282
- name: Unpack prebuilt third-parties

.github/workflows/standardization_lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- uses: hadolint/[email protected]
5959
with:
6060
recursive: true
61-
ignore: 'DL3033,DL3013,DL3059,SC2086,DL3003,SC2164,DL3008,DL3007,DL3006,DL4001'
61+
ignore: 'DL3033,DL3013,DL3059,SC2086,DL3003,SC2164,DL3008,DL3007,DL3006,DL4001,DL3041'
6262

6363
license_check:
6464
name: Check License

.github/workflows/thirdparty-regular-push.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- ubuntu1804
5050
- ubuntu2004
5151
- ubuntu2204
52-
- centos7
52+
- rockylinux9
5353
steps:
5454
- uses: actions/checkout@v4
5555
- name: Set up QEMU
@@ -78,7 +78,7 @@ jobs:
7878
build_push_bin_docker_images:
7979
runs-on: ubuntu-latest
8080
env:
81-
# The glibc version on ubuntu1804 and centos7 is lower than the node20 required, so
81+
# The glibc version on ubuntu1804 is lower than the node20 required, so
8282
# we need to force the node version to 16.
8383
# See more details: https://github.com/actions/checkout/issues/1809
8484
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
@@ -91,9 +91,9 @@ jobs:
9191
- ubuntu1804
9292
- ubuntu2004
9393
- ubuntu2204
94-
- centos7
94+
- rockylinux9
9595
steps:
96-
# The glibc version on ubuntu1804 and centos7 is lower than the actions/checkout@v4 required, so
96+
# The glibc version on ubuntu1804 is lower than the actions/checkout@v4 required, so
9797
# we need to force to use actions/checkout@v3.
9898
- uses: actions/checkout@v3
9999
- name: Set up QEMU
@@ -122,7 +122,7 @@ jobs:
122122
build_push_bin_jemalloc_docker_images:
123123
runs-on: ubuntu-latest
124124
env:
125-
# The glibc version on ubuntu1804 and centos7 is lower than the node20 required, so
125+
# The glibc version on ubuntu1804 is lower than the node20 required, so
126126
# we need to force the node version to 16.
127127
# See more details: https://github.com/actions/checkout/issues/1809
128128
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
@@ -135,9 +135,9 @@ jobs:
135135
- ubuntu1804
136136
- ubuntu2004
137137
- ubuntu2204
138-
- centos7
138+
- rockylinux9
139139
steps:
140-
# The glibc version on ubuntu1804 and centos7 is lower than the actions/checkout@v4 required, so
140+
# The glibc version on ubuntu1804 is lower than the actions/checkout@v4 required, so
141141
# we need to force to use actions/checkout@v3.
142142
- uses: actions/checkout@v3
143143
- name: Set up QEMU

docker/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Building environment for Pegasus compilation.
3535

3636
Github Actions automatically rebuilds and publishes build-env for every commit.
3737

38-
- `apache/pegasus:build-env-centos7-<branch>`
38+
- `apache/pegasus:build-env-rockylinux9-<branch>`
3939
- `apache/pegasus:build-env-ubuntu1804-<branch>`
4040
- `apache/pegasus:build-env-ubuntu2004-<branch>`
4141
- `apache/pegasus:build-env-ubuntu2204-<branch>`
@@ -51,7 +51,7 @@ It packages the downloaded sources into a zip in the container, so that
5151
other repos can easily extract third-parties from the container (via `docker cp`),
5252
without downloading from the cloud object storage.
5353

54-
- `apache/pegasus:thirdparties-src-centos7-<branch>`
54+
- `apache/pegasus:thirdparties-src-rockylinux9-<branch>`
5555
- `apache/pegasus:thirdparties-src-ubuntu1804-<branch>`
5656
- `apache/pegasus:thirdparties-src-ubuntu2004-<branch>`
5757
- `apache/pegasus:thirdparties-src-ubuntu2204-<branch>`
@@ -61,7 +61,7 @@ without downloading from the cloud object storage.
6161
This is a Docker image for Pegasus unit-testing. It prebuilts the thirdparty libraries,
6262
so jobs based on this image can skip building third-parties.
6363

64-
- `apache/pegasus:thirdparties-bin-centos7-<branch>`
64+
- `apache/pegasus:thirdparties-bin-rockylinux9-<branch>`
6565
- `apache/pegasus:thirdparties-bin-ubuntu1804-<branch>`
6666
- `apache/pegasus:thirdparties-bin-ubuntu2004-<branch>`
6767
- `apache/pegasus:thirdparties-bin-ubuntu2204-<branch>`
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
FROM rockylinux/rockylinux:9.5.20241118
19+
20+
RUN dnf -y install autoconf \
21+
automake \
22+
bison \
23+
cmake \
24+
cyrus-sasl-devel \
25+
file \
26+
flex \
27+
gcc-c++ \
28+
gdb \
29+
git \
30+
java-1.8.0-openjdk-devel \
31+
krb5-devel \
32+
libaio-devel \
33+
libtool \
34+
make \
35+
maven \
36+
nmap-ncat \
37+
openssl-devel \
38+
patch \
39+
python3 \
40+
unzip \
41+
vim \
42+
wget \
43+
which \
44+
zip \
45+
zlib \
46+
zlib-devel && \
47+
dnf clean all && \
48+
rm -rf /var/cache/dnf
49+
50+
RUN wget --progress=dot:giga https://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz -P /opt/thrift && \
51+
cd /opt/thrift && tar xzf thrift-0.11.0.tar.gz && cd thrift-0.11.0 && ./bootstrap.sh && \
52+
./configure --enable-libs=no && \
53+
make -j$(($(nproc)/2+1)) && make install && cd - && \
54+
rm -rf thrift-0.11.0 thrift-0.11.0.tar.gz
55+
56+
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
57+
58+
WORKDIR /root/apache

docker/thirdparties-bin/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
ARG GITHUB_BRANCH=master
19-
ARG OS_VERSION=centos7
19+
ARG OS_VERSION=rockylinux9
2020
FROM apache/pegasus:thirdparties-src-${OS_VERSION}-${GITHUB_BRANCH} as builder
2121
FROM apache/pegasus:build-env-${OS_VERSION}-${GITHUB_BRANCH}
2222

docker/thirdparties-src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
ARG GITHUB_BRANCH=master
19-
ARG OS_VERSION=centos7
19+
ARG OS_VERSION=rockylinux9
2020
FROM apache/pegasus:build-env-${OS_VERSION}-${GITHUB_BRANCH} as builder
2121

2222
WORKDIR /root

0 commit comments

Comments
 (0)