Skip to content

Commit

Permalink
ci: bsim update step: Do not affect global git config
Browse files Browse the repository at this point in the history
When updating the bsim install in the docker image's
/opt/bsim_west to the version pointed in the Zephyr
manifest, we are detaching the head to that version.
We suppress the "You are in 'detached HEAD' state..."
git warning as it is just noise in CI.

So far we were doing it by globally supressing that
warning. Let's instead just supress it for the
command in question so we don't change global
git config against expectations.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
  • Loading branch information
aescolar committed Mar 15, 2024
1 parent 5158ea4 commit cbef916
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/bsim-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ jobs:
echo "Manifest points to bsim sha $BSIM_VERSION"
cd /opt/bsim_west/bsim
git fetch -n origin ${BSIM_VERSION}
git config --global advice.detachedHead false
git checkout ${BSIM_VERSION}
git -c advice.detachedHead=false checkout ${BSIM_VERSION}
west update
make everything -s -j 8
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ jobs:
echo "Manifest points to bsim sha $BSIM_VERSION"
cd /opt/bsim_west/bsim
git fetch -n origin ${BSIM_VERSION}
git config --global advice.detachedHead false
git checkout ${BSIM_VERSION}
git -c advice.detachedHead=false checkout ${BSIM_VERSION}
west update
make everything -s -j 8
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ jobs:
echo "Manifest points to bsim sha $BSIM_VERSION"
cd /opt/bsim_west/bsim
git fetch -n origin ${BSIM_VERSION}
git config --global advice.detachedHead false
git checkout ${BSIM_VERSION}
git -c advice.detachedHead=false checkout ${BSIM_VERSION}
west update
make everything -s -j 8
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/twister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ jobs:
echo "Manifest points to bsim sha $BSIM_VERSION"
cd /opt/bsim_west/bsim
git fetch -n origin ${BSIM_VERSION}
git config --global advice.detachedHead false
git checkout ${BSIM_VERSION}
git -c advice.detachedHead=false checkout ${BSIM_VERSION}
west update
make everything -s -j 8
Expand Down

0 comments on commit cbef916

Please sign in to comment.