Skip to content

Commit f26a33c

Browse files
authored
[C++] Install cmake using cbdep (#78)
1 parent 1139f04 commit f26a33c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

cxx/cxx-scripted-build-pipeline.groovy

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
def CMAKE_VERSION = "3.31.8"
12
def PLATFORMS = [ "ubuntu20", "rockylinux9", "centos8", "macos", "m1", "amzn2", "qe-grav2-amzn2", "alpine", "windows", "qe-ubuntu20-arm64", "qe-ubuntu22-arm64", "qe-rhel9-arm64" ]
23
def CB_VERSIONS = [
34
"71release": [tag: "7.1-release"],
@@ -82,12 +83,21 @@ stage("build") {
8283
envs.push("CB_CC=gcc")
8384
envs.push("CB_CXX=g++")
8485
}
86+
path = PATH
8587
if (platform == "windows") {
88+
bat("cbdep install -d deps cmake ${CMAKE_VERSION}")
89+
path = "$WORKSPACE/deps/cmake-$CMAKE_VERSION/bin;" + path
90+
8691
bat("cbdep install -d deps openssl 1.1.1g-sdk2")
87-
path = PATH
8892
path += ";$WORKSPACE/deps/openssl-1.1.1g-sdk2"
89-
envs.push("PATH=$path")
93+
} else if (platform != "alpine") {
94+
// TODO(DC): This doesn't work on alpine (see: https://couchbase.slack.com/archives/CC679H71R/p1756221557777939)
95+
// The cmake version it comes with is high enough, so let's skip it for now
96+
sh("cbdep install -d deps cmake ${CMAKE_VERSION}")
97+
path = "$WORKSPACE/deps/cmake-$CMAKE_VERSION/bin:" + path
9098
}
99+
echo("PATH=$path")
100+
envs.push("PATH=$path")
91101
withEnv(envs) {
92102
dir("ws_${platform}/couchbase-cxx-client") {
93103
if (platform == "windows") {

0 commit comments

Comments
 (0)