diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 81211e4dedb..2e14db5d9f1 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -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/ccache-action@v1.2 with: @@ -135,6 +140,23 @@ 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 + load: true + 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: | diff --git a/dockerfiles/vcpkg/build.sh b/dockerfiles/vcpkg/build.sh index d4247e37f15..c608aab9a0c 100755 --- a/dockerfiles/vcpkg/build.sh +++ b/dockerfiles/vcpkg/build.sh @@ -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" diff --git a/dockerfiles/vcpkg/centos-7-rh-python38.dockerfile b/dockerfiles/vcpkg/centos-7-rh-python38.dockerfile index 8752d764d67..c59a9f5c2df 100644 --- a/dockerfiles/vcpkg/centos-7-rh-python38.dockerfile +++ b/dockerfiles/vcpkg/centos-7-rh-python38.dockerfile @@ -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 diff --git a/dockerfiles/vcpkg/centos-7.dockerfile b/dockerfiles/vcpkg/centos-7.dockerfile index 04d1ba29af5..1e6b580b874 100644 --- a/dockerfiles/vcpkg/centos-7.dockerfile +++ b/dockerfiles/vcpkg/centos-7.dockerfile @@ -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"] diff --git a/vcpkg b/vcpkg index ddf0c6df807..9cfc9a37c21 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit ddf0c6df807a454c74f33d7ba75037314bf9a79c +Subproject commit 9cfc9a37c21c7e0bf4c08aa5d491b0a6b1ba2de1