From aae2e356ea99f5a8ad3dc6f16f8c7bae40b48707 Mon Sep 17 00:00:00 2001 From: Cole Ramos Date: Tue, 28 Jan 2025 16:40:41 -0600 Subject: [PATCH] Updates for new default branch (#537) * Update contributing guide for new default branch Signed-off-by: coleramos425 * Add develop target to related workflows Signed-off-by: coleramos425 * Auto sync develop and staging Signed-off-by: coleramos425 * Run sync every night at 12AM Signed-off-by: coleramos425 * Rename sync workflow Signed-off-by: coleramos425 * Update maintainers guide Signed-off-by: coleramos425 * Update readme Signed-off-by: coleramos425 * Auto accept PRs for daily branch sync Signed-off-by: coleramos425 * Direct merge. No PR for merge required Signed-off-by: coleramos425 --------- Signed-off-by: coleramos425 [ROCm/rocprofiler-compute commit: 0a52e6f19d2b4f4e81a66fb419b522d32f210abf] --- .../.github/workflows/daily-staging-sync.yml | 25 +++++++++++++++++ .../.github/workflows/formatting.yml | 4 +-- .../.github/workflows/rhel-8.yml | 4 +-- .../.github/workflows/ubuntu-jammy.yml | 4 +-- .../workflows/weekly-mainline-sync.yml | 27 ------------------- projects/rocprofiler-compute/CONTRIBUTING.md | 8 +++--- projects/rocprofiler-compute/MAINTAINERS.md | 4 +-- projects/rocprofiler-compute/README.md | 2 +- 8 files changed, 38 insertions(+), 40 deletions(-) create mode 100644 projects/rocprofiler-compute/.github/workflows/daily-staging-sync.yml delete mode 100644 projects/rocprofiler-compute/.github/workflows/weekly-mainline-sync.yml diff --git a/projects/rocprofiler-compute/.github/workflows/daily-staging-sync.yml b/projects/rocprofiler-compute/.github/workflows/daily-staging-sync.yml new file mode 100644 index 0000000000..372e588d04 --- /dev/null +++ b/projects/rocprofiler-compute/.github/workflows/daily-staging-sync.yml @@ -0,0 +1,25 @@ +name: Sync Staging with Develop +on: + workflow_dispatch: + schedule: + - cron: 0 0 * * * + +jobs: + promote-dev-to-stg: + if: github.repository == 'ROCm/rocprofiler-compute' + runs-on: ubuntu-latest + name: Promote Develop to Staging + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: develop + fetch-depth: '0' + + - name: Merge - Fast Forward Only + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git checkout amd-staging + git merge origin/develop --ff-only + git push origin HEAD diff --git a/projects/rocprofiler-compute/.github/workflows/formatting.yml b/projects/rocprofiler-compute/.github/workflows/formatting.yml index e7a0db28dd..d9f6c3d282 100644 --- a/projects/rocprofiler-compute/.github/workflows/formatting.yml +++ b/projects/rocprofiler-compute/.github/workflows/formatting.yml @@ -3,9 +3,9 @@ name: Formatting on: push: - branches: [ amd-mainline, amd-staging, release/** ] + branches: [ amd-mainline, amd-staging, release/**, develop ] pull_request: - branches: [ amd-mainline, amd-staging, release/** ] + branches: [ amd-mainline, amd-staging, release/**, develop ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/projects/rocprofiler-compute/.github/workflows/rhel-8.yml b/projects/rocprofiler-compute/.github/workflows/rhel-8.yml index 16ecc35e28..a4fad715c8 100644 --- a/projects/rocprofiler-compute/.github/workflows/rhel-8.yml +++ b/projects/rocprofiler-compute/.github/workflows/rhel-8.yml @@ -5,9 +5,9 @@ name: RHEL 8 # Controls when the workflow will run on: push: - branches: [ amd-mainline, amd-staging, release/** ] + branches: [ amd-mainline, amd-staging, release/**, develop ] pull_request: - branches: [ amd-mainline, amd-staging, release/** ] + branches: [ amd-mainline, amd-staging, release/**, develop ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/projects/rocprofiler-compute/.github/workflows/ubuntu-jammy.yml b/projects/rocprofiler-compute/.github/workflows/ubuntu-jammy.yml index 9233f55c60..94b92be4f2 100644 --- a/projects/rocprofiler-compute/.github/workflows/ubuntu-jammy.yml +++ b/projects/rocprofiler-compute/.github/workflows/ubuntu-jammy.yml @@ -4,9 +4,9 @@ name: Ubuntu 22.04 on: push: - branches: [ amd-mainline, amd-staging, release/** ] + branches: [ amd-mainline, amd-staging, release/**, develop ] pull_request: - branches: [ amd-mainline, amd-staging, release/** ] + branches: [ amd-mainline, amd-staging, release/**, develop ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/projects/rocprofiler-compute/.github/workflows/weekly-mainline-sync.yml b/projects/rocprofiler-compute/.github/workflows/weekly-mainline-sync.yml deleted file mode 100644 index 8fb52b1fcf..0000000000 --- a/projects/rocprofiler-compute/.github/workflows/weekly-mainline-sync.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Sync Mainline with Staging -on: - workflow_dispatch: - schedule: - - cron: 0 5 * * sun - -jobs: - promote-stg-to-main: - if: github.repository == 'ROCm/rocprofiler-compute' - runs-on: ubuntu-latest - name: Promote Staging to Mainline - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: amd-mainline - fetch-depth: '0' - - - name: Merge - Fast Forward Only - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git checkout amd-mainline - git checkout -b promote-staging-$(date +%F) - git merge --ff-only origin/amd-staging - git push -u origin HEAD - gh pr create --base amd-mainline --title "Promote \`amd-staging\` to \`amd-mainline\`" --fill --label "automerge" diff --git a/projects/rocprofiler-compute/CONTRIBUTING.md b/projects/rocprofiler-compute/CONTRIBUTING.md index 3dde9773bd..0cb27703d6 100644 --- a/projects/rocprofiler-compute/CONTRIBUTING.md +++ b/projects/rocprofiler-compute/CONTRIBUTING.md @@ -1,12 +1,12 @@ ## How to fork from us -To keep our development fast and conflict free, we recommend you to [fork](https://github.com/ROCm/rocprofiler-compute/fork) our repository and start your work from our `amd-staging` branch in your private repository. +To keep our development fast and conflict free, we recommend you to [fork](https://github.com/ROCm/rocprofiler-compute/fork) our repository and start your work from our `develop` branch in your private repository. Afterwards, git clone your repository to your local machine. But that is not it! To keep track of the original develop repository, add it as another remote. ``` git remote add mainline https://github.com/ROCm/rocprofiler-compute.git -git checkout amd-staging +git checkout develop ``` As always in git, start a new branch with @@ -15,7 +15,7 @@ As always in git, start a new branch with git checkout -b topic- ``` -and apply your changes there. +and apply your changes there. For more help reference GitHub's ['About Forking'](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) page. ## How to contribute to ROCm Compute Profiler @@ -31,7 +31,7 @@ and apply your changes there. - Ensure the PR description clearly describes the problem and solution. If there is an existing GitHub issue open describing this bug, please include it in the description so we can close it. -- Ensure the PR is based on the `amd-staging` branch of the ROCm Compute Profiler GitHub repository. +- Ensure the PR is based on the `develop` branch of the ROCm Compute Profiler GitHub repository. > [!TIP] > To ensure you meet all formatting requirements before publishing, we recommend you utilize our included [*pre-commit hooks*](https://pre-commit.com/#introduction). For more information on how to use pre-commit hooks please see the [section below](#using-pre-commit-hooks). diff --git a/projects/rocprofiler-compute/MAINTAINERS.md b/projects/rocprofiler-compute/MAINTAINERS.md index 3401ddee19..4e224fd3f3 100644 --- a/projects/rocprofiler-compute/MAINTAINERS.md +++ b/projects/rocprofiler-compute/MAINTAINERS.md @@ -5,13 +5,13 @@ Before publishing a new ROCm Compute Profiler release, please review this checklist to ensure all prerequisites are met: 1) **Ensure [VERSION](VERSION) file is updated** to reflect your desired release version. -2) **Sync `amd-mainline` with `amd-staging`**. A rebase may be required to pull all the desired patches from the development branch to our stable mainline. Click [here](https://github.com/ROCm/rocprofiler-compute/compare/amd-mainline...amd-staging) to begin that process. +2) **Sync `amd-mainline` with `amd-staging`**. Unless major changes were introduced, you should be able to merge using the fast-forward only strategy. 3) **Update [CHANGES](CHANGES)** to reflect all major modifications to the codebase since the last release. When modifying [CHANGES](CHANGES) please ensure formatting is consistent with the rest of the ROCm software stack. See [this template](https://github.com/ROCm/hipTensor/blob/develop/CHANGELOG.md) for reference. 4) **Confirm all CI tests are passing**. You can easily confirm this by peeking the passing status of all GitHub continuous integration tests. 5) **Create a tag from `amd-mainline`**. More information on tagging can be found at [Git Docs - Tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging). > [!NOTE] -Note: A successful tag should trigger the [packaging action](.github/workflows/packaging.yml) which will produce a tarball artifact. **This artifact needs to be included as an asset in your release**. Please find that the [packaging action](.github/workflows/packaging.yml) will automatically create a draft release with your tarball attached. +Note: A successful tag should trigger the [packaging action](.github/workflows/packaging.yml) which will produce a tarball artifact. **This artifact needs to be included as an asset in your release**. The [packaging action](.github/workflows/packaging.yml) will automatically upload the artifact and generate release notes to the corresponding tag. Once you've completed the above checklist, you are ready to publish your release. Please ensure you follow formatting from [past ROCm Compute Profiler releases](https://github.com/ROCm/rocprofiler-compute/releases) for consistency. Some important aspects of our release formatting include: diff --git a/projects/rocprofiler-compute/README.md b/projects/rocprofiler-compute/README.md index 75c451cd93..5ba7b04637 100644 --- a/projects/rocprofiler-compute/README.md +++ b/projects/rocprofiler-compute/README.md @@ -30,7 +30,7 @@ ROCm Compute Profiler follows a [main-dev](https://nvie.com/posts/a-successful-git-branching-model/) branching model. As a result, our latest stable release is shipped from the `amd-mainline` branch, while new features are developed in our -`amd-staging` branch. +`develop` branch. Users may checkout `amd-staging` to preview upcoming features.