From 229c43ac78458ad4c98334323385f7778fab8f3e Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 14 Aug 2024 14:35:05 -0500 Subject: [PATCH 1/5] ensure test jobs always run on PRs --- .github/workflows/build-test-publish-images.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-publish-images.yml b/.github/workflows/build-test-publish-images.yml index 95f5fe36..7d3cc594 100644 --- a/.github/workflows/build-test-publish-images.yml +++ b/.github/workflows/build-test-publish-images.yml @@ -31,6 +31,13 @@ permissions: statuses: none jobs: + pr-builder: + needs: + - compute-matrix + - build + - test + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10 compute-matrix: runs-on: ubuntu-latest container: @@ -208,7 +215,7 @@ jobs: ARCHES: ${{ toJSON(matrix.ARCHES) }} run: ci/create-multiarch-manifest.sh test: - needs: [compute-matrix, build, build-multiarch-manifest] + needs: [compute-matrix, build] if: inputs.run_tests strategy: matrix: ${{ fromJSON(needs.compute-matrix.outputs.TEST_MATRIX) }} @@ -231,7 +238,7 @@ jobs: py${{ matrix.PYTHON_VER }}" delete-temp-images: if: ${{ !cancelled() && needs.test.result == 'success' }} - needs: [compute-matrix, build-multiarch-manifest, test] + needs: [compute-matrix, build, test] strategy: matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }} fail-fast: false From b6c21ac7de946f9c106faa81ec64407c12db12a7 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 14 Aug 2024 14:43:05 -0500 Subject: [PATCH 2/5] just put pr-builder alongside other checks --- .../workflows/build-test-publish-images.yml | 16 +++++++++++++++- .github/workflows/pr.yml | 19 ------------------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-test-publish-images.yml b/.github/workflows/build-test-publish-images.yml index 7d3cc594..c4a02832 100644 --- a/.github/workflows/build-test-publish-images.yml +++ b/.github/workflows/build-test-publish-images.yml @@ -32,12 +32,26 @@ permissions: jobs: pr-builder: + if: ${{ !cancelled() && inputs.build_type == 'pull-request' }} needs: + - checks - compute-matrix - build - test secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10 + checks: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Run pre-commit + run: | + pip install pre-commit + pre-commit run --all-files compute-matrix: runs-on: ubuntu-latest container: @@ -126,7 +140,7 @@ jobs: echo "TEST_MATRIX=$(yq -n -o json 'env(TEST_MATRIX)' | jq -c '{include: .}')" | tee --append "${GITHUB_OUTPUT}" build: - needs: compute-matrix + needs: [checks, compute-matrix] strategy: matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }} fail-fast: false diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 498ef2d5..a29e8bfa 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,26 +10,7 @@ concurrency: cancel-in-progress: true jobs: - pr-builder: - needs: - - checks - - docker - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10 - checks: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - name: Run pre-commit - run: | - pip install pre-commit - pre-commit run --all-files docker: - needs: [checks] uses: ./.github/workflows/build-test-publish-images.yml with: build_type: pull-request From 11d05f7fe95000cd28557d99af0fdb49c9f1f335 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 14 Aug 2024 15:47:52 -0500 Subject: [PATCH 3/5] pass architecture-specific tag to test job --- .github/workflows/build-test-publish-images.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-publish-images.yml b/.github/workflows/build-test-publish-images.yml index c4a02832..b36d6f4b 100644 --- a/.github/workflows/build-test-publish-images.yml +++ b/.github/workflows/build-test-publish-images.yml @@ -38,6 +38,7 @@ jobs: - compute-matrix - build - test + - delete-temp-images secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10 checks: @@ -249,7 +250,8 @@ jobs: ${{ needs.compute-matrix.outputs.RAPIDS_VER }}\ ${{ needs.compute-matrix.outputs.ALPHA_TAG }}-\ cuda${{ matrix.CUDA_VER }}-\ - py${{ matrix.PYTHON_VER }}" + py${{ matrix.PYTHON_VER }}"-\ + ${{ matrix.ARCH }} delete-temp-images: if: ${{ !cancelled() && needs.test.result == 'success' }} needs: [compute-matrix, build, test] From 556672164db5ec261a398269bf53b07a25031c38 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 14 Aug 2024 15:50:57 -0500 Subject: [PATCH 4/5] quotes --- .github/workflows/build-test-publish-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-publish-images.yml b/.github/workflows/build-test-publish-images.yml index b36d6f4b..05661859 100644 --- a/.github/workflows/build-test-publish-images.yml +++ b/.github/workflows/build-test-publish-images.yml @@ -250,8 +250,8 @@ jobs: ${{ needs.compute-matrix.outputs.RAPIDS_VER }}\ ${{ needs.compute-matrix.outputs.ALPHA_TAG }}-\ cuda${{ matrix.CUDA_VER }}-\ - py${{ matrix.PYTHON_VER }}"-\ - ${{ matrix.ARCH }} + py${{ matrix.PYTHON_VER }}-\ + ${{ matrix.ARCH }}" delete-temp-images: if: ${{ !cancelled() && needs.test.result == 'success' }} needs: [compute-matrix, build, test] From ab85538417e8e03dd21b4e56ba94e7777604b126 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 15 Aug 2024 13:41:54 -0500 Subject: [PATCH 5/5] remove setup-python, just always run build-multiarch-manifest, ensure delete-temp-images runs on branch builds --- .github/workflows/build-test-publish-images.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test-publish-images.yml b/.github/workflows/build-test-publish-images.yml index 05661859..91d26630 100644 --- a/.github/workflows/build-test-publish-images.yml +++ b/.github/workflows/build-test-publish-images.yml @@ -37,6 +37,7 @@ jobs: - checks - compute-matrix - build + - build-multiarch-manifest - test - delete-temp-images secrets: inherit @@ -46,9 +47,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - name: Run pre-commit run: | pip install pre-commit @@ -191,7 +189,6 @@ jobs: ${{ needs.compute-matrix.outputs.ALPHA_TAG }}-\ py${{ matrix.PYTHON_VER }}" build-multiarch-manifest: - if: ${{ !cancelled() && inputs.build_type == 'branch' }} needs: [build, compute-matrix] strategy: matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }} @@ -253,8 +250,8 @@ jobs: py${{ matrix.PYTHON_VER }}-\ ${{ matrix.ARCH }}" delete-temp-images: - if: ${{ !cancelled() && needs.test.result == 'success' }} - needs: [compute-matrix, build, test] + if: ${{ !cancelled() && (needs.test.result == 'success' || needs.test.result == 'skipped') }} + needs: [compute-matrix, build, build-multiarch-manifest, test] strategy: matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }} fail-fast: false