|
|
@ -7,7 +7,6 @@ permissions:
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
coverity_scan:
|
|
|
|
coverity_scan:
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Coverity Scan
|
|
|
|
name: Coverity Scan
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
@ -35,8 +34,18 @@ jobs:
|
|
|
|
- name: Submit results to Coverity
|
|
|
|
- name: Submit results to Coverity
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
tar czf cov-int.tgz cov-int
|
|
|
|
tar czf cov-int.tgz cov-int
|
|
|
|
curl --form token="${{ secrets.COVERITY_TOKEN }}" \
|
|
|
|
response=$(curl --silent --show-error --fail \
|
|
|
|
--form file=@cov-int.tgz \
|
|
|
|
--form token="${{ secrets.COVERITY_TOKEN }}" \
|
|
|
|
--form version="GitHub PR #${{ github.event.pull_request.number }}" \
|
|
|
|
--form file=@cov-int.tgz \
|
|
|
|
--form description="CI run for PR" \
|
|
|
|
--form version="GitHub PR #${{ github.event.pull_request.number }}" \
|
|
|
|
https://scan.coverity.com/builds?project=gabime%2Fspdlog
|
|
|
|
--form description="CI run for PR" \
|
|
|
|
|
|
|
|
https://scan.coverity.com/builds?project=gabime%2Fspdlog)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "$response"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if echo "$response" | grep -qi "Build successfully submitted"; then
|
|
|
|
|
|
|
|
echo "Coverity upload succeeded"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Coverity upload failed or was rejected"
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
fi
|
|
|
|