2023-12-06 12:50:00 +00:00
|
|
|
# Creates and uploads a Coverity build on a schedule
|
|
|
|
name: Coverity Scan
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# Run once daily, since below 500k LOC can have 21 builds per week, per https://scan.coverity.com/faq#frequency
|
|
|
|
- cron: '0 0 * * *'
|
|
|
|
# Support manual execution
|
|
|
|
workflow_dispatch:
|
2024-04-12 15:24:22 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2023-12-06 12:50:00 +00:00
|
|
|
jobs:
|
|
|
|
coverity:
|
2024-03-28 16:58:28 +00:00
|
|
|
if: github.repository == 'valkey-io/valkey'
|
2023-12-06 12:50:00 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@main
|
|
|
|
- name: Download and extract the Coverity Build Tool
|
|
|
|
run: |
|
2024-04-02 04:31:17 +00:00
|
|
|
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=valkey-io%2Fvalkey" -O cov-analysis-linux64.tar.gz
|
2023-12-06 12:50:00 +00:00
|
|
|
mkdir cov-analysis-linux64
|
|
|
|
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
|
2024-03-28 16:58:28 +00:00
|
|
|
- name: Install Valkey dependencies
|
2024-04-02 04:31:17 +00:00
|
|
|
run: sudo apt install -y gcc procps libssl-dev
|
2023-12-06 12:50:00 +00:00
|
|
|
- name: Build with cov-build
|
|
|
|
run: cov-analysis-linux64/bin/cov-build --dir cov-int make
|
|
|
|
- name: Upload the result
|
|
|
|
run: |
|
|
|
|
tar czvf cov-int.tgz cov-int
|
|
|
|
curl \
|
|
|
|
--form email=${{ secrets.COVERITY_SCAN_EMAIL }} \
|
|
|
|
--form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
|
|
|
|
--form file=@cov-int.tgz \
|
2024-04-02 04:31:17 +00:00
|
|
|
https://scan.coverity.com/builds?project=valkey-io%2Fvalkey
|