Coverity Scan #370
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverity Scan | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 9 */4 * *" # every 4 days at 09:00 UTC | |
jobs: | |
build: | |
if: github.repository_owner == 'oshi' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Analyze with Coverity | |
run: | | |
wget -q https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_TOKEN&project=oshi%2Foshi" -O coverity_tool.tgz | |
tar -xf coverity_tool.tgz | |
./cov-analysis-linux64-*/bin/cov-configure --java | |
./cov-analysis-linux64-*/bin/cov-build --dir cov-int ./mvnw -B -DskipTests=true verify | |
tar czvf oshi.tgz cov-int | |
curl --form token=$COVERITY_TOKEN \ | |
--form email=$EMAIL \ | |
--form file=@oshi.tgz \ | |
--form version="oshi/coverity_scan" \ | |
--form description="Oshi Coverity Scan" \ | |
https://scan.coverity.com/builds?project=oshi%2Foshi | |
env: | |
COVERITY_TOKEN: ${{ secrets.COVERITY_TOKEN }} | |
EMAIL: ${{ secrets.EMAIL }} |