Skip to content

Commit

Permalink
Merge branch 'coverity_scan_fork_main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws committed Oct 25, 2023
2 parents a8650b9 + bf1ecc8 commit b2e8106
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/coverity_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: FreeRTOS-Kernel Coverity Scan
on:
schedule: ## Scheduled to run at 12 AM UTC.
- cron: '8 17 * * *'


jobs:

Coverity-Scan:
name: Coverity Scan
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3

- name: Install Build Essentials
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install build-essential
- name: Install Coverity Build
shell: bash
env:
COVERITY_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
run: |
wget -nv -qO- https://scan.coverity.com/download/linux64 --post-data "token=${COVERITY_TOKEN}&project=FreeRTOS-Kernel" | tar -zx --one-top-level=cov_scan --strip-components 1
echo "cov_scan_path=$(pwd)/cov_scan/bin" >> $GITHUB_ENV
- name: Coverity Build & Upload for Scan
shell: bash
env:
COVERITY_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
run: |
export PATH="$PATH:${{env.cov_scan_path}}"
mkdir build
cd build
cmake ../examples/cmake_example/
cov-build --dir cov-int make -j
tar czvf gcc_freertos_kerenl_sample_build.tgz cov-int
COV_SCAN_UPLOAD_STATUS=$(curl --form token=${COVERITY_TOKEN} \
--form [email protected] \
--form file=@gcc_freertos_kerenl_sample_build.tgz \
--form version="Mainline" \
--form description="GCC Posix Demo" \
https://scan.coverity.com/builds?project=FreeRTOS-Kernel)
echo "${COV_SCAN_UPLOAD_STATUS}" | grep -q -e 'Build successfully submitted' || echo >&2 "Error submitting build for analysis: ${COV_SCAN_UPLOAD_STATUS}"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![CMock Unit Tests](https://github.com/FreeRTOS/FreeRTOS-Kernel/actions/workflows/unit-tests.yml/badge.svg?branch=main&event=push)](https://github.com/FreeRTOS/FreeRTOS-Kernel/actions/workflows/unit-tests.yml?query=branch%3Amain+event%3Apush+workflow%3A%22CMock+Unit+Tests%22++)
[![codecov](https://codecov.io/gh/FreeRTOS/FreeRTOS-Kernel/badge.svg?branch=main)](https://codecov.io/gh/FreeRTOS/FreeRTOS-Kernel)
[![Coverity Scan Status](https://scan.coverity.com/projects/freertos-kernel/badge.svg)](https://scan.coverity.com/projects/freertos-kernel)

## Getting started

Expand Down

0 comments on commit b2e8106

Please sign in to comment.