From 12cbf7a2aeb38b3f7aff127fec725ee0444a3bd0 Mon Sep 17 00:00:00 2001 From: Supper Thomas <78900636@qq.com> Date: Thu, 13 Feb 2025 20:38:04 +0800 Subject: [PATCH 1/4] Update manual_dist.yml --- .github/workflows/manual_dist.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/manual_dist.yml b/.github/workflows/manual_dist.yml index d73c79c43dc..aee65e3c4d7 100644 --- a/.github/workflows/manual_dist.yml +++ b/.github/workflows/manual_dist.yml @@ -53,9 +53,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 @@ -152,17 +152,15 @@ 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 + cppcheck --project=bsp/$RTT_BSP/build/compile_commands.json pwd - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@main if: ${{ github.event.inputs.dist_flag }} with: name: dist_file From d6aebbd68fda0878239ca3fa4ca88c884d028f37 Mon Sep 17 00:00:00 2001 From: Supper Thomas <78900636@qq.com> Date: Fri, 14 Feb 2025 09:32:59 +0800 Subject: [PATCH 2/4] Update manual_dist.yml --- .github/workflows/manual_dist.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual_dist.yml b/.github/workflows/manual_dist.yml index aee65e3c4d7..ee7c482b926 100644 --- a/.github/workflows/manual_dist.yml +++ b/.github/workflows/manual_dist.yml @@ -66,9 +66,11 @@ jobs: 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 @@ -155,9 +157,8 @@ jobs: 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) --cdb + scons -C bsp/$RTT_BSP -j$(nproc) ls bsp/$RTT_BSP - cppcheck --project=bsp/$RTT_BSP/build/compile_commands.json pwd - uses: actions/upload-artifact@main From e780666b95851c55a0a7c7e6bf92f5bb6508b665 Mon Sep 17 00:00:00 2001 From: Supper Thomas <78900636@qq.com> Date: Wed, 19 Feb 2025 21:49:39 +0800 Subject: [PATCH 3/4] Create main.yml --- .github/workflows/main.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000000..34701d27396 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,20 @@ +name: Code Review From ChatGPT + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [opened, synchronize] + +jobs: + code-review: + runs-on: ubuntu-latest + steps: + - uses: anc95/ChatGPT-CodeReview@main + env: + GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANGUAGE: Chinese + MODEL: gpt-3.5-turbo From 4f75db8f91a1fd4ae1ed15f32c9523abb2dfc205 Mon Sep 17 00:00:00 2001 From: Supper Thomas <78900636@qq.com> Date: Wed, 19 Feb 2025 21:49:55 +0800 Subject: [PATCH 4/4] Update .gitattributes --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index deeee5e25c0..2921ccac402 100755 --- a/.gitattributes +++ b/.gitattributes @@ -11,7 +11,7 @@ *.cc text *.cpp text *.cxx text -*.h text +*.h text *.htm text *.html text *.in text