2022-01-20 15:24:36 +08:00
|
|
|
name: ToolsCI
|
|
|
|
|
|
|
|
# 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'
|
|
|
|
- '**/*.c'
|
|
|
|
- '**/*.h'
|
|
|
|
- '**/*.cpp'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths-ignore:
|
|
|
|
- documentation/**
|
|
|
|
- '**/README.md'
|
|
|
|
- '**/README_zh.md'
|
|
|
|
- '**/*.c'
|
|
|
|
- '**/*.h'
|
|
|
|
- '**/*.cpp'
|
|
|
|
|
2022-09-29 13:44:28 +08:00
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
2022-01-20 15:24:36 +08:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Tools
|
2024-10-08 22:19:02 +08:00
|
|
|
if: github.repository_owner == 'RT-Thread'
|
2022-01-20 15:24:36 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
env:
|
|
|
|
TEST_BSP_ROOT: bsp/stm32/stm32f407-atk-explorer
|
|
|
|
steps:
|
2023-12-26 23:42:58 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-20 15:24:36 +08:00
|
|
|
|
|
|
|
- name: Install Tools
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-07-10 00:13:15 +08:00
|
|
|
wget https://raw.githubusercontent.com/RT-Thread/env/master/install_ubuntu.sh
|
|
|
|
chmod 777 install_ubuntu.sh
|
|
|
|
./install_ubuntu.sh
|
2022-01-20 15:24:36 +08:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
- name: Build Tools
|
|
|
|
run: |
|
|
|
|
scons --pyconfig-silent -C $TEST_BSP_ROOT
|
|
|
|
scons -j$(nproc) -C $TEST_BSP_ROOT
|
|
|
|
|
|
|
|
- name: Project generate Tools
|
|
|
|
if: ${{ success() }}
|
|
|
|
run: |
|
|
|
|
echo "Test to generate eclipse project"
|
|
|
|
scons --target=eclipse -s -C $TEST_BSP_ROOT
|
|
|
|
echo "Test to generate cmake project"
|
|
|
|
scons --target=cmake -s -C $TEST_BSP_ROOT
|
|
|
|
echo "Test to generate makefile project"
|
|
|
|
scons --target=makefile -s -C $TEST_BSP_ROOT
|
|
|
|
|
|
|
|
- name: Project dist Tools
|
|
|
|
if: ${{ success() }}
|
|
|
|
run: |
|
|
|
|
echo "Test to dist project"
|
2024-11-06 20:37:02 +08:00
|
|
|
scons --dist --project-name=project -C $TEST_BSP_ROOT
|
2022-01-20 15:24:36 +08:00
|
|
|
scons --dist-ide -C $TEST_BSP_ROOT
|
2023-04-24 11:02:56 +08:00
|
|
|
ls $TEST_BSP_ROOT
|
|
|
|
ls $TEST_BSP_ROOT/dist
|
2023-09-26 11:35:27 +08:00
|
|
|
scons --pyconfig-silent -C $TEST_BSP_ROOT/dist/project
|
|
|
|
scons --pyconfig-silent -C $TEST_BSP_ROOT/rt-studio-project
|
2023-04-24 11:02:56 +08:00
|
|
|
scons -C $TEST_BSP_ROOT/dist/project
|
|
|
|
scons -C $TEST_BSP_ROOT/rt-studio-project
|