Skip to content

Commit 6529e31

Browse files
fabiobaltiericarlescufi
authored andcommitted
workflows: find the SDK version from the top level SDK_VERSION file
Drop all hardcoded ZEPHYR_SDK_INSTALL_DIR settings, set the variable automatically from the SDK_VERSION file instead. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 24cf2f6 commit 6529e31

File tree

8 files changed

+26
-13
lines changed

8 files changed

+26
-13
lines changed

.github/workflows/bsim-tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
- /repo-cache/zephyrproject:/github/cache/zephyrproject
3939
env:
4040
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
41-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
4241
BSIM_OUT_PATH: /opt/bsim/
4342
BSIM_COMPONENTS_PATH: /opt/bsim/components
4443
EDTT_PATH: ../tools/edtt
@@ -82,6 +81,8 @@ jobs:
8281
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
8382
west forall -c 'git reset --hard HEAD'
8483
84+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
85+
8586
- name: Check common triggering files
8687
uses: tj-actions/changed-files@v41
8788
id: check-common-files

.github/workflows/clang.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
matrix:
2121
platform: ["native_sim"]
2222
env:
23-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
2423
LLVM_TOOLCHAIN_PATH: /usr/lib/llvm-16
2524
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
2625
BASE_REF: ${{ github.base_ref }}
@@ -66,6 +65,8 @@ jobs:
6665
# west caching).
6766
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west2.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
6867
68+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
69+
6970
- name: Check Environment
7071
run: |
7172
cmake --version

.github/workflows/codecov.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
platform: ["mps2_an385", "native_sim", "qemu_x86", "unit_testing"]
24-
env:
25-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
2624
steps:
2725
- name: Apply container owner mismatch workaround
2826
run: |
@@ -52,11 +50,14 @@ jobs:
5250
west init -l . || true
5351
west update 1> west.update.log || west update 1> west.update-2.log
5452
55-
- name: Check Environment
53+
- name: Environment Setup
5654
run: |
5755
cmake --version
5856
gcc --version
5957
ls -la
58+
59+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
60+
6061
- name: Prepare ccache keys
6162
id: ccache_cache_prop
6263
shell: cmake -P {0}

.github/workflows/errno.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
container:
1313
image: ghcr.io/zephyrproject-rtos/ci:v0.26.6
14-
env:
15-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
1614

1715
steps:
1816
- name: Apply container owner mismatch workaround
@@ -26,6 +24,10 @@ jobs:
2624
- name: checkout
2725
uses: actions/checkout@v3
2826

27+
- name: Environment Setup
28+
run: |
29+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
30+
2931
- name: Run errno.py
3032
run: |
3133
export ZEPHYR_BASE=${PWD}

.github/workflows/footprint-tracking.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
env:
33-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
3433
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
3534
steps:
3635
- name: Apply container owner mismatch workaround
@@ -57,6 +56,10 @@ jobs:
5756
ref: ${{ github.event.pull_request.head.sha }}
5857
fetch-depth: 0
5958

59+
- name: Environment Setup
60+
run: |
61+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
62+
6063
- name: west setup
6164
run: |
6265
west init -l . || true

.github/workflows/footprint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
env:
19-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
2019
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
2120
steps:
2221
- name: Apply container owner mismatch workaround
@@ -37,6 +36,10 @@ jobs:
3736
ref: ${{ github.event.pull_request.head.sha }}
3837
fetch-depth: 0
3938

39+
- name: Environment Setup
40+
run: |
41+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
42+
4043
- name: west setup
4144
run: |
4245
west init -l . || true

.github/workflows/twister.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
MATRIX_SIZE: 10
3737
PUSH_MATRIX_SIZE: 15
3838
DAILY_MATRIX_SIZE: 80
39-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
4039
BSIM_OUT_PATH: /opt/bsim/
4140
BSIM_COMPONENTS_PATH: /opt/bsim/components
4241
TESTS_PER_BUILDER: 700
@@ -80,6 +79,8 @@ jobs:
8079
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
8180
west forall -c 'git reset --hard HEAD'
8281
82+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
83+
8384
- name: Generate Test Plan with Twister
8485
if: github.event_name == 'pull_request_target'
8586
id: test-plan
@@ -131,7 +132,6 @@ jobs:
131132
matrix:
132133
subset: ${{fromJSON(needs.twister-build-prep.outputs.subset)}}
133134
env:
134-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
135135
BSIM_OUT_PATH: /opt/bsim/
136136
BSIM_COMPONENTS_PATH: /opt/bsim/components
137137
TWISTER_COMMON: ' --force-color --inline-logs -v -N -M --retry-failed 3 '
@@ -185,6 +185,8 @@ jobs:
185185
wget -c https://github.com/Kitware/ninja/releases/download/v1.11.1.g95dee.kitware.jobserver-1/ninja-1.11.1.g95dee.kitware.jobserver-1_x86_64-linux-gnu.tar.gz -O - | tar xz --strip-components=1
186186
sudo cp ninja /usr/local/bin
187187
188+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
189+
188190
- name: Check Environment
189191
run: |
190192
cmake --version

.github/workflows/twister_tests_blackbox.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
os: [ubuntu-22.04]
2424
container:
2525
image: ghcr.io/zephyrproject-rtos/ci:v0.26.6
26-
env:
27-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
2826

2927
steps:
3028
- name: Apply Container Owner Mismatch Workaround
@@ -47,6 +45,8 @@ jobs:
4745
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
4846
west forall -c 'git reset --hard HEAD'
4947
48+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
49+
5050
- name: Set Up Python ${{ matrix.python-version }}
5151
uses: actions/setup-python@v4
5252
with:

0 commit comments

Comments
 (0)