forked from nextpilot/nextpilot-flight-control
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.53 KB
/
build-all-bsps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# /******************************************************************
# * _ __ __ ____ _ __ __
# * / | / /___ _ __ / /_ / __ \ (_)/ /____ / /_
# * / |/ // _ \ | |/_// __// /_/ // // // __ \ / __/
# * / /| // __/_> < / /_ / ____// // // /_/ // /_
# * /_/ |_/ \___//_/|_| \__//_/ /_//_/ \____/ \__/
# *
# * Copyright All Reserved © 2015-2024 NextPilot Development Team
# ******************************************************************/
name: build-all-bsps
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
- main
paths-ignore:
- docs/**
- "**/README.md"
- "**/README_zh.md"
pull_request:
branches:
- master
- main
paths-ignore:
- docs/**
- "**/README.md"
- "**/README_zh.md"
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
name: build-all-bsps
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
legs:
- { bsp: "bsps/px4/fmu-v5", config: "default" }
steps:
- uses: actions/checkout@v4
- name: Setup Python Tools
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install System Tools
shell: bash
run: |
wget https://raw.githubusercontent.com/RT-Thread/env/master/install_ubuntu.sh
source install_ubuntu.sh
echo "ENV_ROOT=~/.env" >> $GITHUB_ENV
pip install -r tools/install/requirements_v3.txt
git config --global http.postBuffer 524288000
git remote -v
- name: Install Arm ToolChains
if: ${{ success() }}
shell: bash
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.3/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt
/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc --version
echo "RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin" >> $GITHUB_ENV
echo "RTT_CC=gcc" >> $GITHUB_ENV
- name: Complile ${{ matrix.legs.bsp }} ${{ matrix.legs.config }}
if: ${{ success() }}
env:
BSP_ROOT: ${{ matrix.legs.bsp }}
BSP_CONFIG: ${{ matrix.legs.config }}
shell: bash
run: |
source ~/.env/env.sh
scons -C $BSP_ROOT $BSP_CONFIG -j$(nproc)