Merge pull request #1157 from ucb-bar/ci-updates
Filter CI on PR contents + Mergify support
This commit is contained in:
3
.github/ISSUE_TEMPLATE/config.yml
vendored
3
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -3,6 +3,9 @@ contact_links:
|
|||||||
- name: Chipyard Mailing List
|
- name: Chipyard Mailing List
|
||||||
url: https://groups.google.com/forum/#!forum/chipyard
|
url: https://groups.google.com/forum/#!forum/chipyard
|
||||||
about: Please ask and answer questions here.
|
about: Please ask and answer questions here.
|
||||||
|
- name: FireSim Mailing List
|
||||||
|
url: https://groups.google.com/forum/#!forum/firesim
|
||||||
|
about: Please ask and answer questions here.
|
||||||
- name: Rocket Chip Support
|
- name: Rocket Chip Support
|
||||||
url: https://github.com/chipsalliance/rocket-chip/issues
|
url: https://github.com/chipsalliance/rocket-chip/issues
|
||||||
about: Please ask and answer questions here.
|
about: Please ask and answer questions here.
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@@ -15,7 +15,7 @@ body:
|
|||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Feature Description
|
label: Feature Description
|
||||||
description: Description of feature wanted
|
description: Description of desired feature.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|||||||
26
.github/PULL_REQUEST_TEMPLATE.md
vendored
26
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,3 +1,19 @@
|
|||||||
|
<!--
|
||||||
|
First, please ensure that the title of your PR is sufficient to include in the next changelog.
|
||||||
|
Refer to https://github.com/ucb-bar/chipyard/releases for examples and feel free to ask reviewers for help.
|
||||||
|
|
||||||
|
Then, make sure to label your PR with one of the changelog:<section> labels to indicate which section
|
||||||
|
of the changelog should contain this PR's title:
|
||||||
|
changelog:added
|
||||||
|
changelog:changed
|
||||||
|
changelog:fixed
|
||||||
|
changelog:removed
|
||||||
|
|
||||||
|
If you feel that this PR should not be included in the changelog, you must still label it with
|
||||||
|
changelog:omit
|
||||||
|
|
||||||
|
Provide a brief description of the PR immediately below this comment, if the title is insufficient -->
|
||||||
|
|
||||||
**Related PRs / Issues**:
|
**Related PRs / Issues**:
|
||||||
<!-- List any related PRs/issues here, if applicable -->
|
<!-- List any related PRs/issues here, if applicable -->
|
||||||
|
|
||||||
@@ -17,11 +33,11 @@
|
|||||||
<!-- must be filled out completely to be considered for merging -->
|
<!-- must be filled out completely to be considered for merging -->
|
||||||
**Contributor Checklist**:
|
**Contributor Checklist**:
|
||||||
- [ ] Did you set `main` as the base branch?
|
- [ ] Did you set `main` as the base branch?
|
||||||
|
- [ ] Is this PR's title suitable for inclusion in the changelog and have you added a `changelog:<topic>` label?
|
||||||
|
- [ ] Did you state the type-of-change/impact?
|
||||||
- [ ] Did you delete any extraneous prints/debugging code?
|
- [ ] Did you delete any extraneous prints/debugging code?
|
||||||
|
- [ ] Did you mark the PR with a `changelog:` label?
|
||||||
- [ ] (If applicable) Did you add documentation for the feature?
|
- [ ] (If applicable) Did you add documentation for the feature?
|
||||||
- [ ] (If applicable) Did you add a test demonstrating the PR?
|
- [ ] (If applicable) Did you add a test demonstrating the PR?
|
||||||
<!-- Do this if this PR is a bug fix that should be applied to master -->
|
<!-- Do this if this PR is a bugfix that should be applied to the latest release -->
|
||||||
- [ ] (If applicable) Did you mark the PR as "Please Backport"?
|
- [ ] (If applicable) Did you mark the PR as `Please Backport`?
|
||||||
|
|
||||||
**Release Notes**
|
|
||||||
<!-- Text from here to the end of the body will be considered for inclusion in the release notes for the version containing this pull request. -->
|
|
||||||
|
|||||||
50
.github/workflows/chipyard-run-tests.yml
vendored
50
.github/workflows/chipyard-run-tests.yml
vendored
@@ -1,10 +1,11 @@
|
|||||||
name: chipyard-ci-process
|
name: chipyard-ci-process
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# run ci on pull requests targeting main only (since the ci runs on the merge commit)
|
# run ci on pull requests targeting following branches (runs on the merge commit)
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- '1.[0-9]*.x'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
tools-cache-version: v14
|
tools-cache-version: v14
|
||||||
@@ -24,8 +25,41 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
access_token: ${{ github.token }}
|
access_token: ${{ github.token }}
|
||||||
|
|
||||||
|
# Set up a set of boolean conditions to control which branches of the CI
|
||||||
|
# workflow will execute This is based off the conditional job execution
|
||||||
|
# example here: https://github.com/dorny/paths-filter#examples
|
||||||
|
change-filters:
|
||||||
|
name: filter-jobs-on-changes
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Queried by downstream jobs to determine if they should run.
|
||||||
|
outputs:
|
||||||
|
needs-rtl: ${{ steps.filter.outputs.all_count != steps.filter.outputs.skip-rtl_count }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: dorny/paths-filter@v2
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
all:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
# If any of the files changed match, do a doc build
|
||||||
|
docs: &docs-filter
|
||||||
|
- 'docs/**'
|
||||||
|
- '.readthedocs.yml'
|
||||||
|
|
||||||
|
# If all files match to this filter, skip the main ci pipeline
|
||||||
|
skip-rtl:
|
||||||
|
- *docs-filter
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/.gitignore'
|
||||||
|
- '.github/ISSUE_TEMPLATE/**'
|
||||||
|
|
||||||
commit-on-master-check:
|
commit-on-master-check:
|
||||||
name: commit-on-master-check
|
name: commit-on-master-check
|
||||||
|
needs: change-filters
|
||||||
|
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ucbbar/chipyard-ci-image:554b436
|
image: ucbbar/chipyard-ci-image:554b436
|
||||||
@@ -44,6 +78,8 @@ jobs:
|
|||||||
|
|
||||||
tutorial-setup-check:
|
tutorial-setup-check:
|
||||||
name: tutorial-setup-check
|
name: tutorial-setup-check
|
||||||
|
needs: change-filters
|
||||||
|
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ucbbar/chipyard-ci-image:554b436
|
image: ucbbar/chipyard-ci-image:554b436
|
||||||
@@ -62,6 +98,7 @@ jobs:
|
|||||||
|
|
||||||
documentation-check:
|
documentation-check:
|
||||||
name: documentation-check
|
name: documentation-check
|
||||||
|
needs: change-filters
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ucbbar/chipyard-ci-image:554b436
|
image: ucbbar/chipyard-ci-image:554b436
|
||||||
@@ -87,6 +124,8 @@ jobs:
|
|||||||
|
|
||||||
install-toolchains:
|
install-toolchains:
|
||||||
name: install-toolchains
|
name: install-toolchains
|
||||||
|
needs: change-filters
|
||||||
|
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ucbbar/chipyard-ci-image:554b436
|
image: ucbbar/chipyard-ci-image:554b436
|
||||||
@@ -105,7 +144,8 @@ jobs:
|
|||||||
|
|
||||||
build-extra-tests:
|
build-extra-tests:
|
||||||
name: build-extra-tests
|
name: build-extra-tests
|
||||||
needs: install-toolchains
|
needs: [change-filters, install-toolchains]
|
||||||
|
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ucbbar/chipyard-ci-image:554b436
|
image: ucbbar/chipyard-ci-image:554b436
|
||||||
@@ -136,8 +176,9 @@ jobs:
|
|||||||
|
|
||||||
install-verilator-knight:
|
install-verilator-knight:
|
||||||
name: install-verilator-knight
|
name: install-verilator-knight
|
||||||
|
needs: [change-filters, cancel-prior-workflows]
|
||||||
|
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||||
runs-on: knight
|
runs-on: knight
|
||||||
needs: cancel-prior-workflows
|
|
||||||
steps:
|
steps:
|
||||||
- name: Delete old checkout
|
- name: Delete old checkout
|
||||||
run: |
|
run: |
|
||||||
@@ -152,8 +193,9 @@ jobs:
|
|||||||
|
|
||||||
install-verilator-ferry:
|
install-verilator-ferry:
|
||||||
name: install-verilator-ferry
|
name: install-verilator-ferry
|
||||||
|
needs: [change-filters, cancel-prior-workflows]
|
||||||
|
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||||
runs-on: ferry
|
runs-on: ferry
|
||||||
needs: cancel-prior-workflows
|
|
||||||
steps:
|
steps:
|
||||||
- name: Delete old checkout
|
- name: Delete old checkout
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
24
.mergify.yml
Normal file
24
.mergify.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
pull_request_rules:
|
||||||
|
# For Chipyard version 1.x.y, here let x = minor, y = patch
|
||||||
|
# Only support backporting to the last minor release branch.
|
||||||
|
# This rule will need to be updated on minor releases.
|
||||||
|
- name: backport to latest minor release
|
||||||
|
conditions:
|
||||||
|
- merged
|
||||||
|
- base=main
|
||||||
|
- label="Please Backport"
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- 1.6.x
|
||||||
|
ignore_conflicts: True
|
||||||
|
label_conflicts: "bp-conflict"
|
||||||
|
label:
|
||||||
|
add: [Backported]
|
||||||
|
|
||||||
|
- name: label Mergify backport PR
|
||||||
|
conditions:
|
||||||
|
- body~=This is an automated backport of pull request \#\d+ d
|
||||||
|
actions:
|
||||||
|
label:
|
||||||
|
add: [Backport]
|
||||||
Reference in New Issue
Block a user