修改一个数据标识 #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dlt645 | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
# Runs at 16:00 UTC (BeiJing 00:00) on the 1st of every month | |
schedule: | |
- cron: '0 16 1 * *' | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- documentation/** | |
- '**/README.md' | |
- '**/README_zh.md' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- documentation/** | |
- '**/README.md' | |
- '**/README_zh.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.legs.RTT_BSP }} | |
strategy: | |
fail-fast: false | |
matrix: | |
legs: | |
- RTT_BSP: "gd32" | |
RTT_TOOL_CHAIN: "sourcery-arm" | |
SUB_RTT_BSP: | |
- "gd32/arm/gd32103c-eval" | |
- "gd32/arm/gd32105c-eval" | |
- "gd32/arm/gd32105r-start" | |
- "gd32/arm/gd32107c-eval" | |
- "gd32/arm/gd32205r-start" | |
- "gd32/arm/gd32207i-eval" | |
- "gd32/arm/gd32303e-eval" | |
- "gd32/arm/gd32305r-start" | |
- "gd32/arm/gd32307e-start" | |
- "gd32/arm/gd32407v-start" | |
- "gd32/arm/gd32450z-eval" | |
- RTT_BSP: "stm32" | |
RTT_TOOL_CHAIN: "sourcery-arm" | |
SUB_RTT_BSP: | |
- "stm32/stm32f072-st-nucleo" | |
- "stm32/stm32f091-st-nucleo" | |
- "stm32/stm32f107-uc-eval" | |
- "stm32/stm32f207-st-nucleo" | |
- "stm32/stm32f401-st-nucleo" | |
- "stm32/stm32f405-smdz-breadfruit" | |
- "stm32/stm32f407-armfly-v5" | |
- "stm32/stm32f410-st-nucleo" | |
- "stm32/stm32f411-atk-nano" | |
- "stm32/stm32f412-st-nucleo" | |
- "stm32/stm32f413-st-nucleo" | |
- "stm32/stm32f427-robomaster-a" | |
- "stm32/stm32f429-armfly-v6" | |
- "stm32/stm32f446-st-nucleo" | |
- "stm32/stm32f469-st-disco" | |
- "stm32/stm32f746-st-disco" | |
- "stm32/stm32f767-atk-apollo" | |
- "stm32/stm32f769-st-disco" | |
- "stm32/stm32g070-st-nucleo" | |
- "stm32/stm32g071-st-nucleo" | |
- "stm32/stm32g431-st-nucleo" | |
- "stm32/stm32g474-st-nucleo" | |
- "stm32/stm32h743-armfly-v7" | |
- "stm32/stm32h747-st-discovery" | |
- "stm32/stm32h750-artpi" | |
- "stm32/stm32l4r5-st-nucleo" | |
- "stm32/stm32l4r9-st-eval" | |
- "stm32/stm32l010-st-nucleo" | |
- "stm32/stm32l412-st-nucleo" | |
- "stm32/stm32l431-BearPi" | |
- "stm32/stm32l432-st-nucleo" | |
- "stm32/stm32l433-ali-startkit" | |
- "stm32/stm32l452-st-nucleo" | |
- "stm32/stm32l475-atk-pandora" | |
- "stm32/stm32l476-st-nucleo" | |
- "stm32/stm32l496-ali-developer" | |
- "stm32/stm32l552-st-nucleo" | |
- "stm32/stm32mp157a-st-discovery" | |
- "stm32/stm32u575-st-nucleo" | |
- "stm32/stm32wb55-st-nucleo" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: RT-Thread/rt-thread | |
- uses: actions/checkout@v3 | |
with: | |
path: mypkgs/dlt645 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install Tools | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get -qq install gcc-multilib libncurses5-dev scons | |
sudo python -m pip install --upgrade pip -qq | |
pip install requests -qq | |
pip install psutil | |
git config --global http.postBuffer 524288000 | |
python -c "import tools.menuconfig; tools.menuconfig.touch_env()" | |
echo "RTT_ROOT=${{ github.workspace }}" >> $GITHUB_ENV | |
echo "RTT_CC=gcc" >> $GITHUB_ENV | |
- name: Install Arm ToolChains | |
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-arm' && 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 | |
- name: Bsp Scons Compile | |
if: ${{ success() }} | |
shell: bash | |
env: | |
RTT_BSP: ${{ matrix.legs.RTT_BSP }} | |
RTT_TOOL_CHAIN: ${{ matrix.legs.RTT_TOOL_CHAIN }} | |
SRTT_BSP: ${{ join(matrix.legs.SUB_RTT_BSP, ',') }} | |
run: | | |
source ~/.env/env.sh | |
failed=0 | |
count=0 | |
for bsp in $(echo $SRTT_BSP | tr ',' '\n'); do | |
count=$((count+1)) | |
echo "::group::Compiling BSP: ==$count=== $bsp ====" | |
echo bsp/$bsp | |
sed -i "s/# CONFIG_PKG_USING_DLT645 is not set/CONFIG_PKG_USING_DLT645=y/g" bsp/$bsp/.config | |
scons --pyconfig-silent -C bsp/$bsp | |
sed -i "s/# CONFIG_DLT645_USING_SAMPLE is not set/CONFIG_DLT645_USING_SAMPLE=y/g" bsp/$bsp/.config | |
scons --pyconfig-silent -C bsp/$bsp | |
pushd bsp/$bsp && pkgs --update && popd | |
rm -r bsp/$bsp/packages/dlt645-latest | |
cp -r mypkgs/dlt645 bsp/$bsp/packages/dlt645 | |
scons -C bsp/$bsp -j$(nproc) --debug=time | tee output.log || \ | |
{ total_time=$(grep "Total command execution time" output.log | awk '{print $5}'); \ | |
failed=$((failed+1)) ; echo "::endgroup::" ; echo "::error::build $bsp failed" ; \ | |
echo "- ❌ build $bsp failed in $total_time seconds " >> $GITHUB_STEP_SUMMARY ; } && \ | |
{ total_time=$(grep "Total command execution time" output.log | awk '{print $5}'); \ | |
echo "- ✅ build $bsp success in $total_time seconds " >> $GITHUB_STEP_SUMMARY ; echo "::endgroup::" ; } | |
done | |
exit $failed |