Skip to content

adapt to latest workflows #6303

adapt to latest workflows

adapt to latest workflows #6303

Workflow file for this run

name: pr
on:
push:
branches:
- "pull-request/[0-9]+"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# TODO: put this in a shared org-wide secret?
OTEL_SERVICE_NAME: 'pr-cugraph'
OTEL_EXPORTER_OTLP_ENDPOINT: https://tempo.gha-runners.nvidia.com:4318
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf"
OTEL_RESOURCE_ATTRIBUTES: "git.repository=${{github.repository}},git.ref=${{github.ref}},git.sha=${{github.sha}},git.job_url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
# Set these to point the shared-actions clones at a branch on the rapidsai/shared-actions repo
SHARED_ACTIONS_REPO: "rapidsai/shared-actions"
SHARED_ACTIONS_REF: "main"
jobs:
reexports:
# Re-export secrets and env vars to make them available to shared actions and workflows
# You can't use env.SOMETHING in a "with:" section when calling a shared workflow.
runs-on: ubuntu-latest
outputs:
endpoint: "${{steps.reexport.outputs.endpoint}}"
service_name: "${{steps.reexport.outputs.service_name}}"
otel_resource_attributes: "${{steps.reexport.outputs.otel_resource_attributes}}"
shared_actions_repo: "${{steps.reexport.outputs.shared_actions_repo}}"
shared_actions_ref: "${{steps.reexport.outputs.shared_actions_ref}}"
steps:
- id: reexport
# NOTE: certs are base-64 encoded so that they're easier to handle here
run: |
echo endpoint="${OTEL_EXPORTER_OTLP_ENDPOINT}" >> ${GITHUB_OUTPUT}
echo service_name="${OTEL_SERVICE_NAME}" >> ${GITHUB_OUTPUT}
echo otel_resource_attributes="${OTEL_RESOURCE_ATTRIBUTES}" >> ${GITHUB_OUTPUT}
echo shared_actions_ref="${SHARED_ACTIONS_REF}" >> ${GITHUB_OUTPUT}
echo shared_actions_repo="${SHARED_ACTIONS_REPO}" >> ${GITHUB_OUTPUT}
top-level-telemetry-traceparent:
runs-on: ubuntu-latest
needs:
- reexports
outputs:
traceparent: "${{steps.traceparent.outputs.traceparent}}"
env:
OTEL_SERVICE_NAME: ${{needs.reexports.outputs.service_name}}
steps:
- name: Clone shared-actions repo
uses: actions/checkout@v4
with:
repository: ${{env.SHARED_ACTIONS_REPO}}
ref: ${{env.SHARED_ACTIONS_REF}}
path: ./shared-actions
- id: traceparent
uses: ./shared-actions/telemetry-traceparent
pr-builder:
needs:
- changed-files
- checks
- conda-cpp-build
- conda-cpp-tests
- conda-cpp-checks
- conda-notebook-tests
- conda-python-build
- conda-python-tests
- docs-build
- wheel-build-pylibcugraph
- wheel-tests-pylibcugraph
- wheel-build-cugraph
- wheel-tests-cugraph
- wheel-build-nx-cugraph
- wheel-tests-nx-cugraph
- wheel-build-cugraph-dgl
- wheel-tests-cugraph-dgl
- wheel-build-cugraph-pyg
- wheel-tests-cugraph-pyg
- wheel-build-cugraph-equivariant
- wheel-tests-cugraph-equivariant
- devcontainer
- reexports
- top-level-telemetry-traceparent
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@add-telemetry
if: always()
with:
needs: ${{ toJSON(needs) }}
changed-files:
secrets: inherit
needs: [reexports, top-level-telemetry-traceparent]
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@add-telemetry
with:
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
files_yaml: |
test_cpp:
- '**'
- '!.devcontainers/**'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
- '!img/**'
- '!mg_utils/**'
- '!notebooks/**'
- '!python/**'
- '!readme_pages/**'
test_notebooks:
- '**'
- '!.devcontainers/**'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
test_python:
- '**'
- '!.devcontainers/**'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
- '!img/**'
- '!notebooks/**'
checks:
secrets: inherit
needs: [reexports, top-level-telemetry-traceparent]
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@add-telemetry
with:
enable_check_generated_files: false
ignored_pr_jobs: "final-telemetry-update"
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
conda-cpp-build:
needs:
- checks
- reexports
- top-level-telemetry-traceparent
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@add-telemetry
with:
build_type: pull-request
node_type: cpu32
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
conda-cpp-tests:
needs: [conda-cpp-build, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
conda-cpp-checks:
needs: [conda-cpp-build, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@add-telemetry
with:
build_type: pull-request
enable_check_symbols: true
symbol_exclusions: (cugraph::ops|hornet|void writeEdgeCountsKernel|void markUniqueOffsetsKernel)
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
conda-python-build:
needs: [conda-cpp-build, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@add-telemetry
with:
build_type: pull-request
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
conda-python-tests:
needs: [conda-python-build, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
conda-notebook-tests:
needs: [conda-python-build, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_notebooks
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
run_script: "ci/test_notebooks.sh"
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
docs-build:
needs: [conda-python-build, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@add-telemetry
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
run_script: "ci/build_docs.sh"
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-build-pylibcugraph:
needs: [checks, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@add-telemetry
with:
build_type: pull-request
script: ci/build_wheel_pylibcugraph.sh
extra-repo: rapidsai/cugraph-ops
extra-repo-sha: branch-24.12
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY
node_type: cpu32
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-tests-pylibcugraph:
needs: [wheel-build-pylibcugraph, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_pylibcugraph.sh
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-build-cugraph:
needs: [wheel-tests-pylibcugraph, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@add-telemetry
with:
build_type: pull-request
script: ci/build_wheel_cugraph.sh
extra-repo: rapidsai/cugraph-ops
extra-repo-sha: branch-24.12
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-tests-cugraph:
needs: [wheel-build-cugraph, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_cugraph.sh
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-build-nx-cugraph:
needs:
- reexports
- top-level-telemetry-traceparent
- wheel-tests-pylibcugraph
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@add-telemetry
with:
build_type: pull-request
script: ci/build_wheel_nx-cugraph.sh
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-tests-nx-cugraph:
needs: [wheel-build-nx-cugraph, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_nx-cugraph.sh
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-build-cugraph-dgl:
needs: [wheel-tests-cugraph, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@add-telemetry
with:
build_type: pull-request
script: ci/build_wheel_cugraph-dgl.sh
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-tests-cugraph-dgl:
needs: [wheel-build-cugraph-dgl, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_cugraph-dgl.sh
matrix_filter: map(select(.ARCH == "amd64"))
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-build-cugraph-pyg:
needs: [wheel-tests-cugraph, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@add-telemetry
with:
build_type: pull-request
script: ci/build_wheel_cugraph-pyg.sh
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-tests-cugraph-pyg:
needs: [wheel-build-cugraph-pyg, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_cugraph-pyg.sh
matrix_filter: map(select(.ARCH == "amd64"))
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-build-cugraph-equivariant:
secrets: inherit
needs: [reexports, top-level-telemetry-traceparent]
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@add-telemetry
with:
build_type: pull-request
script: ci/build_wheel_cugraph-equivariant.sh
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
wheel-tests-cugraph-equivariant:
needs: [wheel-build-cugraph-equivariant, changed-files, reexports, top-level-telemetry-traceparent]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@add-telemetry
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_cugraph-equivariant.sh
matrix_filter: map(select(.ARCH == "amd64"))
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
devcontainer:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@add-telemetry
with:
arch: '["amd64"]'
cuda: '["12.5"]'
node_type: cpu32
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY
default_endpoint: "${{needs.reexports.outputs.endpoint}}"
otel_resource_attributes: "${{needs.reexports.outputs.otel_resource_attributes}}"
traceparent: ${{ needs.top-level-telemetry-traceparent.outputs.traceparent }}
shared_actions_repo: ${{needs.reexports.outputs.shared_actions_repo}}
shared_actions_ref: ${{needs.reexports.outputs.shared_actions_ref}}
build_command: |
sccache -z;
build-all --verbose -j$(nproc --ignore=1) -DBUILD_CUGRAPH_MG_TESTS=ON;
sccache -s;
final-telemetry-update:
runs-on: ubuntu-latest
needs: [pr-builder, reexports, top-level-telemetry-traceparent]
steps:
- name: Get final timestamp
id: timestamp
run:
echo "FINAL_TIME=$(date +%s.%N)" >> ${GITHUB_OUTPUT}
# Main purpose of this traceparent line here is to ensure that otel-cli is installed.
- name: Get job traceparent
uses: rapidsai/shared-actions/telemetry-traceparent@add-telemetry
- name: Write certificate files for mTLS
run: |
mkdir -p /tmp/certs
cat << EOF > ${OTEL_EXPORTER_OTLP_CERTIFICATE}
${{ secrets.OTEL_EXPORTER_OTLP_CA_CERTIFICATE }}
EOF
cat << EOF > ${OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE}
${{ secrets.OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE }}
EOF
cat << EOF > ${OTEL_EXPORTER_OTLP_CLIENT_KEY}
${{ secrets.OTEL_EXPORTER_OTLP_CLIENT_KEY }}
EOF
- name: Update root span with final completion time
if: always()
uses: rapidsai/shared-actions/telemetry-create-span@add-telemetry
with:
service: ${{needs.telemetry-setup.outputs.top_level_service_name}}
name: "end-of-job update"
default_endpoint: "${{needs.telemetry-setup.outputs.endpoint}}"
traceparent: ${{needs.telemetry-setup.outputs.traceparent}}
start_time: ${{needs.telemetry-setup.outputs.start_time}}
end_time: ${{steps.timestamp.outputs.FINAL_TIME}}