Skip to content

Resolves: Add native GitHub continuous code security and quality analysis #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
50 changes: 50 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CodeQL Analysis

on:
push:
pull_request:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Setup latest .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.410

- name: Setup latest .NET 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.301

- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
queries: security-and-quality

- name: Build solution
shell: pwsh
run: |
dotnet sln LLVMSharp.sln remove tests/LLVMSharp.UnitTests/LLVMSharp.UnitTests.csproj

dotnet clean LLVMSharp.sln --configuration Release

dotnet restore LLVMSharp.sln

dotnet build LLVMSharp.sln `
--configuration Release `
--no-incremental `
-property:UseSharedCompilation=false

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)