Skip to content

Commit

Permalink
Exclude directories from the FreeRTOS/FreeRTOS checks, update the spe…
Browse files Browse the repository at this point in the history
…lling action to fix a typo
  • Loading branch information
Skptak committed Sep 6, 2023
1 parent a3f29f8 commit bd94730
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 35 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/executableMonitorTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
id: install-ubuntu-build--tools
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt install build-essential
exitStatus=$?
echo -e "::endgroup::"
Expand All @@ -57,7 +57,7 @@ jobs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
gcc executable-monitor/test.c -o executable-monitor/test.out
gcc -DEXIT_WITH_MINUTES executable-monitor/test.c -o executable-monitor/test_exit_current_minutes.out
readlink -f executable-monitor/test.out
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
id: install-ubuntu-build--tools
run: |
# Install Ubuntu Build Tools
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt install build-essential
exitStatus=$?
echo -e "::endgroup::"
Expand All @@ -218,7 +218,7 @@ jobs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
gcc executable-monitor/test.c -o executable-monitor/test.out
gcc -DEXIT_WITH_MINUTES executable-monitor/test.c -o executable-monitor/test_exit_current_minutes.out
readlink -f executable-monitor/test.out
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
run-link-verifier: false,
run-complexity: false,
run-doxygen: false,
exclude-dirs: ethernet, drivers, FreeRTOS/Demo,
},
{
repository: backoffAlgorithm,
Expand Down Expand Up @@ -236,6 +237,7 @@ jobs:
uses: ./spellings
with:
path: repo/${{ matrix.inputs.repository }}
exclude-dirs: ${{ matrix.inputs.repository }}

- name: "Recursive Clone: ${{ matrix.inputs.repository }}"
if: success() || failure()
Expand All @@ -254,7 +256,6 @@ jobs:
working-directory: repo/${{ matrix.inputs.repository }}_Recursive
run: git submodule update --checkout --init --recursive


- name: Build ${{matrix.inputs.repository}}
if: matrix.inputs.run-complexity && ( success() || failure() )
shell: bash
Expand Down Expand Up @@ -332,7 +333,6 @@ jobs:
repository: FreeRTOS,
org: FreeRTOS,
branch: main,
exclude-dirs: ethernet, drivers, FreeRTOS/Demo
},
{
repository: FreeRTOS-Cellular-Interface,
Expand Down Expand Up @@ -418,4 +418,4 @@ jobs:
with:
path: repo/${{ matrix.inputs.repository }}
exclude-files: ${{ matrix.inputs.exclude-files }}
exclude-dirs: ${{matrix.inputs.exclude-dirs }}
exclude-dirs: ethernet, drivers, FreeRTOS/Demo
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
sudo apt-get install -y lcov
echo -e "::endgroup::"
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
cmake -S ./coreMQTT/test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
Expand All @@ -184,7 +184,7 @@ jobs:
make -C build/ coverage
echo -e "::endgroup::"
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
declare -a EXCLUDE=("\*test/\*" "\*CMakeCCompilerId\*" "\*mocks\*")
echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 --remove build/coverage.info -o build/coverage.info
echo -e "::endgroup::"
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
make -C build/ coverage
echo -e "::endgroup::"
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
declare -a EXCLUDE=("\*test/\*")
set +e
lcov --rc lcov_branch_coverage=1 --remove build/coverage.info -o build/coverage.info
Expand Down
2 changes: 1 addition & 1 deletion clang-formatting/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get install clang-format fd-find dos2unix
echo "$GITHUB_ACTION_PATH" >> $GITHUB_PATH
export PATH="$PATH:$GITHUB_ACTION_PATH"
Expand Down
4 changes: 2 additions & 2 deletions complexity/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get install complexity -y
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{env.stepName }} ${{ env.bashEnd }}"
Expand All @@ -43,7 +43,7 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
echo -e "${{ env.bashInfo }} Have complexity limit of ${{ inputs.horrid_threshold }} ${{ env.bashEnd }}"
exitStatus=0
Expand Down
2 changes: 1 addition & 1 deletion coverage-cop/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
name: ${{ env.stepName }}
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get install lcov fd-find
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{env.stepName }} ${{ env.bashEnd }}"
Expand Down
19 changes: 6 additions & 13 deletions formatting/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get install uncrustify fd-find dos2unix
echo "$GITHUB_ACTION_PATH" >> $GITHUB_PATH
export PATH="$PATH:$GITHUB_ACTION_PATH"
# Check that the commands installed correctly
fdfind --version
fdInstalled=$?
uncrustify --version
uncrustifyInstalled=$?
echo -e "::endgroup::"
echo -e "${{ env.bashInfo }} Using Uncrustify Version: "$(uncrustify --version)" ${{ env.bashEnd }}"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
- env:
Expand All @@ -57,16 +55,11 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "${{ env.bashInfo }} Using Uncrustify Version "$(uncrustify --version)" ${{ env.bashEnd }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
exitCode=0
export PATH="$PATH:$GITHUB_ACTION_PATH"
# TODO: These checks should really only run against modified files on PRS
# Where when the commit to the actual repo happens, then we should trigger the job
# Against all of the files in the repo. Nice inbetween to keep checks fast for PRs,
# But maintain that we don't have a change in the Repo that suddenly causes an issue
# Parse the optional inputs
args=""
Expand Down Expand Up @@ -96,7 +89,7 @@ runs:
# Get all .c and .h files, as well as any other requested file types.
# Then run uncrustify with the common config file.
echo -e "::group::${{ env.bashInfo }} Check Formatting ${{ env.bashEnd }}"
echo -e "${{ env.bashInfo }} fdfind -e c -e h ${args} --exec uncrustify --no-backup --replace --if-changed -c https://github.com/FreeRTOS/CI-CD-Github-Actions/blob/main/formatting/uncrustify.cfg -l C ${{ env.bashEnd }}"
fdfind -e c -e h ${args} --exec uncrustify -q --no-backup --replace --if-changed -c $GITHUB_ACTION_PATH/uncrustify.cfg -l C
Expand Down
8 changes: 6 additions & 2 deletions manifest-verifier/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
pip install -r $GITHUB_ACTION_PATH/requirements.txt
exitStatus=$?
echo -e "::endgroup::"
Expand All @@ -43,14 +43,18 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
if [[ "${{ inputs.fail-on-incorrect-version }}" == "true" ]]; then
echo -e "${{ env.bashInfo}} Value of flag is ${{ inputs.fail-on-incorrect-version }} ${{ env.bashEnd }}"
echo -e "${{ env.bashInfo}} Running: python3 manifest-verifier.py --ignore-submodule-path=${{ inputs.exclude-submodules }} --fail-on-incorrect-version ${{ inputs.fail-on-incorrect-version }} ${{ env.bashEnd }}"
python3 $GITHUB_ACTION_PATH/manifest-verifier.py --ignore-submodule-path=${{ inputs.exclude-submodules }} --fail-on-incorrect-version
else
echo -e "${{ env.bashInfo}} Running: python3 manifest-verifier.py --ignore-submodule-path=${{ inputs.exclude-submodules }} ${{ env.bashEnd }}"
python3 $GITHUB_ACTION_PATH/manifest-verifier.py --ignore-submodule-path=${{ inputs.exclude-submodules }}
fi
exitStatus=$?
echo -e "::endgroup::"
if [ "$exitStatus" = "0" ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
Expand Down
2 changes: 1 addition & 1 deletion rust-spell-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
#echo -e "::group::${{ env.stepName }}"
#echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
export PATH="$GITHUB_ACTION_PATH:$PATH"
# So here's the deal. At time of writing this spell checker can check
Expand Down
2 changes: 1 addition & 1 deletion sbom-generator/sbom_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def file_writer(output, filepath: str, sha1: str, license: str, copyright='NOASS
output.write('FileComment: '+ comment + '\n')
output.write('\n')

def pacakge_writer(output, packageName: str, version: str, url: str, license: str, ver_code: str, file_analyzed=True,
def package_writer(output, packageName: str, version: str, url: str, license: str, ver_code: str, file_analyzed=True,
copyright='NOASSERTION', summary='NOASSERTION', description='NOASSERTION'):
output.write('PackageName: '+ packageName + '\n')
output.write('SPDXID: SPDXRef-Package-'+ packageName + '\n')
Expand Down
4 changes: 2 additions & 2 deletions spellings/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ runs:
sudo apt-get install fd-find -y
sudo apt-get install npm -y
sudo npm install -g cspell
echo -e "::endgroup::"
# Add the Github Action Path to PATH
export PATH="$GITHUB_ACTION_PATH:$PATH"
Expand All @@ -53,6 +52,7 @@ runs:
cd ${{ inputs.path }}
set -e
echo -e "::endgroup::"
# Make sure we have all the commands we need.
echo -e "${{ env.bashInfo }} fdfind --version $(fdfind --version) ${{ env.bashEnd }}"
echo -e "${{ env.bashInfo }} cspell --version $(cspell --version) ${{ env.bashEnd }}"
Expand All @@ -72,7 +72,7 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
#echo -e "::group::${{ env.stepName }}"
echo -e "::group:${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
export PATH="$GITHUB_ACTION_PATH:$PATH"
exitStatus=0
Expand Down
4 changes: 2 additions & 2 deletions ssl-credential-creator/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
pip install -r $GITHUB_ACTION_PATH/requirements.txt
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{env.stepName}} ${{ env.bashEnd }}"
Expand All @@ -48,7 +48,7 @@ runs:
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
python3 $GITHUB_ACTION_PATH/ssl_credential_creator.py
echo "root-ca-priv-key-path=$(pwd)/root_ca_priv_key.key" >> $GITHUB_OUTPUT
echo "root-ca-cert-path=$(pwd)/root_ca_cert.crt" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit bd94730

Please sign in to comment.