Skip to content

Commit

Permalink
ci: Ensure twister steps use the bsim version from the manifest
Browse files Browse the repository at this point in the history
The west manifest may point to a newer version of bsim than
the one avaliable in the docker image. Let's ensure
we run with that one.
This is equivalent to the change done in
933d338
for the bsim-tests workflow.

Note that the update and rebuild is incremental,
so if the docker image already has the right
version the operation is very fast
(~1 second)

Signed-off-by: Alberto Escolar Piedras <[email protected]>
  • Loading branch information
aescolar committed Mar 15, 2024
1 parent cb0a123 commit 5158ea4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ jobs:
ccache -p
ccache -z -s -vv
- name: Update BabbleSim to manifest revision
run: |
export BSIM_VERSION=$( west list bsim -f {revision} )
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}
west update
make everything -s -j 8
- name: Run Tests with Twister
id: twister
run: |
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ jobs:
ccache -p
ccache -z -s -vv
- name: Update BabbleSim to manifest revision
run: |
export BSIM_VERSION=$( west list bsim -f {revision} )
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}
west update
make everything -s -j 8
- name: Run Tests with Twister (Push)
continue-on-error: true
run: |
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/twister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,17 @@ jobs:
ccache -p
ccache -z -s -vv
- name: Update BabbleSim to manifest revision
run: |
export BSIM_VERSION=$( west list bsim -f {revision} )
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}
west update
make everything -s -j 8
- if: github.event_name == 'push'
name: Run Tests with Twister (Push)
run: |
Expand Down

0 comments on commit 5158ea4

Please sign in to comment.