Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*.cc text
*.cpp text
*.cxx text
*.h text
*.h text
*.htm text
*.html text
*.in text
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 5 additions & 6 deletions .github/workflows/manual_dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -152,17 +154,14 @@ 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)
ls bsp/$RTT_BSP
cppcheck --project=bsp/$RTT_BSP/compile_commands.json
pwd

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@main
if: ${{ github.event.inputs.dist_flag }}
with:
name: dist_file
Expand Down