Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47d3735

Browse files
authored
Add Posix build checker to git actions (FreeRTOS#489)
* Add Posix build checker to git actions * fix checker path * Fix script, checkout recursively * fix build check script return value * clone submodules as well with posix checker * Add quotes to true for submodules * Fix Submodules * Remove pcap dependency from Makefile * install libpcap for build check * Add networking build to posix * Separate network build from normal build * add libpcap after building normal posix
1 parent 36fd2c8 commit 47d3735

File tree

4 files changed

+68
-1
lines changed

4 files changed

+68
-1
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
PROJECT=$1
2+
echo "Verifying url links of: ${PROJECT}"
3+
if [ ! -d "$PROJECT" ]
4+
then
5+
echo "Directory passed does not exist"
6+
exit 2
7+
fi
8+
9+
SCRIPT_RET=0
10+
11+
set -o nounset # Treat unset variables as an error
12+
13+
cd ${PROJECT}/FreeRTOS/Demo/Posix_GCC
14+
make
15+
16+
SCRIPT_RET=$?
17+
18+
if [ "${SCRIPT_RET}" -eq 0 ]
19+
then
20+
exit 0
21+
else
22+
exit 1
23+
fi
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
PROJECT=$1
3+
echo "Verifying url links of: ${PROJECT}"
4+
if [ ! -d "$PROJECT" ]
5+
then
6+
echo "Directory passed does not exist"
7+
exit 2
8+
fi
9+
10+
SCRIPT_RET=0
11+
12+
set -o nounset # Treat unset variables as an error
13+
14+
cd ${PROJECT}/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix
15+
make
16+
17+
SCRIPT_RET=$?
18+
19+
if [ "${SCRIPT_RET}" -eq 0 ]
20+
then
21+
exit 0
22+
else
23+
exit 1
24+
fi

.github/workflows/core-checks.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,23 @@ jobs:
4343
export PYTHONPATH=tools/.github/scripts:${PYTHONPATH}
4444
.github/scripts/core_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json
4545
exit $?
46+
build-checker:
47+
name: FreeRTOS Posix Build Check
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Clone This Repo
51+
uses: actions/checkout@v2
52+
with:
53+
path: ./workspace
54+
submodules: 'recursive'
55+
fetch-depth: 1
56+
- name: Posix Build Checker
57+
run: |
58+
bash workspace/.github/scripts/posix_build_checker.sh workspace
59+
- name: Install lib pcap dev
60+
run: |
61+
sudo apt-get install libpcap-dev
62+
- name: Posix Network Build Checker
63+
run: |
64+
bash workspace/.github/scripts/posix_network_build_checker.sh workspace
4665

FreeRTOS/Demo/Posix_GCC/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/streamports/File
5959

6060

6161
CFLAGS := -ggdb3 -O0 -DprojCOVERAGE_TEST=0 -D_WINDOWS_
62-
LDFLAGS := -ggdb3 -O0 -pthread -lpcap
62+
LDFLAGS := -ggdb3 -O0 -pthread
6363

6464
OBJ_FILES = $(SOURCE_FILES:%.c=$(BUILD_DIR)/%.o)
6565

0 commit comments

Comments
 (0)