Skip to content

Commit 2b40a50

Browse files
authored
Merge pull request #968 from dgarske/mcux_sdk_pin
ci: build against the latest MCUXpresso SDK release instead of the manifests
2 parents 80a186f + 9ed2fc1 commit 2b40a50

6 files changed

Lines changed: 56 additions & 9 deletions

‎.github/workflows/imxrt700-emulator-tests.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,28 @@ jobs:
3030
repository: nxp-mcuxpresso/CMSIS_5
3131
path: CMSIS_5
3232

33+
- name: Find the latest MCUXpresso SDK release
34+
id: mcux-release
35+
run: |
36+
tag=$(tools/ci/mcux-sdk-latest-release.sh)
37+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
38+
3339
- name: Cache MCUXpresso SDK
3440
id: cache-mcuxpresso
3541
uses: actions/cache@v4
3642
with:
3743
path: |
3844
mcuxpresso-sdk
3945
venv
40-
key: mcuxpresso-sdk-mimxrt700evk-emu-${{ hashFiles('.github/workflows/imxrt700-emulator-tests.yml') }}
46+
key: mcuxpresso-sdk-mimxrt700evk-emu-${{ hashFiles('.github/workflows/imxrt700-emulator-tests.yml') }}-${{ steps.mcux-release.outputs.tag }}
4147

4248
- name: Setup MCUXpresso SDK
4349
if: steps.cache-mcuxpresso.outputs.cache-hit != 'true'
4450
run: |
4551
python3 -m venv venv
4652
. venv/bin/activate
4753
pip install west
48-
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
54+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git --mr ${{ steps.mcux-release.outputs.tag }} mcuxpresso-sdk
4955
cd mcuxpresso-sdk
5056
sed -i '/se_hostlib\|emwin\|executorch/d' manifests/boards/mimxrt700evk.yml
5157
west update_board --set board mimxrt700evk

‎.github/workflows/lpc55s69-emulator-tests.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,28 @@ jobs:
3434
repository: nxp-mcuxpresso/CMSIS_5
3535
path: CMSIS_5
3636

37+
- name: Find the latest MCUXpresso SDK release
38+
id: mcux-release
39+
run: |
40+
tag=$(tools/ci/mcux-sdk-latest-release.sh)
41+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
42+
3743
- name: Cache MCUXpresso SDK
3844
id: cache-mcuxpresso
3945
uses: actions/cache@v4
4046
with:
4147
path: |
4248
mcuxpresso-sdk
4349
venv
44-
key: mcuxpresso-sdk-lpcxpresso55s69-emu-${{ hashFiles('.github/workflows/lpc55s69-emulator-tests.yml') }}
50+
key: mcuxpresso-sdk-lpcxpresso55s69-emu-${{ hashFiles('.github/workflows/lpc55s69-emulator-tests.yml') }}-${{ steps.mcux-release.outputs.tag }}
4551

4652
- name: Setup MCUXpresso SDK
4753
if: steps.cache-mcuxpresso.outputs.cache-hit != 'true'
4854
run: |
4955
python3 -m venv venv
5056
. venv/bin/activate
5157
pip install west
52-
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
58+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git --mr ${{ steps.mcux-release.outputs.tag }} mcuxpresso-sdk
5359
cd mcuxpresso-sdk
5460
sed -i '/se_hostlib\|emwin/d' manifests/boards/lpcxpresso55s69.yml
5561
west update_board --set board lpcxpresso55s69

‎.github/workflows/mcxn-emulator-tests.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,28 @@ jobs:
2929
repository: nxp-mcuxpresso/CMSIS_5
3030
path: CMSIS_5
3131

32+
- name: Find the latest MCUXpresso SDK release
33+
id: mcux-release
34+
run: |
35+
tag=$(tools/ci/mcux-sdk-latest-release.sh)
36+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
37+
3238
- name: Cache MCUXpresso SDK
3339
id: cache-mcuxpresso
3440
uses: actions/cache@v4
3541
with:
3642
path: |
3743
mcuxpresso-sdk
3844
venv
39-
key: mcuxpresso-sdk-frdmmcxn947-emu-${{ hashFiles('.github/workflows/mcxn-emulator-tests.yml') }}
45+
key: mcuxpresso-sdk-frdmmcxn947-emu-${{ hashFiles('.github/workflows/mcxn-emulator-tests.yml') }}-${{ steps.mcux-release.outputs.tag }}
4046

4147
- name: Setup MCUXpresso SDK
4248
if: steps.cache-mcuxpresso.outputs.cache-hit != 'true'
4349
run: |
4450
python3 -m venv venv
4551
. venv/bin/activate
4652
pip install west
47-
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
53+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git --mr ${{ steps.mcux-release.outputs.tag }} mcuxpresso-sdk
4854
cd mcuxpresso-sdk
4955
sed -i '/se_hostlib\|emwin\|executorch/d' manifests/boards/frdmmcxn947.yml
5056
west update_board --set board frdmmcxn947

‎.github/workflows/test-build-mcux-sdk-manifests.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,28 @@ jobs:
3838
- name: Trust workspace
3939
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
4040

41+
- name: Find the latest MCUXpresso SDK release
42+
id: mcux-release
43+
run: |
44+
tag=$(tools/ci/mcux-sdk-latest-release.sh)
45+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
46+
4147
- name: Cache MCUXpresso SDK
4248
id: cache-mcuxpresso
4349
uses: actions/cache@v4
4450
with:
4551
path: |
4652
mcuxpresso-sdk
4753
venv
48-
key: mcuxpresso-sdk-${{inputs.board-name}}-${{hashFiles('.github/workflows/test-build-mcux-sdk-manifests.yml')}}
54+
key: mcuxpresso-sdk-${{inputs.board-name}}-${{hashFiles('.github/workflows/test-build-mcux-sdk-manifests.yml')}}-${{ steps.mcux-release.outputs.tag }}
4955

5056
- name: Setup MCUXpresso SDK
5157
if: steps.cache-mcuxpresso.outputs.cache-hit != 'true'
5258
run: |
5359
python -m venv venv
5460
source venv/bin/activate
5561
pip install west
56-
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
62+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git --mr ${{ steps.mcux-release.outputs.tag }} mcuxpresso-sdk
5763
cd mcuxpresso-sdk
5864
sed -i '/se_hostlib\|emwin\|executorch/d' manifests/boards/${{inputs.board-name}}.yml
5965
west update_board --set board ${{inputs.board-name}}

‎.github/workflows/trustzone-emulator-tests.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,19 @@ jobs:
181181
repository: nxp-mcuxpresso/CMSIS_5
182182
path: CMSIS_5
183183

184+
- name: Find the latest MCUXpresso SDK release
185+
id: mcux-release
186+
run: |
187+
tag=$(tools/ci/mcux-sdk-latest-release.sh)
188+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
189+
184190
- name: Setup MCUXpresso SDK (lpc55s69)
185191
shell: bash
186192
run: |
187193
python3 -m venv venv
188194
source venv/bin/activate
189195
pip install west
190-
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
196+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git --mr ${{ steps.mcux-release.outputs.tag }} mcuxpresso-sdk
191197
cd mcuxpresso-sdk
192198
sed -i '/se_hostlib\|emwin\|executorch/d' manifests/boards/lpcxpresso55s69.yml
193199
west update_board --set board lpcxpresso55s69
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
# mcux-sdk-latest-release.sh -- print the newest MCUXpresso SDK release tag
3+
# (vYY.MM.NN) of the west manifests, skipping previews (-pvw) and LTS tags.
4+
# The manifests' default branch tracks the next preview and can name commits
5+
# that are not published yet, so CI checks out a release instead.
6+
7+
set -e
8+
9+
URL=https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git
10+
11+
TAG=$(git ls-remote --tags --refs "$URL" 'v*' | sed 's#.*refs/tags/##' |
12+
grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
13+
if [ -z "$TAG" ]; then
14+
echo "no MCUXpresso SDK release tag found at $URL" >&2
15+
exit 1
16+
fi
17+
echo "$TAG"

0 commit comments

Comments
 (0)