Skip to content

Commit

Permalink
HPCC-33205 Re-enable CentOS-7 builds
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Jan 16, 2025
1 parent 3612b8a commit 73a4489
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 47 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ jobs:
name: LN
cmake_options_extra: ""
ln: true
- os: centos-7
name: LN
ln: true
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
--mount source="${{ github.workspace }}/build",target=/hpcc-dev/build,type=bind,consistency=delegated \
--mount source="${{ github.workspace }}/.ccache",target=/root/.ccache,type=bind,consistency=delegated \
${{ steps.vars.outputs.docker_tag }} "\
cmake -G Ninja -S /hpcc-dev/${{ inputs.ln == true && 'LN' || 'HPCC-Platform' }} -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DCONTAINERIZED=${{ inputs.containerized == true && 'ON' || 'OFF' }} -DCPACK_STRIP_FILES=${{ inputs.strip-files == true && 'ON' || 'OFF' }} ${{ inputs.single-package == true && '-DINCLUDE_PLUGINS=ON' || '-D$plugin=ON' }} ${{ inputs.cmake-configuration }} ${{ inputs.cmake-configuration-ex }} && \
cmake -G Ninja -S /hpcc-dev/${{ inputs.ln == true && 'LN' || 'HPCC-Platform' }} -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DVCPKG_FILES_DIR=/hpcc-dev -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DCONTAINERIZED=${{ inputs.containerized == true && 'ON' || 'OFF' }} -DCPACK_STRIP_FILES=${{ inputs.strip-files == true && 'ON' || 'OFF' }} ${{ inputs.single-package == true && '-DINCLUDE_PLUGINS=ON' || '-D$plugin=ON' }} ${{ inputs.cmake-configuration }} ${{ inputs.cmake-configuration-ex }} && \
cmake --build /hpcc-dev/build --parallel ${{ inputs.upload-package == true && '--target package' || ''}}"
done
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'ubuntu-22.04'
- 'ubuntu-20.04'
- 'rockylinux-8'
- 'centos-7'
description: 'Operating System'
required: false
default: 'ubuntu-22.04'
Expand Down Expand Up @@ -168,6 +169,13 @@ jobs:
os: rockylinux-8
secrets: inherit

build-docker-centos-7:
if: ${{ contains('pull_request,push', github.event_name) }}
uses: ./.github/workflows/build-docker.yml
with:
os: centos-7
secrets: inherit

