Skip to content

Commit

Permalink
Merge branch 'branch-24.06' into wence/fix/15448
Browse files Browse the repository at this point in the history
  • Loading branch information
wence- authored Apr 16, 2024
2 parents f45b11f + 8919690 commit e7a6c6b
Show file tree
Hide file tree
Showing 218 changed files with 6,869 additions and 4,633 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,21 @@ jobs:
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: dask_cudf
trigger-pandas-tests:
if: inputs.build_type == 'nightly'
needs: wheel-build-cudf
runs-on: ubuntu-latest
steps:
- name: Checkout code repo
uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
persist-credentials: false
- name: Trigger pandas-tests
env:
GH_TOKEN: ${{ github.token }}
run: |
gh workflow run pandas-tests.yaml \
-f branch=${{ inputs.branch }} \
-f sha=${{ inputs.sha }} \
-f date=${{ inputs.date }}
27 changes: 27 additions & 0 deletions .github/workflows/pandas-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Pandas Test Job

on:
workflow_dispatch:
inputs:
branch:
required: true
type: string
date:
required: true
type: string
sha:
required: true
type: string

jobs:
pandas-tests:
# run the Pandas unit tests
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.9" and .CUDA_VER == "12.2.2" ))
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
script: ci/cudf_pandas_scripts/pandas-tests/run.sh main
56 changes: 21 additions & 35 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- conda-python-cudf-tests
- conda-python-other-tests
- conda-java-tests
- static-configure
- conda-notebook-tests
- docs-build
- wheel-build-cudf
Expand All @@ -29,8 +30,7 @@ jobs:
- devcontainer
- unit-tests-cudf-pandas
- pandas-tests
#- pandas-tests-diff
#- pandas-tests-diff-comment
- pandas-tests-diff
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
checks:
Expand Down Expand Up @@ -88,6 +88,16 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci-conda:latest"
run_script: "ci/test_java.sh"
static-configure:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
# Use the wheel container so we can skip conda solves and since our
# primary static consumers (Spark) are not in conda anyway.
container_image: "rapidsai/ci-wheel:latest"
run_script: "ci/configure_cpp_static.sh"
conda-notebook-tests:
needs: conda-python-build
secrets: inherit
Expand Down Expand Up @@ -164,40 +174,16 @@ jobs:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.9" and .CUDA_VER == "12.2.2" ))
build_type: pull-request
script: ci/cudf_pandas_scripts/pandas-tests/run.sh pr
# Hide test failures because they exceed the GITHUB_STEP_SUMMARY output limit.
test_summary_show: "none"
#pandas-tests-diff:
# # diff the results of running the Pandas unit tests and publish a job summary
# needs: [pandas-tests-main, pandas-tests-pr]
# secrets: inherit
# # This branch exports a `job_output` output that the downstream job reads.
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# node_type: cpu4
# build_type: pull-request
# run_script: ci/cudf_pandas_scripts/pandas-tests/diff.sh
#pandas-tests-diff-comment:
# # Post comment of pass/fail rate on PR
# runs-on: ubuntu-latest
# needs: pandas-tests-diff
# steps:
# - uses: actions/github-script@v6
# with:
# script: |
# const branch = process.env.GITHUB_REF_NAME;
# const prBranchPattern = new RegExp("^pull-request/[0-9]+$");
# if (!branch.match(prBranchPattern)) {
# throw new Error(`${branch} does not match PR branch pattern.`);
# }
# const summary_url = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
# const prNumber = branch.split("/")[1];
# const summary_comment = `${{ needs.pandas-tests-diff.outputs.job_output }}`;
# github.rest.issues.createComment({
# issue_number: prNumber,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: `${summary_comment}\n\nHere is [a link to the full test summary](${summary_url}).\n`
# })
pandas-tests-diff:
# diff the results of running the Pandas unit tests and publish a job summary
needs: pandas-tests
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@patch-1
with:
node_type: cpu4
build_type: pull-request
run_script: "ci/cudf_pandas_scripts/pandas-tests/diff.sh"
120 changes: 120 additions & 0 deletions .github/workflows/status.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Custom GH Status from Workflow Artifacts

