ci: github: git clean after rebase
After rebasing the PR on main, the local copy of the repository may still contain untracked directories and files (for example, the commits from the pull request are "git mv"ing files out of directories that are then left empty). Add a git clean so that we run CI in conditions that are as close as possible to a fresh clone. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
041d8c707c
commit
d8997b4dc3
8 changed files with 9 additions and 0 deletions
1
.github/workflows/bsim-tests.yaml
vendored
1
.github/workflows/bsim-tests.yaml
vendored
|
|
@ -77,6 +77,7 @@ jobs:
|
|||
git config --global user.name "Zephyr Bot"
|
||||
rm -fr ".git/rebase-apply"
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
west config manifest.group-filter -- +ci
|
||||
|
|
|
|||
1
.github/workflows/clang.yaml
vendored
1
.github/workflows/clang.yaml
vendored
|
|
@ -62,6 +62,7 @@ jobs:
|
|||
git config --global user.name "Zephyr Bot"
|
||||
rm -fr ".git/rebase-apply"
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
west config --global update.narrow true
|
||||
|
|
|
|||
1
.github/workflows/coding_guidelines.yml
vendored
1
.github/workflows/coding_guidelines.yml
vendored
|
|
@ -41,6 +41,7 @@ jobs:
|
|||
git config --global user.name "Github Actions"
|
||||
git remote -v
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
source zephyr-env.sh
|
||||
# debug
|
||||
ls -la
|
||||
|
|
|
|||
1
.github/workflows/compliance.yml
vendored
1
.github/workflows/compliance.yml
vendored
|
|
@ -52,6 +52,7 @@ jobs:
|
|||
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
|
||||
(echo "::error ::Merge commits not allowed, rebase instead";false)
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
# debug
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
|
|
|
|||
1
.github/workflows/doc-build.yml
vendored
1
.github/workflows/doc-build.yml
vendored
|
|
@ -94,6 +94,7 @@ jobs:
|
|||
git config --global user.email "actions@zephyrproject.org"
|
||||
git config --global user.name "Github Actions"
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
git log --graph --oneline HEAD...${PR_HEAD}
|
||||
|
||||
- name: cache-pip
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ jobs:
|
|||
git config --global user.email "actions@zephyrproject.org"
|
||||
git config --global user.name "Github Actions"
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
git log --graph --oneline HEAD...${PR_HEAD}
|
||||
|
||||
- name: Set up Python
|
||||
|
|
|
|||
1
.github/workflows/scripts_tests.yml
vendored
1
.github/workflows/scripts_tests.yml
vendored
|
|
@ -43,6 +43,7 @@ jobs:
|
|||
git config --global user.email "actions@zephyrproject.org"
|
||||
git config --global user.name "Github Actions"
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
git log --graph --oneline HEAD...${PR_HEAD}
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
|
|
|
|||
2
.github/workflows/twister.yaml
vendored
2
.github/workflows/twister.yaml
vendored
|
|
@ -77,6 +77,7 @@ jobs:
|
|||
git config --global user.name "Zephyr Bot"
|
||||
rm -fr ".git/rebase-apply"
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
west config manifest.group-filter -- +ci,+optional
|
||||
|
|
@ -185,6 +186,7 @@ jobs:
|
|||
git config --global user.name "Zephyr Builder"
|
||||
rm -fr ".git/rebase-apply"
|
||||
git rebase origin/${BASE_REF}
|
||||
git clean -f -d
|
||||
git log --pretty=oneline | head -n 10
|
||||
fi
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
|
|
|||
Loading…
Reference in a new issue