Skip to content

Commit 479923c

Browse files
committed
xiugai
1 parent acf9ff9 commit 479923c

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ inputs:
1010
description: 'scons -target=?'
1111
default: mdk5
1212
required: true
13-
STD:
14-
default: c99
15-
required: true
16-
description: 'cppcheck std'
13+
CPPCHECK:
14+
default: --enable=all --std=c99 applications/
15+
required: false
16+
description: 'cppcheck options'
1717
runs:
1818
using: 'docker'
1919
image: 'Dockerfile'

entrypoint.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
#!/bin/sh
2-
if [ ! -d ~/.env ]; then ln /env ~/.env -s;fi
2+
if [ ! -d ~/.env ]; then
3+
ln /env ~/.env -s
4+
fi
35
export PATH=$PATH:~/.env/tools/scripts
46
sed -i -e 's/CONFIG_SYS_PKGS_DOWNLOAD_ACCELERATE=y/CONFIG_SYS_PKGS_DOWNLOAD_ACCELERATE=n/g' /env/tools/scripts/cmds/.config
5-
pkgs --printenv
6-
pkgs --list
7-
pkgs --update
8-
cppcheck --enable=all --std=${STD} applications/
9-
scons --target=${TARGET}
7+
8+
if [-f SConstruct]; then
9+
pkgs --printenv
10+
pkgs --list
11+
pkgs --update
12+
if [[ -z "${CPPCHECK}" ]]; then
13+
cppcheck ${CPPCHECK}
14+
fi
15+
16+
17+
if [[ -z "${TARGET}" ]]; then
18+
scons --target=${TARGET}
19+
else
20+
scons
21+
fi
22+
else
23+
echo "fogret checkout?"
24+
fi

0 commit comments

Comments
 (0)