on:
workflow_run:
workflows: ["pr"]
types:
- completed

jobs:
process_artifacts:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
outputs:
artifact_downloaded: ${{ steps.download_artifact.outputs.artifact_downloaded }}
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: write
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: write
steps:
- name: Download artifact
id: download_artifact
uses: actions/github-script@v7
with:
retries: 3
script: |
const fs = require('fs');
const path = require('path');
const artifactName = 'gh-status';
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
// Find the specific artifact
const artifact = allArtifacts.data.artifacts.find(artifact => artifact.name === artifactName);
if (!artifact) {
core.info(`Artifact "${artifactName}" not found. Exiting safely.`);
core.setOutput('artifact_downloaded', 'false');
return;
}
core.setOutput('artifact_downloaded', 'true');
// Download the artifact
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: 'zip',
});
// Write the artifact to a file
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${artifactName}.zip`, Buffer.from(download.data));
- name: 'Unzip artifact'
if: ${{ steps.download_artifact.outputs.artifact_downloaded == 'true' }}
run: unzip 'gh-status.zip'

- name: Create status
if: ${{ steps.download_artifact.outputs.artifact_downloaded == 'true' }}
uses: actions/github-script@v7
env:
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
ATTEMPTS: ${{ github.event.workflow_run.run_attempt }}
with:
retries: 3
script: |
// Load the JSON content
const contentJSON = require('./gh-status.json');
const {
job_name: JOB_NAME,
context: CUSTOM_CONTEXT = 'Custom CI Status Check',
description: CUSTOM_DESCRIPTION = 'Custom CI Status description',
target_url: CUSTOM_TARGET_URL,
state: CUSTOM_STATE = 'success'
} = contentJSON;
// Fetch all jobs using pagination
const jobs = await github.paginate(
github.rest.actions.listJobsForWorkflowRun,
{
owner: context.repo.owner,
repo: context.repo.repo,
run_id: process.env.WORKFLOW_RUN_ID,
}
);
// Fetch the first job ID from the workflow run
const job = jobs.find(job => job.name === JOB_NAME);
const JOB_ID = job ? job.id : null;
// Set default target URL if not defined
const targetUrl = CUSTOM_TARGET_URL || `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.WORKFLOW_RUN_ID}/attempts/${process.env.ATTEMPTS}#summary-${JOB_ID}`;
console.log("job id: ", JOB_ID);
console.log("state: ", CUSTOM_STATE);
console.log("target url: ", targetUrl);
console.log("description: ", CUSTOM_DESCRIPTION);
console.log("context: ", CUSTOM_CONTEXT);
// Create status
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: process.env.COMMIT_SHA,
state: CUSTOM_STATE,
target_url: targetUrl,
description: CUSTOM_DESCRIPTION,
context: CUSTOM_CONTEXT,
});
21 changes: 10 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci-conda:latest"
run_script: "ci/test_cpp_memcheck.sh"
static-configure:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
# Use the wheel container so we can skip conda solves and since our
# primary static consumers (Spark) are not in conda anyway.
container_image: "rapidsai/ci-wheel:latest"
run_script: "ci/configure_cpp_static.sh"
conda-python-cudf-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
Expand Down Expand Up @@ -115,14 +125,3 @@ jobs:
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
script: ci/cudf_pandas_scripts/run_tests.sh
pandas-tests:
# run the Pandas unit tests
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
script: ci/cudf_pandas_scripts/pandas-tests/run.sh main
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ repos:
pass_filenames: false
verbose: true
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [tomli]
Expand All @@ -129,7 +129,7 @@ repos:
- id: rapids-dependency-file-generator
args: ["--clean"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
rev: v0.3.4
hooks:
- id: ruff
files: python/.*$
Expand Down
Loading

0 comments on commit e7a6c6b

Please sign in to comment.