Skip to content

Commit

Permalink
HPCC-33379 CentOS-7 and Python 3.8 build failing
Browse files Browse the repository at this point in the history
Bump vcpkg submodule to latest

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Feb 7, 2025
1 parent 0675b2d commit c222bc8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,27 @@ jobs:
run: |
branch_label_1=${{ github.base_ref }}
branch_label_2=$(echo ${{ github.ref }} | cut -d'/' -f3)
echo "branch_label=${branch_label_1:-$branch_label_2}" >> $GITHUB_OUTPUT
branch_label=${branch_label_1:-$branch_label_2}
echo "branch_label=$branch_label" >> $GITHUB_OUTPUT
vcpkg_sha_short=$(git rev-parse --short=8 HEAD)
echo "vcpkg_sha_short=$vcpkg_sha_short" >> $GITHUB_OUTPUT
docker_build_label=hpccsystems/platform-build-base-${{ inputs.os }}
docker_build_label=hpccsystems/platform-build-${{ inputs.os }}
echo "docker_tag=$docker_build_label:$vcpkg_sha_short" >> $GITHUB_OUTPUT
echo "docker_tag_candidate_base=$docker_build_label:$branch_label" >> $GITHUB_OUTPUT
- name: Print vars
shell: "bash"
run: |
echo "${{ toJSON(steps.vars.outputs) }}"
- uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Pull Build Image
run: |
docker pull ${{ steps.vars.outputs.docker_tag }} || true
docker pull ${{ steps.vars.outputs.docker_tag_candidate_base }} || true
- uses: hendrikmuhs/[email protected]
with:
Expand All @@ -135,6 +140,22 @@ jobs:
docker-${{ inputs.os }}-${{ inputs.build-type }}-
docker-${{ inputs.os }}-
- name: Docker build image
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
file: HPCC-Platform/dockerfiles/vcpkg/${{ inputs.os }}.dockerfile
context: HPCC-Platform/dockerfiles/vcpkg/.
push: false
build-args: |
VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }}
tags: |
${{ steps.vars.outputs.docker_tag }}
${{ steps.vars.outputs.docker_tag_candidate_base }}
cache-from: |
type=registry,ref=${{ steps.vars.outputs.docker_tag }}
type=registry,ref=${{ steps.vars.outputs.docker_tag_candidate_base }}
- name: CMake Configure and Build
shell: "bash"
run: |
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/vcpkg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function doBuild() {

rm -f ./vcpkg/vcpkg
mkdir -p ./build-$1
if [ "$1" == "centos-7*" ]; then
if [ "$1" == "centos-7" ] || [ "$1" == "centos-7-rh-python38" ]; then
CMAKE_OPTIONS_EXTRA="-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
elif [ "$1" == "amazonlinux" ]; then
CMAKE_OPTIONS_EXTRA="-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/vcpkg/centos-7-rh-python38.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-centos-7:$VCPKG_REF

RUN yum remove -y python3 python3-devel && \
yum install -y rh-python38 rh-python38-python-devel && \
yum install -y flex bison rh-python38 rh-python38-python-devel && \
yum clean all

RUN echo "source /opt/rh/rh-python38/enable" >> /etc/bashrc
Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/vcpkg/centos-7.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-centos-7:$VCPKG_REF

RUN yum install -y flex bison && \
yum clean all

ENTRYPOINT ["/bin/bash", "--login", "-c"]

CMD ["/bin/bash"]

0 comments on commit c222bc8

Please sign in to comment.