Skip to content

Commit

Permalink
HPCC-31591 Force vcpkg build to use exact version of tools
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Apr 12, 2024
1 parent 397809c commit 96a6857
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 96 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ jobs:
- os: ubuntu-20.04
- os: centos-8
- os: centos-7
cmake_options_extra: ""
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
- os: amazonlinux
cmake_options_extra: ""
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic"
- os: ubuntu-22.04
name: LN k8s
ln: true
Expand All @@ -118,7 +118,7 @@ jobs:
ln: true
- os: centos-7
name: LN
cmake_options_extra: ""
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
ln: true
fail-fast: false

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ jobs:
event_name: "schedule"
- os: centos-7
event_name: "pull_request"
cmake_options_extra: ""
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
- os: amazonlinux
event_name: "schedule"
cmake_options_extra: ""
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic"
- os: centos-7
name: LN
cmake_options_extra: ""
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
ln: true
event_name: "schedule"
fail-fast: false
Expand Down
5 changes: 2 additions & 3 deletions cmake_modules/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ if ("${VCPKG_DONE}" STREQUAL "")
set(VCPKG_FILES_DIR "${CMAKE_BINARY_DIR}" CACHE STRING "Folder for vcpkg download, build and installed files")
set(CMAKE_TOOLCHAIN_FILE ${HPCC_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake)
set(VCPKG_ROOT ${HPCC_SOURCE_DIR}/vcpkg)
set(VCPKG_OVERLAY_PORTS ${HPCC_SOURCE_DIR}/vcpkg_overlays;${HPCC_SOURCE_DIR}/vcpkg/overlays)
set(VCPKG_INSTALLED_DIR "${VCPKG_FILES_DIR}/vcpkg_installed")
set(VCPKG_INSTALL_OPTIONS "--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_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(APPLE OR WIN32)
elseif(UNIX)
set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic" CACHE STRING "target triplet" FORCE)
set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic" CACHE STRING "target triplet")
endif()

# Create a catalog of the vcpkg dependencies ---
Expand Down
13 changes: 2 additions & 11 deletions dockerfiles/vcpkg/amazonlinux.dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-amazonlinux:$VCPKG_REF

RUN amazon-linux-extras install java-openjdk11 && yum install -y \
java-11-openjdk-devel \
python3-devel \
epel-release
RUN yum install -y \
R-core-devel \
R-Rcpp-devel \
R-RInside-devel

WORKDIR /hpcc-dev

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

CMD ["/bin/bash"]
19 changes: 2 additions & 17 deletions dockerfiles/vcpkg/centos-7.dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-centos-7:$VCPKG_REF

RUN yum install -y \
java-11-openjdk-devel \
python3-devel \
wget \
epel-release
RUN yum update -y && yum install -y R-core-devel

ENV Rcpp_package=Rcpp_0.12.19.tar.gz
ENV RInside_package=RInside_0.2.12.tar.gz

RUN wget https://cran.r-project.org/src/contrib/Archive/Rcpp/${Rcpp_package}
RUN wget https://cran.r-project.org/src/contrib/Archive/RInside/${RInside_package}
RUN R CMD INSTALL ${Rcpp_package} ${RInside_package}
RUN rm -f ${Rcpp_package} ${RInside_package}

WORKDIR /hpcc-dev

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

CMD ["/bin/bash"]
14 changes: 2 additions & 12 deletions dockerfiles/vcpkg/centos-8.dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-centos-8:$VCPKG_REF

RUN yum remove -y python3.11 java-1.* && yum install -y \
java-11-openjdk-devel \
python3-devel \
epel-release

RUN yum install -y \
R-core-devel \
R-Rcpp-devel \
R-RInside-devel

WORKDIR /hpcc-dev

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

CMD ["/bin/bash"]
16 changes: 2 additions & 14 deletions dockerfiles/vcpkg/ubuntu-20.04.dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-ubuntu-20.04:$VCPKG_REF

ENV RInside_package=RInside_0.2.14.tar.gz

RUN apt-get update && apt-get install --no-install-recommends -y \
default-jdk \
python3-dev \
wget \
r-base \
r-cran-rcpp
RUN wget https://cran.r-project.org/src/contrib/Archive/RInside/${RInside_package}
RUN R CMD INSTALL ${RInside_package}
RUN rm -f ${RInside_package}

WORKDIR /hpcc-dev

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

CMD ["/bin/bash"]
18 changes: 2 additions & 16 deletions dockerfiles/vcpkg/ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-ubuntu-22.04:$VCPKG_REF

RUN apt-get update && apt-get install --no-install-recommends -y \
default-jdk \
ninja-build \
python3-dev \
rsync \
fop \
libsaxonb-java \
r-base \
r-cran-rcpp \
r-cran-rinside \
r-cran-inline

RUN git config --global --add safe.directory '*'

WORKDIR /hpcc-dev

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

CMD ["/bin/bash"]
18 changes: 2 additions & 16 deletions dockerfiles/vcpkg/ubuntu-22.10.dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-ubuntu-22.10:$VCPKG_REF

RUN apt-get update && apt-get install --no-install-recommends -y \
default-jdk \
ninja-build \
python3-dev \
rsync \
fop \
libsaxonb-java \
r-base \
r-cran-rcpp \
r-cran-rinside \
r-cran-inline

RUN git config --global --add safe.directory '*'

WORKDIR /hpcc-dev

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

CMD ["/bin/bash"]
16 changes: 16 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "f6a5d4e8eb7476b8d7fc12a56dff300c1c986131"
},
"registries": [],
"overlay-ports": [
"./vcpkg_overlays",
"./vcpkg/overlays"
],
"overlay-triplets": [
"./vcpkg_overlays",
"./vcpkg/overlays"
]
}

0 comments on commit 96a6857

Please sign in to comment.