Skip to content

Commit

Permalink
HPCC-30269 CentOS 7 + open-telemetry build issue
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Sep 25, 2023
1 parent 85f7c98 commit 9e8e4ef
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 14 additions & 10 deletions dockerfiles/vcpkg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand All @@ -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
Expand Down
9 changes: 6 additions & 3 deletions dockerfiles/vcpkg/centos-7.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-centos-7:$VCPKG_REF

RUN yum install -y \
bison \
epel-release \
flex \
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
Expand Down
2 changes: 1 addition & 1 deletion vcpkg

0 comments on commit 9e8e4ef

Please sign in to comment.