diff options
author | alfred gedeon <28123637+alfred2g@users.noreply.github.com> | 2021-01-12 20:13:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-12 20:13:29 -0800 |
commit | 47d37354bc19e182928c1d8be27bbfc9efe32b52 (patch) | |
tree | 10114daca863c05b658bfca949f0e65f109235ab | |
parent | 36fd2c8d8ce4f26fdc6103cd3735fe6f81b4eab4 (diff) | |
download | freertos-git-47d37354bc19e182928c1d8be27bbfc9efe32b52.tar.gz |
Add Posix build checker to git actions (#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
-rw-r--r-- | .github/scripts/posix_build_checker.sh | 24 | ||||
-rw-r--r-- | .github/scripts/posix_network_build_checker.sh | 24 | ||||
-rw-r--r-- | .github/workflows/core-checks.yml | 19 | ||||
-rw-r--r-- | FreeRTOS/Demo/Posix_GCC/Makefile | 2 |
4 files changed, 68 insertions, 1 deletions
diff --git a/.github/scripts/posix_build_checker.sh b/.github/scripts/posix_build_checker.sh new file mode 100644 index 000000000..f23070a5d --- /dev/null +++ b/.github/scripts/posix_build_checker.sh @@ -0,0 +1,24 @@ +PROJECT=$1 +echo "Verifying url links of: ${PROJECT}" +if [ ! -d "$PROJECT" ] +then + echo "Directory passed does not exist" + exit 2 +fi + +SCRIPT_RET=0 + +set -o nounset # Treat unset variables as an error + +cd ${PROJECT}/FreeRTOS/Demo/Posix_GCC +make + +SCRIPT_RET=$? + +if [ "${SCRIPT_RET}" -eq 0 ] +then + exit 0 +else + exit 1 +fi + diff --git a/.github/scripts/posix_network_build_checker.sh b/.github/scripts/posix_network_build_checker.sh new file mode 100644 index 000000000..457fdc93f --- /dev/null +++ b/.github/scripts/posix_network_build_checker.sh @@ -0,0 +1,24 @@ + +PROJECT=$1 +echo "Verifying url links of: ${PROJECT}" +if [ ! -d "$PROJECT" ] +then + echo "Directory passed does not exist" + exit 2 +fi + +SCRIPT_RET=0 + +set -o nounset # Treat unset variables as an error + +cd ${PROJECT}/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix +make + +SCRIPT_RET=$? + +if [ "${SCRIPT_RET}" -eq 0 ] +then + exit 0 +else + exit 1 +fi diff --git a/.github/workflows/core-checks.yml b/.github/workflows/core-checks.yml index 1460c8d29..1eca34837 100644 --- a/.github/workflows/core-checks.yml +++ b/.github/workflows/core-checks.yml @@ -43,4 +43,23 @@ jobs: export PYTHONPATH=tools/.github/scripts:${PYTHONPATH} .github/scripts/core_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json exit $? + build-checker: + name: FreeRTOS Posix Build Check + runs-on: ubuntu-latest + steps: + - name: Clone This Repo + uses: actions/checkout@v2 + with: + path: ./workspace + submodules: 'recursive' + fetch-depth: 1 + - name: Posix Build Checker + run: | + bash workspace/.github/scripts/posix_build_checker.sh workspace + - name: Install lib pcap dev + run: | + sudo apt-get install libpcap-dev + - name: Posix Network Build Checker + run: | + bash workspace/.github/scripts/posix_network_build_checker.sh workspace diff --git a/FreeRTOS/Demo/Posix_GCC/Makefile b/FreeRTOS/Demo/Posix_GCC/Makefile index 86755f2a5..993fa5ad0 100644 --- a/FreeRTOS/Demo/Posix_GCC/Makefile +++ b/FreeRTOS/Demo/Posix_GCC/Makefile @@ -59,7 +59,7 @@ SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/streamports/File CFLAGS := -ggdb3 -O0 -DprojCOVERAGE_TEST=0 -D_WINDOWS_ -LDFLAGS := -ggdb3 -O0 -pthread -lpcap +LDFLAGS := -ggdb3 -O0 -pthread OBJ_FILES = $(SOURCE_FILES:%.c=$(BUILD_DIR)/%.o) |