Skip to content
Merged
2 changes: 1 addition & 1 deletion .github/workflows/action_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: [self-hosted, windows, x64]
name: ${{ github.event.inputs.bsp_options }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@main
- name: Bsp Scons Compile
if: ${{ success() }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/action_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
TEST_BSP_ROOT: bsp/stm32/stm32f407-atk-explorer
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main

- name: Install Tools
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/action_utest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
TEST_CONFIG_FILE: ${{ matrix.legs.CONFIG_FILE }}
TEST_SD_FILE: ${{ matrix.legs.SD_FILE }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main

- name: Install Tools
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bsp_buildings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
filtered_matrix: ${{ steps.filter.outputs.filtered_matrix }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@main
with:
sparse-checkout: .github/ALL_BSP_COMPILE.json
persist-credentials: false
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.filtered_matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@main
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile_bsp_with_drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: BSP Compilation with More Drivers

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual_bsp_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
runs-on: ubuntu-22.04
name: ${{ github.event.inputs.bsp_options }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@main
with:
python-version: 3.8

Expand Down
78 changes: 35 additions & 43 deletions .github/workflows/manual_dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Date Author Notes
# 2023-07-01 Supperthomas the first version
# 2024-09-06 Supperthomas add debug for action and add cppcheck for project
# 2024-09-06 Supperthomas 优化toolchain安装方式,解决手动触发出现的异常,优化流程结构
#
name: manual_scons_dist_trigger_only_one

Expand Down Expand Up @@ -53,86 +54,73 @@ jobs:
runs-on: ubuntu-22.04
name: ${{ github.event.inputs.bsp_options }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@main
with:
python-version: 3.8

- name: Install Tools
shell: bash
run: |
sudo apt-get update
wget https://raw.githubusercontent.com/RT-Thread/env/master/install_ubuntu.sh
chmod 777 install_ubuntu.sh
./install_ubuntu.sh
pip install -r tools/requirements.txt
git config --global http.postBuffer 524288000
echo "RTT_ROOT=${{ github.workspace }}" >> $GITHUB_ENV
echo "RTT_CC=gcc" >> $GITHUB_ENV
echo "export PATH=~/.env/tools/scripts:$PATH" > ~/.env/env.sh
sudo apt-get -qq install cppcheck

- name: Install Arm ToolChains
- name: Install ToolChains
if: ${{ github.event.inputs.bsp_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
source tools/ci/toolchain.sh arm-none-eabi-gcc
echo "RTT_EXEC_PATH=/opt/arm-none-eabi-gcc/bin" >> $GITHUB_ENV

- name: Install LLVM-Arm ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'llvm-arm' && success() }}
shell: bash
run: |
wget -q https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-16.0.0/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz
sudo tar zxf LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz -C /opt
sudo apt-get -qq install libncurses5 libncurses5-dev libncursesw5-dev
/opt/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64/bin/clang --version
source tools/ci/toolchain.sh clang
echo "RTT_EXEC_PATH=/opt/clang/bin" >> $GITHUB_ENV
echo "RTT_CC=llvm-arm" >> $GITHUB_ENV
echo "RTT_EXEC_PATH=/opt/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64/bin" >> $GITHUB_ENV

- name: Install AArch64 ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-aarch64' && success() }}
shell: bash
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.6/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz
sudo tar -xf gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz -C /opt
/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/aarch64-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin" >> $GITHUB_ENV
source tools/ci/toolchain.sh aarch64-none-elf-gcc
echo "RTT_EXEC_PATH=/opt/aarch64-none-elf-gcc/bin" >> $GITHUB_ENV

- name: Install Mips ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-mips' && success() }}
shell: bash
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.1/mips-2016.05-7-mips-sde-elf-i686-pc-linux-gnu.tar.bz2
sudo tar xjf mips-2016.05-7-mips-sde-elf-i686-pc-linux-gnu.tar.bz2 -C /opt
/opt/mips-2016.05/bin/mips-sde-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/mips-2016.05/bin" >> $GITHUB_ENV
source tools/ci/toolchain.sh mips-sde-elf-gcc
echo "RTT_EXEC_PATH=/opt/mips-sde-elf-gcc/bin" >> $GITHUB_ENV

- name: Install Riscv64-unknown-elf ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv64-unknown-elf' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
source tools/ci/toolchain.sh riscv64-unknown-elf-gcc
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-gcc/bin" >> $GITHUB_ENV

- name: Install Riscv-none-embed ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv-none-embed' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.5/xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x64.tar.gz
sudo tar zxf xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-embed-gcc-8.3.0-2.3/bin/riscv-none-embed-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-embed-gcc-8.3.0-2.3/bin" >> $GITHUB_ENV
source tools/ci/toolchain.sh riscv-none-embed-gcc
echo "RTT_EXEC_PATH=/opt/riscv-none-embed-gcc/bin" >> $GITHUB_ENV


- name: Install riscv32-esp-elf ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv32-esp32' && success() }}
run: |
wget -q https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
sudo tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz -C /opt
/opt/riscv32-esp-elf/bin/riscv32-esp-elf-gcc --version
source tools/ci/toolchain.sh riscv32-esp-elf-gcc
echo "RTT_EXEC_PATH=/opt/riscv32-esp-elf-gcc/bin" >> $GITHUB_ENV
pip3 install esptool
echo "RTT_EXEC_PATH=/opt/riscv32-esp-elf/bin" >> $GITHUB_ENV

- name: Install GCC Tools
if: ${{ github.event.inputs.bsp_tool_chain == 'gcc' && success() }}
Expand All @@ -152,19 +140,23 @@ jobs:
config=${{ github.event.inputs.bsp_config}}
echo "$config"
echo "$config" >> bsp/$RTT_BSP/.config
insert_code="env.Tool('compilation_db')\nenv.CompilationDatabase()\n"
sed -i "/DoBuilding(TARGET, objs)/i $insert_code" bsp/$RTT_BSP/SConstruct
scons -C bsp/$RTT_BSP --pyconfig-silent
pushd bsp/$RTT_BSP && pkgs --update && popd
cat bsp/$RTT_BSP/.config
scons -C bsp/$RTT_BSP -j$(nproc)
scons -C bsp/$RTT_BSP -j$(nproc) --cdb
ls bsp/$RTT_BSP
cppcheck --project=bsp/$RTT_BSP/compile_commands.json
pwd
scons --dist -C bsp/$RTT_BSP
mv bsp/$RTT_BSP/dist .
cppcheck --project=bsp/$RTT_BSP/build/compile_commands.json

- uses: actions/upload-artifact@v3
if: ${{ github.event.inputs.dist_flag }}
- uses: actions/upload-artifact@main
if: ${{ github.event.inputs.dist_flag && success()}}
with:
name: dist_file
path: ${{ github.workspace }}/${{ github.event.inputs.bsp_options }}/*

name: rtt_dist_bsp
path: ${{ github.workspace }}/dist/*.zip

- uses: actions/upload-artifact@main
if: ${{ github.event.inputs.dist_flag && success()}}
with:
name: rtt_bsp_fold
path: ${{ github.workspace }}/bsp/${{ github.event.inputs.bsp_options }}/*
Loading
Loading