|
1 | | -on: |
2 | | - # TODO: change to cron-based schedule one this is working |
3 | | - push: |
4 | | - branches: |
5 | | - - main |
| 1 | +# Based off https://github.com/rapidsai/cudf/blob/branch-25.02/.github/workflows/pandas-tests.yaml |
| 2 | +name: Test dask-upstream |
6 | 3 |
|
| 4 | +on: |
| 5 | + schedule: |
| 6 | + # 18:15 UTC daily. |
| 7 | + # We want to run after the nightly pipeline finishes. |
| 8 | + # https://github.com/rapidsai/workflows/blob/main/.github/workflows/nightly-pipeline-trigger.yaml is |
| 9 | + # currently set to 5:00 UTC and takes ~12 hours |
| 10 | + - cron: "15 18 * * *" |
| 11 | + |
7 | 12 | jobs: |
8 | | - test: |
9 | | - name: "Test dask and distributed" |
10 | | - # TODO: change to appropriate image |
11 | | - runs-on: "linux-amd64-gpu-v100-latest-1" |
12 | | - container: |
13 | | - image: rapidsai/distributed:24.12-cuda11.8.0-devel-ubuntu20.04-py3.12 |
14 | | - env: |
15 | | - NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} |
| 13 | + setup: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + outputs: |
| 16 | + date: ${{ steps.date.outputs.date }} |
| 17 | + branch: ${{ steps.branch.outputs.branch }} |
16 | 18 | steps: |
17 | | - - name: Checkout ourselves |
18 | | - uses: actions/checkout@v4 |
19 | | - with: |
20 | | - path: utils |
21 | | - - name: Checkout dask |
22 | | - uses: actions/checkout@v4 |
23 | | - with: |
24 | | - repository: dask/dask |
25 | | - path: dask |
26 | | - - name: Checkout distributed |
27 | | - uses: actions/checkout@v4 |
28 | | - with: |
29 | | - repository: dask/distributed |
30 | | - path: distributed |
31 | | - - name: Run |
32 | | - run: | |
33 | | - (cd dask; git rev-parse HEAD; |
34 | | - cd ../distributed; git rev-parse HEAD) | tee commit-hashes.txt |
35 | | - - name: Upload commit hashes |
36 | | - uses: actions/upload-artifact@v4 |
37 | | - with: |
38 | | - name: commit-hashes.txt |
39 | | - path: commit-hashes.txt |
40 | | - - name: Setup python |
41 | | - uses: actions/setup-python@v5 |
42 | | - with: |
43 | | - python-version: 3.12 |
44 | | - - name: Get last artifact URL from last run |
45 | | - id: get_last_id |
46 | | - run: | |
47 | | - pip install requests |
48 | | - VAL=$(python utils/get.py) |
49 | | - echo "${VAL}" |
50 | | - echo "${VAL}" >> $GITHUB_OUTPUT |
51 | | - - name: Download artifact from last run if exists |
52 | | - if: ${{ fromJSON(steps.get_last_id.outputs.INFO).exists }} |
53 | | - continue-on-error: true |
54 | | - uses: actions/download-artifact@v4 |
55 | | - with: |
56 | | - name: commit-hashes.txt |
57 | | - path: previous-run |
58 | | - github-token: ${{ secrets.GITHUB_TOKEN }} |
59 | | - run-id: ${{ fromJSON(steps.get_last_id.outputs.INFO).id }} |
60 | | - - name: Check if test run is needed |
61 | | - id: check_run_needed |
62 | | - run: | |
63 | | - ls -l previous-run/ |
64 | | - if [ ! -f previous-run/commit-hashes.txt ]; then |
65 | | - echo "No previous run hashes, need to re-run" |
66 | | - echo 'INFO={"rerun": true}' >> $GITHUB_OUTPUT |
67 | | - elif cmp -s commit-hashes.txt previous-run/commit-hashes.txt; then |
68 | | - echo "Previous run hash same as this one, no need to re-run" |
69 | | - echo 'INFO={"rerun": false}' >> $GITHUB_OUTPUT |
70 | | - else |
71 | | - echo "Previous run hash different, need to re-run" |
72 | | - echo 'INFO={"rerun": true}' >> $GITHUB_OUTPUT |
73 | | - fi |
74 | | - - name: Run tests |
75 | | - if: ${{ fromJSON(steps.check_run_needed.outputs.INFO).rerun }} |
76 | | - run: | |
77 | | - echo Running tests |
78 | | - nvidia-smi |
| 19 | + - name: Get current date |
| 20 | + id: date |
| 21 | + run: echo name=date::$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" |
| 22 | + - name: Get current branch |
| 23 | + id: branch |
| 24 | + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT |
| 25 | + |
| 26 | + dask-tests: |
| 27 | + needs: setup |
| 28 | + # run the Dask and Distributed unit tests |
| 29 | + secrets: inherit |
| 30 | + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.02 |
| 31 | + with: |
| 32 | + # This selects "ARCH=amd64 + the latest supported Python + CUDA". |
| 33 | + 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))])) |
| 34 | + build_type: nightly |
| 35 | + branch: ${{ needs.setup.outputs.branch }} |
| 36 | + date: ${{ needs.setup.outputs.date }} |
| 37 | + sha: ${{ github.sha }} |
| 38 | + script: scripts/run.sh |
0 commit comments