|
|
@@ -0,0 +1,79 @@
|
|
|
+name: LLsync_build
|
|
|
+
|
|
|
+# 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:
|
|
|
+ - main
|
|
|
+ paths-ignore:
|
|
|
+ - documentation/**
|
|
|
+ - '**/README.md'
|
|
|
+ - '**/README_zh.md'
|
|
|
+ pull_request:
|
|
|
+ branches:
|
|
|
+ - main
|
|
|
+ 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: "nrf5x/nrf52832", RTT_TOOL_CHAIN: "sourcery-arm"}
|
|
|
+ - {RTT_BSP: "nrf5x/nrf52833", RTT_TOOL_CHAIN: "sourcery-arm"}
|
|
|
+ - {RTT_BSP: "nrf5x/nrf52840", RTT_TOOL_CHAIN: "sourcery-arm"}
|
|
|
+
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
+ with:
|
|
|
+ repository: RT-Thread/rt-thread
|
|
|
+ - 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
|
|
|
+ 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 }}
|
|
|
+ run: |
|
|
|
+ source ~/.env/env.sh
|
|
|
+ scons --pyconfig-silent -C bsp/$RTT_BSP
|
|
|
+ sed -i "s/# CONFIG_BSP_USING_NIMBLE is not set/CONFIG_BSP_USING_NIMBLE=y/g" bsp/$RTT_BSP/.config
|
|
|
+ sed -i "s/# CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER is not set/CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER=y/g" bsp/$RTT_BSP/.config
|
|
|
+ scons --pyconfig-silent -C bsp/$RTT_BSP
|
|
|
+ cat bsp/$RTT_BSP/.config
|
|
|
+ pushd bsp/$RTT_BSP && pkgs --update && popd
|
|
|
+ scons -C bsp/$RTT_BSP
|