Add CodeQL workflow for GitHub code scanning #24
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: Linux Build Status | |
on: | |
[push, pull_request] | |
jobs: | |
build-test: | |
runs-on: ubuntu-latest | |
if: "!contains(github.ref, 'coverity_scan')" | |
strategy: | |
matrix: | |
DOCKER_IMAGE: ["ubuntu-18.04", "ubuntu-20.04", "fedora-32", "opensuse-leap"] | |
TPM2TSS_BRANCH: ["3.0.x"] | |
TPM2TOOLS_BRANCH: ["4.0"] | |
CC: ["gcc", "clang"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Launch Action | |
uses: | |
tpm2-software/ci/runCI@main | |
with: | |
DOCKER_IMAGE: "${{ matrix.DOCKER_IMAGE }}" | |
TPM2TSS_BRANCH: "${{ matrix.TPM2TSS_BRANCH }}" | |
TPM2TOOLS_BRANCH: "${{ matrix.TPM2TOOLS_BRANCH }}" | |
CC: "${{ matrix.CC }}" | |
PROJECT_NAME: ${{ github.event.repository.name }} | |
- name: failure | |
if: ${{ failure() }} | |
run: cat build/test-suite.log || true | |
coverage-test: | |
runs-on: ubuntu-latest | |
if: "!contains(github.ref, 'coverity_scan')" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Launch Action | |
uses: | |
tpm2-software/ci/runCI@main | |
with: | |
DOCKER_IMAGE: ubuntu-18.04 | |
TPM2TSS_BRANCH: "3.0.x" | |
TPM2TOOLS_BRANCH: "4.0" | |
CC: gcc | |
ENABLE_COVERAGE: true | |
PROJECT_NAME: ${{ github.event.repository.name }} | |
- name: failure | |
if: ${{ failure() }} | |
run: cat build/test-suite.log || true | |
coverity-test: | |
runs-on: ubuntu-latest | |
environment: coverity | |
if: contains(github.ref, 'coverity_scan') && github.event_name == 'push' | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Launch Coverity Scan Action | |
uses: | |
tpm2-software/ci/coverityScan@main | |
with: | |
PROJECT_NAME: ${{ github.event.repository.name }} | |
ENABLE_COVERITY: true | |
TPM2TSS_BRANCH: "3.0.x" | |
TPM2TOOLS_BRANCH: "4.0" | |
REPO_BRANCH: ${{ github.ref }} | |
REPO_NAME: ${{ github.repository }} | |
DOCKER_IMAGE: ubuntu-18.04 | |
CC: gcc | |
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
COVERITY_SUBMISSION_EMAIL: [email protected] | |
whitespace-check: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' && !contains(github.ref, 'coverity_scan') | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Perform Whitespace Check | |
env: | |
BASE_REF: ${{ github.base_ref }} | |
run: git fetch origin "$BASE_REF" && git diff --check "origin/$BASE_REF" |