88 runs-on : linux-amd64-cpu8
99 container :
1010 image : rapidsai/ci-spark-rapids-jni:rockylinux8-cuda12.9.1
11+ permissions :
12+ id-token : write
1113 steps :
1214 - uses : actions/checkout@v4
1315 with :
@@ -17,10 +19,74 @@ jobs:
1719 - uses : actions/checkout@v4
1820 with :
1921 path : thirdparty/cudf
22+ - uses : aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
23+ with :
24+ role-to-assume : ${{ vars.AWS_ROLE_ARN }}
25+ aws-region : ${{ vars.AWS_REGION }}
26+ role-duration-seconds : 43200 # 12h
2027 - name : " Build spark-rapids-jni"
28+ env :
29+ SCCACHE_S3_KEY_PREFIX : spark-rapids-jni
30+ SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX : spark-rapids-jni/preprocessor
31+ SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE : true
2132 run : |
33+ set -euo pipefail
34+
35+ ###
36+ # Setup sccache client
37+ ###
38+
39+ # Install jq
40+ dnf -y install jq
41+
42+ # Download gha-tools
43+ wget https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin
44+
45+ # Build cluster endpoint
46+ export SCCACHE_DIST_SCHEDULER_URL="https://$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/').linux.sccache.rapids.nvidia.com"
47+
48+ export SCCACHE_DIST_AUTH_TOKEN="$(
49+ curl -fsSL -H "Authorization: Bearer $(
50+ curl -fsSL -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
51+ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=token.rapids.nvidia.com" \
52+ | jq -r '.value'
53+ )" https://token.rapids.nvidia.com/gh/token/exchange \
54+ | jq -r '.token')"
55+
56+ # Install sccache client
57+ . rapids-install-sccache
58+
59+ # Configure sccache
60+ . rapids-configure-sccache
61+
62+ export CPP_PARALLEL_LEVEL="$PARALLEL_LEVEL"
63+
64+ # Don't use the build cluster for CMake's compiler tests
65+ echo -e '\nset(ENV{SCCACHE_NO_DIST_COMPILE} "1")' >> thirdparty/cudf-pins/add_dependency_pins.cmake
66+
2267 echo "------------------------"
2368 env | sort
2469 echo "------------------------"
70+
71+ # Increase the nofile ulimit to build with as much parallelism as possible
72+ ulimit -n $(ulimit -Hn)
73+
74+ # Start the sccache daemon
75+ sccache --start-server
76+
77+ # Verify sccache version and distributed compilation
78+ sccache --show-stats
79+
80+ if sccache --dist-status 2>/dev/null | jq -er '.SchedulerStatus? != null' >/dev/null 2>&1; then
81+ echo "Distributed compilation is available:"
82+ sccache --dist-status | jq -r '["scheduler URL: " + .SchedulerStatus[0], "server count: " + (.SchedulerStatus[1].servers | length | tostring)][]';
83+ else
84+ echo "Error: Distributed compilation not available, check connectivity"
85+ cat "$SCCACHE_ERROR_LOG";
86+ exit 1
87+ fi
88+
2589 mkdir target
2690 source build/env.sh && CMAKE_CUDA_ARCHITECTURES=90 LIBCUDF_DEPENDENCY_MODE=latest USE_GDS=on ${sclCMD} build/buildcpp.sh
91+
92+ sccache --show-stats
0 commit comments