-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve cudf-spark-jni build workflow #23825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6de29d8
a11dc27
6024e27
4c1db1c
f32af55
518cf4f
f66e19c
dfbaf88
4f056b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| name: cudf-spark-jni | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| cudf_repository: &cudf_repository | ||
| description: 'cuDF repository' | ||
| type: string | ||
| required: false | ||
| default: 'NVIDIA/cudf' | ||
| cudf_commit: &cudf_commit | ||
| description: 'cuDF commit SHA or branch' | ||
| type: string | ||
| required: false | ||
| cudf_spark_jni_repository: &cudf_spark_jni_repository | ||
| description: 'cudf-spark-jni repository' | ||
| type: string | ||
| required: false | ||
| default: 'NVIDIA/cudf-spark-jni' | ||
| cudf_spark_jni_commit: &cudf_spark_jni_commit | ||
| description: 'cudf-spark-jni commit SHA or branch; defaults to cuDF RAPIDS_BRANCH' | ||
| type: string | ||
| required: false | ||
| workflow_call: | ||
| inputs: | ||
| cudf_repository: *cudf_repository | ||
| cudf_commit: *cudf_commit | ||
| cudf_spark_jni_repository: *cudf_spark_jni_repository | ||
| cudf_spark_jni_commit: *cudf_spark_jni_commit | ||
|
|
||
| jobs: | ||
| cudf-spark-jni-build: | ||
| runs-on: linux-amd64-cpu8 | ||
| container: | ||
| image: rapidsai/ci-spark-rapids-jni:rockylinux8-cuda12.9.1 | ||
| permissions: | ||
| contents: read | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that this looks like a new permission.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already granted by the calling workflows, and I think it's needed to check out the repo. No change should be needed here. |
||
| id-token: write | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| with: | ||
| persist-credentials: false | ||
| repository: ${{ inputs.cudf_repository }} | ||
| ref: ${{ inputs.cudf_commit }} | ||
| path: cudf-local | ||
| - id: rapids-branch | ||
| if: inputs.cudf_spark_jni_commit == '' | ||
| run: echo "branch=$(cat cudf-local/RAPIDS_BRANCH)" >> "$GITHUB_OUTPUT" | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| with: | ||
| persist-credentials: false | ||
| repository: ${{ inputs.cudf_spark_jni_repository }} | ||
| submodules: recursive | ||
| ref: ${{ inputs.cudf_spark_jni_commit || steps.rapids-branch.outputs.branch }} | ||
| path: cudf-spark-jni | ||
| - name: Use selected cuDF checkout | ||
| run: | | ||
| rm -rf cudf-spark-jni/thirdparty/cudf | ||
| mv cudf-local cudf-spark-jni/thirdparty/cudf | ||
| - name: Install gha-tools | ||
| run: | | ||
| dnf -y install jq | ||
| wget https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin | ||
| - uses: aws-actions/configure-aws-credentials@517a711dbcd0e402f90c77e7e2f81e849156e31d # v6.2.2 | ||
| with: | ||
| role-to-assume: ${{ vars.AWS_ROLE_ARN }} | ||
| aws-region: ${{ vars.AWS_REGION }} | ||
| role-duration-seconds: 43200 # 12h | ||
| - name: Setup sccache-dist | ||
| uses: rapidsai/shared-actions/setup-sccache-dist@main | ||
| env: | ||
| AWS_REGION: "${{ env.AWS_REGION }}" | ||
| AWS_ACCESS_KEY_ID: "${{ env.AWS_ACCESS_KEY_ID }}" | ||
| AWS_SECRET_ACCESS_KEY: "${{ env.AWS_SECRET_ACCESS_KEY }}" | ||
| - name: "Build cudf-spark-jni" | ||
| env: | ||
| SCCACHE_S3_KEY_PREFIX: cudf-spark-jni | ||
| SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX: cudf-spark-jni/preprocessor | ||
| SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE: true | ||
| working-directory: cudf-spark-jni | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| rapids-install-sccache | ||
| rapids-configure-sccache | ||
|
|
||
| # Don't use the build cluster for CMake's compiler tests | ||
| echo -e '\nset(ENV{SCCACHE_NO_DIST_COMPILE} "1")' >> thirdparty/cudf-pins/add_dependency_pins.cmake | ||
|
|
||
| mkdir target | ||
| source build/env.sh && CMAKE_CUDA_ARCHITECTURES=75 LIBCUDF_DEPENDENCY_MODE=latest USE_GDS=on ${sclCMD} build/buildcpp.sh | ||
|
|
||
| sccache --show-stats | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 6006
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 1565
Other (CWE-829): Inclusion of Functionality from Untrusted Control Sphere
Exploitability: Difficult
Pin executable dependencies to immutable references.
Use an image digest, a versioned
gha-toolsarchive with a checksum, and a reviewed commit SHA forsetup-sccache-dist.🤖 Prompt for AI Agents