From d91e103f93bbe290efb02b66d7aae2f40d43969b Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Mon, 25 Sep 2023 10:00:36 +0100 Subject: [PATCH] HPCC-30269 CentOS 7 + open-telemetry build issue Signed-off-by: Gordon Smith --- .github/workflows/build-vcpkg.yml | 5 +++++ dockerfiles/vcpkg/build.sh | 24 ++++++++++++++---------- dockerfiles/vcpkg/centos-7.dockerfile | 7 ++++--- vcpkg | 2 +- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-vcpkg.yml b/.github/workflows/build-vcpkg.yml index 70a4fa5f179..cff5384c2c6 100644 --- a/.github/workflows/build-vcpkg.yml +++ b/.github/workflows/build-vcpkg.yml @@ -143,6 +143,11 @@ jobs: id: buildx uses: docker/setup-buildx-action@v2 + - name: Pull previous images + run: | + docker pull ${{ steps.vars.outputs.docker_tag_candidate_base }} || true + docker pull ${{ steps.vars.outputs.docker_tag }} || true + - name: Create Build Image if: ${{ contains(matrix.event_name, github.event_name) && needs.preamble.outputs.platform }} uses: docker/build-push-action@v4 diff --git a/dockerfiles/vcpkg/build.sh b/dockerfiles/vcpkg/build.sh index ad833bed776..389bd300643 100755 --- a/dockerfiles/vcpkg/build.sh +++ b/dockerfiles/vcpkg/build.sh @@ -11,7 +11,7 @@ GITHUB_REF=$(git rev-parse --short=8 HEAD) cd vcpkg VCPKG_REF=$(git rev-parse --short=8 HEAD) cd .. -GITHUB_BRANCH=$(git log -50 --pretty=format:"%D" | tr ',' '\n' | grep 'upstream/' | awk 'NR==1 {sub("upstream/", ""); print}') +GITHUB_BRANCH=$(git log -50 --pretty=format:"%D" | tr ',' '\n' | grep 'upstream/' | awk 'NR==1 {sub("upstream/", ""); print}' | xargs) DOCKER_USERNAME="${DOCKER_USERNAME:-hpccbuilds}" DOCKER_PASSWORD="${DOCKER_PASSWORD:-none}" @@ -29,30 +29,34 @@ docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD CMAKE_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DINCLUDE_PLUGINS=ON -DSUPPRESS_V8EMBED=ON" function doBuild() { + docker pull "hpccsystems/platform-build-$1:$VCPKG_REF" || true + docker pull "hpccsystems/platform-build-$1:$GITHUB_BRANCH" || true + docker build --progress plain --pull --rm -f "$SCRIPT_DIR/$1.dockerfile" \ --build-arg DOCKER_NAMESPACE=$DOCKER_USERNAME \ --build-arg VCPKG_REF=$VCPKG_REF \ - -t hpccsystems/platform-build-$1:$VCPKG_REF \ - -t hpccsystems/platform-build-$1:$GITHUB_BRANCH \ --cache-from hpccsystems/platform-build-$1:$VCPKG_REF \ --cache-from hpccsystems/platform-build-$1:$GITHUB_BRANCH \ + -t hpccsystems/platform-build-$1:$VCPKG_REF \ + -t hpccsystems/platform-build-$1:$GITHUB_BRANCH \ "$SCRIPT_DIR/." - docker push hpccsystems/platform-build-$1:$VCPKG_REF & - docker push hpccsystems/platform-build-$1:$GITHUB_BRANCH & + # docker push hpccsystems/platform-build-$1:$VCPKG_REF + # docker push hpccsystems/platform-build-$1:$GITHUB_BRANCH docker run --rm --mount source="$(pwd)",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached hpccsystems/platform-build-$1:$VCPKG_REF \ "cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/HPCC-Platform/build-$1 ${CMAKE_OPTIONS} && \ cmake --build /hpcc-dev/HPCC-Platform/build-$1 --target package --parallel $(nproc)" + 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 } -doBuild ubuntu-23.04 -doBuild ubuntu-20.04 -doBuild amazonlinux -doBuild ubuntu-22.04 -doBuild centos-8 +# doBuild ubuntu-23.04 +# doBuild ubuntu-20.04 +# doBuild amazonlinux +# doBuild ubuntu-22.04 +# doBuild centos-8 doBuild centos-7 wait diff --git a/dockerfiles/vcpkg/centos-7.dockerfile b/dockerfiles/vcpkg/centos-7.dockerfile index 83791b07498..15524db7e21 100644 --- a/dockerfiles/vcpkg/centos-7.dockerfile +++ b/dockerfiles/vcpkg/centos-7.dockerfile @@ -2,11 +2,12 @@ ARG VCPKG_REF=latest FROM hpccsystems/platform-build-base-centos-7:$VCPKG_REF RUN yum install -y \ + epel-release \ java-11-openjdk-devel \ python3-devel \ - wget \ - epel-release -RUN yum update -y && yum install -y R-core-devel + wget && \ + yum update -y && yum install -y R-core-devel && \ + yum -y clean all && rm -rf /var/cache ENV Rcpp_package=Rcpp_0.12.19.tar.gz ENV RInside_package=RInside_0.2.12.tar.gz diff --git a/vcpkg b/vcpkg index 19a480bbf1f..962b4a7ac92 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 19a480bbf1f8a8f29f03fb5c719b560fd7ed7f65 +Subproject commit 962b4a7ac92ff22f11b903a2761182a0a9a768ac