Skip to content

Commit

Permalink
Changed to use devtoolset for building on CentOS 7
Browse files Browse the repository at this point in the history
  • Loading branch information
ggtakec committed Nov 25, 2023
1 parent 2b57e74 commit 29cf161
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ jobs:
- name: Build
run: |
if [ -f /opt/rh/devtoolset-11/enable ]; then
source /opt/rh/devtoolset-11/enable
fi
./autogen.sh
/bin/sh -c "./configure ${CONFIGURE_OPTIONS}"
make --jobs=$(nproc)
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/linux-ci-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ PACKAGE_ENABLE_REPO_OPTIONS=""
PACKAGE_INSTALL_ADDITIONAL_OPTIONS=""
SHELLCHECK_DIRECT_INSTALL=0
AWSCLI_DIRECT_INSTALL=1
SCL_INSTALL=0

if [ "${CONTAINER_FULLNAME}" = "ubuntu:23.10" ]; then
PACKAGE_MANAGER_BIN="apt-get"
Expand Down Expand Up @@ -183,6 +184,15 @@ elif [ "${CONTAINER_FULLNAME}" = "centos:centos7" ]; then
INSTALL_CHECKER_PKGS="cppcheck jq"
INSTALL_CHECKER_PKG_OPTIONS="--enablerepo=epel"

# [NOTE]
# To use C++11 std::get_time/put_time, you need GCC5 or higher.
# For building, we need to use devtoolset on CentOS 7.
# (devtoolset is not required in the s3fs execution.)
#
SCL_INSTALL=1
INSTALL_SCL_PACKAGES="centos-release-scl"
INSTALL_DEVTOOLSET_PACKAGES="devtoolset-11"

elif [ "${CONTAINER_FULLNAME}" = "fedora:39" ]; then
PACKAGE_MANAGER_BIN="dnf"
PACKAGE_UPDATE_OPTIONS="update -y -qq"
Expand Down Expand Up @@ -235,6 +245,15 @@ fi
echo "${PRGNAME} [INFO] Updates."
/bin/sh -c "${PACKAGE_MANAGER_BIN} ${PACKAGE_UPDATE_OPTIONS}"

#
# Install SCL and devtoolset for CentOS 7
#
if [ "${SCL_INSTALL}" -eq 1 ]; then
echo "${PRGNAME} [INFO] SCL and devtoolset for CentOS 7."
/bin/sh -c "${PACKAGE_MANAGER_BIN} ${PACKAGE_INSTALL_OPTIONS} ${INSTALL_SCL_PACKAGES}"
/bin/sh -c "${PACKAGE_MANAGER_BIN} ${PACKAGE_INSTALL_OPTIONS} ${INSTALL_DEVTOOLSET_PACKAGES}"
fi

#
# Install packages ( with cppcheck )
#
Expand Down

0 comments on commit 29cf161

Please sign in to comment.