Commit 09492fe5 authored by illsilin's avatar illsilin
Browse files

do not launch local sccache server

parent 09b65485
...@@ -215,7 +215,6 @@ def cmake_build(Map conf=[:]){ ...@@ -215,7 +215,6 @@ def cmake_build(Map conf=[:]){
} }
echo "invocation tag: ${invocation_tag}" echo "invocation tag: ${invocation_tag}"
def redis_pre_setup_cmd = pre_setup_cmd def redis_pre_setup_cmd = pre_setup_cmd
def local_pre_setup_cmd = pre_setup_cmd
if(check_host() && params.USE_SCCACHE && "${env.CK_SCCACHE}" != "null" && "${invocation_tag}" != "") { if(check_host() && params.USE_SCCACHE && "${env.CK_SCCACHE}" != "null" && "${invocation_tag}" != "") {
redis_pre_setup_cmd = pre_setup_cmd + """ redis_pre_setup_cmd = pre_setup_cmd + """
#!/bin/bash #!/bin/bash
...@@ -233,19 +232,6 @@ def cmake_build(Map conf=[:]){ ...@@ -233,19 +232,6 @@ def cmake_build(Map conf=[:]){
stunnel ../script/redis-cli.conf stunnel ../script/redis-cli.conf
../script/sccache_wrapper.sh --enforce_redis ../script/sccache_wrapper.sh --enforce_redis
""" """
local_pre_setup_cmd = pre_setup_cmd + """
#!/bin/bash
export ROCM_PATH=/opt/rocm
export SCCACHE_ENABLED=true
export SCCACHE_LOG_LEVEL=debug
export SCCACHE_IDLE_TIMEOUT=14400
export COMPILERS_HASH_DIR=/tmp/.sccache
export SCCACHE_BIN=/usr/local/.cargo/bin/sccache
export SCCACHE_EXTRAFILES=/tmp/.sccache/rocm_compilers_hash_file
export SCCACHE_C_CUSTOM_CACHE_BUSTER="${invocation_tag}"
echo \$SCCACHE_C_CUSTOM_CACHE_BUSTER
../script/sccache_wrapper.sh
"""
setup_args = " -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache " + setup_args setup_args = " -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache " + setup_args
} }
def setup_cmd = conf.get("setup_cmd", "${cmake_envs} cmake ${setup_args} .. ") def setup_cmd = conf.get("setup_cmd", "${cmake_envs} cmake ${setup_args} .. ")
...@@ -269,9 +255,9 @@ def cmake_build(Map conf=[:]){ ...@@ -269,9 +255,9 @@ def cmake_build(Map conf=[:]){
sh cmd1 sh cmd1
} }
catch(Exception err){ catch(Exception err){
echo "could not connect to redis server: ${err.getMessage()}. using local sccache." echo "could not connect to redis server: ${err.getMessage()}. will not use sccache."
def cmd2 = conf.get("cmd2", """ def cmd2 = conf.get("cmd2", """
${local_pre_setup_cmd} ${pre_setup_cmd}
""") """)
sh cmd2 sh cmd2
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment