From 5158ea4af0a5ab6b670ca0c4718e64eb7e6891c6 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Wed, 13 Mar 2024 14:56:24 +0100 Subject: [PATCH] ci: Ensure twister steps use the bsim version from the manifest 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 933d338c9783cce55466fed000baf2f3beeac891 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 --- .github/workflows/clang.yaml | 11 +++++++++++ .github/workflows/codecov.yaml | 11 +++++++++++ .github/workflows/twister.yaml | 11 +++++++++++ 3 files changed, 33 insertions(+) diff --git a/.github/workflows/clang.yaml b/.github/workflows/clang.yaml index 41c07278edbea9..96ac41fd37ec8f 100644 --- a/.github/workflows/clang.yaml +++ b/.github/workflows/clang.yaml @@ -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: | diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml index 47b3785a47c600..402ed3e1862c7a 100644 --- a/.github/workflows/codecov.yaml +++ b/.github/workflows/codecov.yaml @@ -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: | diff --git a/.github/workflows/twister.yaml b/.github/workflows/twister.yaml index c77bfd4bf5368f..4bf097c7df2ea3 100644 --- a/.github/workflows/twister.yaml +++ b/.github/workflows/twister.yaml @@ -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: |