Skip to content

Commit

Permalink
Merge branch 'main' into MAC_Filtering_PR
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws authored Apr 5, 2024
2 parents 7a4957d + 1f59754 commit 1c54ccc
Showing 1 changed file with 64 additions and 24 deletions.
88 changes: 64 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
bashPass: \033[32;1mPASSED -
bashWarn: \033[33;1mWARNING -
bashInfo: \033[33;1mWINFO -
bashFail: \033[31;1mFAILED -
bashEnd: \033[0m

Expand All @@ -21,24 +21,33 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive

- env:
stepName: Build Unit Tests
stepName: Install Dependencies
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group::Install Dependencies"
git submodule update --checkout
cd tools/CMock
git submodule update --init vendor/unity
cd ../..
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
git submodule update --checkout --init --recursive
sudo apt-get update -y
sudo apt-get install -y lcov
sudo apt-get install -y unifdef
sudo apt-get install -y ninja-build
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
- env:
stepName: Build Unit Tests
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
echo "::group:: ${{ env.stepName }}"
cmake -S test/unit-test -B test/unit-test/build/ -G Ninja
cmake --build test/unit-test/build/ --target all
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -48,8 +57,10 @@ jobs:
shell: bash
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
ctest --test-dir test/unit-test/build/ -E system --output-on-failure
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -59,8 +70,10 @@ jobs:
shell: bash
run: |
# ${{ env.stepName }}
echo "::group::Build Tests"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake --build test/unit-test/build/ --target coverage
echo "::endgroup::"
echo -e "${{ env.bashPass }} Built Coverage Tests ${{ env.bashEnd }}"
Expand Down Expand Up @@ -142,8 +155,11 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get update -y
sudo apt-get install -y libpcap-dev
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -152,9 +168,11 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL
cmake --build build --target freertos_plus_tcp_build_test
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -163,10 +181,12 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL_IPV4
cmake --build build --target clean
cmake --build build --target freertos_plus_tcp_build_test
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -175,9 +195,11 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL_IPV6
cmake --build build --target freertos_plus_tcp_build_test
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -186,10 +208,12 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL_IPV4_IPV6
cmake --build build --target clean
cmake --build build --target freertos_plus_tcp_build_test
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -198,10 +222,12 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL_IPV4_TCP
cmake --build build --target clean
cmake --build build --target freertos_plus_tcp_build_test
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -210,9 +236,11 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL_IPV6_TCP
cmake --build build --target freertos_plus_tcp_build_test
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -221,10 +249,12 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=DISABLE_ALL
cmake --build build --target clean
cmake --build build --target freertos_plus_tcp_build_test
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -233,10 +263,12 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=DEFAULT_CONF
cmake --build build --target clean
cmake --build build --target freertos_plus_tcp_build_test
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand Down Expand Up @@ -264,7 +296,7 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get install complexity
sudo apt-get install uncrustify
echo "::endgroup::"
Expand All @@ -275,7 +307,8 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
COMPLEXITY_PARAMS="--scores --threshold=10 --horrid-threshold=283"
TEMP_DIR=./temp
mkdir -p ${TEMP_DIR}
Expand All @@ -289,6 +322,7 @@ jobs:
find ${TEMP_DIR} -iname '*.c' | xargs complexity ${COMPLEXITY_PARAMS}
RESULT=$?
rm -rf ${TEMP_DIR}
echo "::endgroup::"
if [ "${RESULT}" = "0" ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand Down Expand Up @@ -316,8 +350,10 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cd git-secrets && sudo make install && cd ..
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -326,9 +362,11 @@ jobs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
git-secrets --register-aws
git-secrets --scan
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -347,10 +385,12 @@ jobs:
shell: bash
run: |
# ${{ env.stepName }}
echo "::group:: ${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
git submodule update --init --checkout --recursive
sudo apt-get update
sudo apt-get install --yes --no-install-recommends gcc-multilib
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand Down

0 comments on commit 1c54ccc

Please sign in to comment.