2021-02-26 23:12:07 +03:00
|
|
|
name: Coverity
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
|
|
|
|
2023-08-08 08:53:58 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-02-26 23:12:07 +03:00
|
|
|
jobs:
|
|
|
|
scan:
|
2024-06-15 18:31:25 +03:00
|
|
|
name: Scan
|
2021-02-26 23:12:07 +03:00
|
|
|
runs-on: ubuntu-latest
|
2024-06-15 18:31:25 +03:00
|
|
|
if: github.repository_owner == 'SoftEtherVPN'
|
2021-02-26 23:12:07 +03:00
|
|
|
steps:
|
2024-06-15 18:31:25 +03:00
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
2021-02-26 23:12:07 +03:00
|
|
|
with:
|
|
|
|
submodules: true
|
2024-06-15 18:31:25 +03:00
|
|
|
|
2021-02-26 23:12:07 +03:00
|
|
|
- name: Install apt dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-06-16 21:19:11 +03:00
|
|
|
sudo apt-get install -y cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev libsodium-dev
|
2024-06-15 18:31:25 +03:00
|
|
|
|
2023-08-08 08:53:58 +03:00
|
|
|
- name: Download Coverity build tool
|
|
|
|
run: |
|
|
|
|
wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=SoftEtherVPN%2FSoftEtherVPN" -O coverity_tool.tar.gz
|
|
|
|
mkdir coverity_tool
|
|
|
|
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool
|
2024-06-15 18:31:25 +03:00
|
|
|
|
2023-08-08 08:53:58 +03:00
|
|
|
- name: Configure
|
|
|
|
run: |
|
|
|
|
./configure
|
2024-06-15 18:31:25 +03:00
|
|
|
|
2023-08-08 08:53:58 +03:00
|
|
|
- name: Build with Coverity build tool
|
|
|
|
run: |
|
|
|
|
export PATH=`pwd`/coverity_tool/bin:$PATH
|
|
|
|
cov-build --dir cov-int make -C build
|
2024-06-15 18:31:25 +03:00
|
|
|
|
2023-08-08 08:53:58 +03:00
|
|
|
- name: Submit build result to Coverity Scan
|
2021-02-26 23:12:07 +03:00
|
|
|
run: |
|
2023-08-08 08:53:58 +03:00
|
|
|
tar czvf cov.tar.gz cov-int
|
|
|
|
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
|
|
|
|
--form email=chipitsine@gmail.com \
|
|
|
|
--form file=@cov.tar.gz \
|
|
|
|
--form version="Commit $GITHUB_SHA" \
|
|
|
|
--form description="Build submitted via CI" \
|
|
|
|
https://scan.coverity.com/builds?project=SoftEtherVPN%2FSoftEtherVPN
|