From 5f31a7f3b67dfebc4d5610e78ef3b6f4161a903b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Paw=C5=82owski?= Date: Wed, 29 Jan 2025 08:44:48 +0000 Subject: [PATCH 1/4] run on push to develop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Pawłowski --- .github/workflows/build_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tests.yaml b/.github/workflows/build_tests.yaml index 179dd071..51b0557d 100644 --- a/.github/workflows/build_tests.yaml +++ b/.github/workflows/build_tests.yaml @@ -26,7 +26,7 @@ on: - v4-8 - v5litepod-8 push: - branches: ["main"] + branches: ["main","develop"] pull_request: # By default this runs for types assigned, opened and synchronize. env: From 43d2f8556386582298fed1b5b79051428b270f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Paw=C5=82owski?= Date: Wed, 29 Jan 2025 08:55:52 +0000 Subject: [PATCH 2/4] move label validation to separate job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Pawłowski --- .github/workflows/build_tests.yaml | 29 ------------- .github/workflows/label-validation.yaml | 56 +++++++++++++++++++++++++ .github/workflows/nightly_tests.yaml | 1 + 3 files changed, 57 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/label-validation.yaml diff --git a/.github/workflows/build_tests.yaml b/.github/workflows/build_tests.yaml index 51b0557d..a9a499fc 100644 --- a/.github/workflows/build_tests.yaml +++ b/.github/workflows/build_tests.yaml @@ -44,37 +44,8 @@ env: REGION: us-central2 jobs: - label-validation: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - permissions: - pull-requests: read - steps: - - id: check-labels - uses: mheap/github-action-required-labels@v5 - with: - mode: minimum - count: 1 - labels: "release-improvements, release-bugfix, release-features" - message: "This PR is being prevented from merging because it is not labeled. Please add a label to this PR. Accepted labels: release-improvements, release-bugfix, release-features" - - id: do-not-merge - uses: mheap/github-action-required-labels@v5 - with: - mode: exactly - count: 0 - labels: "do-not-merge" - add_comment: false - - id: print-labels - run: | - echo "Current PR labels:" - for f in $(echo "${{steps.check-labels.outputs.labels}}" | sed "s/,/ /g") - do - echo "$f" - done run-unit-tests: runs-on: [ubuntu-22.04] - needs: - - label-validation concurrency: # We support one build or nightly test to run at a time currently. group: build-test-cluster-group cancel-in-progress: false diff --git a/.github/workflows/label-validation.yaml b/.github/workflows/label-validation.yaml new file mode 100644 index 00000000..448b57c0 --- /dev/null +++ b/.github/workflows/label-validation.yaml @@ -0,0 +1,56 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: 'Ensure PR label exists' + +on: + pull_request: + types: + - opened + - labeled + - unlabeled + - synchronize + - edited + - ready_for_review + - unlocked + branches: + - develop + +jobs: + label-validation: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - id: check-labels + uses: mheap/github-action-required-labels@v5 + with: + mode: minimum + count: 1 + labels: "release-improvements, release-bugfix, release-features" + message: "This PR is being prevented from merging because it is not labeled. Please add a label to this PR. Accepted labels: release-improvements, release-bugfix, release-features" + - id: do-not-merge + uses: mheap/github-action-required-labels@v5 + with: + mode: exactly + count: 0 + labels: "do-not-merge" + add_comment: false + - id: print-labels + run: | + echo "Current PR labels:" + for f in $(echo "${{steps.check-labels.outputs.labels}}" | sed "s/,/ /g") + do + echo "$f" + done \ No newline at end of file diff --git a/.github/workflows/nightly_tests.yaml b/.github/workflows/nightly_tests.yaml index 2dff1261..cb134a60 100644 --- a/.github/workflows/nightly_tests.yaml +++ b/.github/workflows/nightly_tests.yaml @@ -18,6 +18,7 @@ on: workflow_dispatch: schedule: # Schedule the job run at 12AM PST daily. - cron: '0 8 * * *' + env: # Names must be unique in parallel running tests. From d6054ecdb6207c15ecd4ffc2572e7aeb5182a13e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Paw=C5=82owski?= Date: Wed, 29 Jan 2025 08:57:38 +0000 Subject: [PATCH 3/4] add badge for develop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Pawłowski --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 470593fa..a9f35cad 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ [![Build Tests](https://github.com/google/xpk/actions/workflows/build_tests.yaml/badge.svg)](https://github.com/google/xpk/actions/workflows/build_tests.yaml) [![Nightly Tests](https://github.com/google/xpk/actions/workflows/nightly_tests.yaml/badge.svg)](https://github.com/google/xpk/actions/workflows/nightly_tests.yaml) - +[![Develop Tests](https://github.com/AI-Hypercomputer/xpk/actions/workflows/build_tests.yaml/badge.svg?branch=develop)](https://github.com/AI-Hypercomputer/xpk/actions/workflows/build_tests.yaml) # Overview xpk (Accelerated Processing Kit, pronounced x-p-k,) is a software tool to help From 59bb5196d80327020e4926eef6212907e215ce48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Paw=C5=82owski?= Date: Wed, 29 Jan 2025 09:01:22 +0000 Subject: [PATCH 4/4] run nightly tests on push to develop branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Pawłowski --- .github/workflows/nightly_tests.yaml | 2 ++ README.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/nightly_tests.yaml b/.github/workflows/nightly_tests.yaml index cb134a60..71ef7cc7 100644 --- a/.github/workflows/nightly_tests.yaml +++ b/.github/workflows/nightly_tests.yaml @@ -15,6 +15,8 @@ name: Nightly Tests on: + push: + branches: ["develop"] workflow_dispatch: schedule: # Schedule the job run at 12AM PST daily. - cron: '0 8 * * *' diff --git a/README.md b/README.md index a9f35cad..fbebce95 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ [![Build Tests](https://github.com/google/xpk/actions/workflows/build_tests.yaml/badge.svg)](https://github.com/google/xpk/actions/workflows/build_tests.yaml) [![Nightly Tests](https://github.com/google/xpk/actions/workflows/nightly_tests.yaml/badge.svg)](https://github.com/google/xpk/actions/workflows/nightly_tests.yaml) [![Develop Tests](https://github.com/AI-Hypercomputer/xpk/actions/workflows/build_tests.yaml/badge.svg?branch=develop)](https://github.com/AI-Hypercomputer/xpk/actions/workflows/build_tests.yaml) +[![Develop Nightly Tests](https://github.com/AI-Hypercomputer/xpk/actions/workflows/nightly_tests.yaml/badge.svg?branch=develop)](https://github.com/AI-Hypercomputer/xpk/actions/workflows/nightly_tests.yaml) + # Overview xpk (Accelerated Processing Kit, pronounced x-p-k,) is a software tool to help