build-gh_runner-ubuntu-22_04:
if: ${{ contains('schedule,push', github.event_name) }}
uses: ./.github/workflows/build-gh_runner.yml
Expand Down
10 changes: 9 additions & 1 deletion cmake_modules/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ set(CMAKE_TOOLCHAIN_FILE ${HPCC_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cma
set(VCPKG_ROOT ${HPCC_SOURCE_DIR}/vcpkg)
set(VCPKG_INSTALLED_DIR "${VCPKG_FILES_DIR}/vcpkg_installed")
set(VCPKG_INSTALL_OPTIONS "--x-abi-tools-use-exact-versions;--downloads-root=${VCPKG_FILES_DIR}/vcpkg_downloads;--x-buildtrees-root=${VCPKG_FILES_DIR}/vcpkg_buildtrees;--x-packages-root=${VCPKG_FILES_DIR}/vcpkg_packages")
set(VCPKG_VERBOSE OFF)

if(WIN32)
set(VCPKG_HOST_TRIPLET "x64-windows" CACHE STRING "host triplet")
Expand All @@ -24,6 +23,15 @@ elseif(UNIX)
set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic" CACHE STRING "target triplet")
endif()

message("-- vcpkg settings:")
message("---- VCPKG_FILES_DIR: ${VCPKG_FILES_DIR}")
message("---- CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}")
message("---- VCPKG_ROOT: ${VCPKG_ROOT}")
message("---- VCPKG_INSTALLED_DIR: ${VCPKG_INSTALLED_DIR}")
message("---- VCPKG_INSTALL_OPTIONS: ${VCPKG_INSTALL_OPTIONS}")
message("---- VCPKG_HOST_TRIPLET: ${VCPKG_HOST_TRIPLET}")
message("---- VCPKG_TARGET_TRIPLET: ${VCPKG_TARGET_TRIPLET}")

# Create a catalog of the vcpkg dependencies ---
file(GLOB VCPKG_PACKAGES ${VCPKG_FILES_DIR}/vcpkg_packages/*/CONTROL)
list(APPEND VCPKG_PACKAGE_LIST "-----------------\n")
Expand Down
6 changes: 0 additions & 6 deletions dockerfiles/vcpkg/amazonlinux.dockerfile

This file was deleted.

34 changes: 18 additions & 16 deletions dockerfiles/vcpkg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ echo "DOCKER_PASSWORD: $DOCKER_PASSWORD"

docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

CMAKE_ALL_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON -DINCLUDE_PLUGINS=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DUSE_CPPUNIT=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
CMAKE_OPENBLAS_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=OFF -DECLBLAS=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
CMAKE_PLATFORM_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON -DPLATFORM=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
CMAKE_ALL_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON -DINCLUDE_PLUGINS=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DUSE_CPPUNIT=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON"
CMAKE_OPENBLAS_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=OFF -DECLBLAS=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF"
CMAKE_PLATFORM_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON -DPLATFORM=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF"

function doBuild() {
# docker pull "hpccsystems/platform-build-base-$1:$VCPKG_REF" || true
# docker pull "hpccsystems/platform-build-$1:$VCPKG_REF" || true
# docker pull "hpccsystems/platform-build-$1:$GITHUB_BRANCH" || true

docker build --progress plain --rm -f "$SCRIPT_DIR/$1.dockerfile" \
docker buildx build --progress plain --rm -f "$SCRIPT_DIR/$1.dockerfile" \
--build-arg DOCKER_NAMESPACE=$DOCKER_USERNAME \
--build-arg VCPKG_REF=$VCPKG_REF \
--cache-from hpccsystems/platform-build-$1:$VCPKG_REF \
Expand All @@ -48,42 +48,44 @@ function doBuild() {
# docker push hpccsystems/platform-build-$1:$VCPKG_REF
# docker push hpccsystems/platform-build-$1:$GITHUB_BRANCH

CMAKE_OPTIONS_EXTRA=""
if [ "$1" == "centos-7*" ]; then
CMAKE_OPTIONS_EXTRA="-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
elif [ "$1" == "amazonlinux" ]; then
CMAKE_OPTIONS_EXTRA="-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic"
fi
rm -f ./vcpkg/vcpkg
mkdir -p ./build-$1
CMAKE_OPTIONS_EXTRA="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"

mkdir -p $HOME/.ccache
docker run --rm \
--mount source="$(pwd)",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached \
--mount source="$(realpath ~)/.cache/vcpkg",target=/root/.cache/vcpkg,type=bind,consistency=cached \
--mount source="$HOME/.ccache",target=/root/.ccache,type=bind,consistency=cached \
hpccsystems/platform-build-$1:$VCPKG_REF \
"rm -rf /hpcc-dev/HPCC-Platform/build-$1/CMakeCache.txt /hpcc-dev/HPCC-Platform/build-$1/CMakeFiles && \
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/HPCC-Platform/build-$1 ${CMAKE_ALL_OPTIONS} ${CMAKE_OPTIONS_EXTRA} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache && \
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/HPCC-Platform/build-$1 ${CMAKE_ALL_OPTIONS} ${CMAKE_OPTIONS_EXTRA} && \
cmake --build /hpcc-dev/HPCC-Platform/build-$1 --parallel && \
echo 'Done'"

rm -f ./vcpkg/vcpkg

# sudo chown -R $(id -u):$(id -g) ./build-$1
# docker run -it --mount source="$(pwd)",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached build-ubuntu-22.04:latest bash
}

trap 'kill $(jobs -p)' EXIT
function cleanup() {
kill $(jobs -p)
rm -f ./vcpkg/vcpkg || true
}

trap 'cleanup; exit' EXIT

# ./vcpkg/bootstrap-vcpkg.sh
mkdir -p ./vcpkg-logs

if [ "$1" != "" ]; then
doBuild $1 &
doBuild $1
else
doBuild ubuntu-24.04 &> vcpkg-logs/ubuntu-24.04.log &
doBuild ubuntu-22.04 &> vcpkg-logs/ubuntu-22.04.log &
doBuild ubuntu-20.04 &> vcpkg-logs/ubuntu-20.04.log &
doBuild rockylinux-8 &> vcpkg-logs/rockylinux-8.log &
doBuild centos-8 &> vcpkg-logs/centos-8.log &
doBuild amazonlinux &> vcpkg-logs/amazonlinux.log &
doBuild centos-7-rh-python38 &> vcpkg-logs/centos-7-rh-python38.log &
doBuild centos-7 &> vcpkg-logs/centos-7.log &
fi

Expand Down
13 changes: 0 additions & 13 deletions dockerfiles/vcpkg/centos-7-rh-python38.dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions dockerfiles/vcpkg/centos-8.dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions plugins/couchbase/couchbaseembed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#endif

//Using cpp wrapper from https://github.com/couchbaselabs/libcouchbase-cxx
#include <cassert>
#include <libcouchbase/couchbase++.h>
#include <libcouchbase/couchbase++/views.h>
#include <libcouchbase/couchbase++/query.h>
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 4319 files
2 changes: 1 addition & 1 deletion vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "f7423ee180c4b7f40d43402c2feb3859161ef625"
"baseline": "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c"
},
"registries": [],
"overlay-ports": [
Expand Down
4 changes: 2 additions & 2 deletions vcpkg.json.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "hpcc-platform",
"version": "8.12.0",
"version": "9.10.0",
"dependencies": [
{
"name": "apr",
Expand Down Expand Up @@ -166,7 +166,6 @@
"name": "openssl",
"platform": "@VCPKG_OPENSSL@"
},
"pcre2",
{
"name": "opentelemetry-cpp",
"default-features": false,
Expand All @@ -175,6 +174,7 @@
"otlp-grpc"
]
},
"pcre2",
{
"name": "python3",
"platform": "@VCPKG_PYTHON3@ & windows"
Expand Down

0 comments on commit 73a4489

Please sign in to comment.