[ci] Whitelist submodule dev branches to enable running submodule-commit checks on dev

This works by checking the $CIRCLE_BRANCH env-var, which is set automatically by
CircleCI. Annoyingly, this is set to the name of the source branch for a merge,
rather than the target branch. The behavior of this check for each branch type
is listed:

if CIRCLE_BRANCH == "master":
  This CI run is the nightly CI run for the master branch.
  Make sure all submodules of the master branch point to master
else if CIRCLE_BRANCH == "dev":
  This CI run is most likely somebody doing a dev->master merge.
  Make sure all submodules of the dev branch point to master
else:
  This CI run is likely somebody merging a feature branch into dev.
  Allow submodule pointers of the dev branch to point to master OR dev
This commit is contained in:
Jerry Zhao
2019-11-23 17:50:22 -08:00
parent 2cb03e2f7b
commit 3bc0e7856f
2 changed files with 61 additions and 19 deletions

View File

@@ -622,6 +622,8 @@ workflows:
# Build verilator
- install-verilator
- commit-on-master-check
# Build extra tests
- build-extra-tests:
requires: