Skip to content

Commit 41b0744

Browse files
committed
ci
1 parent 31541ae commit 41b0744

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

.github/workflows/bsp_buildings.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,6 @@ jobs:
435435
echo "RTT_CC=gcc" >> $GITHUB_ENV
436436
echo "export PATH=~/.env/tools/scripts:$PATH" > ~/.env/env.sh
437437
sudo apt install cmake ninja-build
438-
439-
# - name: Install Cmake & Ninja
440-
# uses: lukka/get-cmake@latest
441-
# with:
442-
# cmakeVersion: latest
443-
# ninjaVersion: latest
444438
445439
- name: Install Arm ToolChains
446440
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-arm' && success() }}
@@ -533,11 +527,6 @@ jobs:
533527
RTT_BUILD_TOOL: ${{ matrix.legs.RTT_BUILD_TOOL }}
534528
SRTT_BSP: ${{ join(matrix.legs.SUB_RTT_BSP, ',') }}
535529
run: |
536-
which cmake
537-
cmake --version
538-
cmake --help
539-
which ninja
540-
ninja --version
541530
source ~/.env/env.sh
542531
python tools/ci/bsp_buildings.py
543532

tools/ci/bsp_buildings.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ def run_cmd(cmd, output_info=True):
3838

3939

4040
def build_bsp(bsp, scons_args=''):
41+
if build_tool == 'scons':
42+
return build_bsp_scons(bsp)
43+
elif build_tool =='cmake':
44+
return build_bsp_cmake(bsp)
45+
else:
46+
print(f"::error::build tool {build_tool} is not supported")
47+
return False
48+
49+
def build_bsp_scons(bsp, scons_args=''):
4150
"""
4251
build bsp.
4352
@@ -230,13 +239,7 @@ def build_bsp_attachconfig(bsp, attach_file):
230239
for bsp in srtt_bsp:
231240
count += 1
232241
print(f"::group::Compiling BSP: =={count}=== {bsp} ====")
233-
res = False
234-
if build_tool == 'scons':
235-
res = build_bsp(bsp)
236-
elif build_tool =='cmake':
237-
res = build_bsp_cmake(bsp)
238-
else:
239-
print(f"::error::build tool {build_tool} is not supported")
242+
res = build_bsp(bsp)
240243
if not res:
241244
print(f"::error::build {bsp} failed")
242245
add_summary(f"- ❌ build {bsp} failed.")

0 commit comments

Comments
 (0)