xref: /freebsd/contrib/libfido2/.github/workflows/codeql-analysis.yml (revision a90b9d0159070121c221b966469c3e36d912bf82)
1# Copyright (c) 2022 Yubico AB. All rights reserved.
2# Use of this source code is governed by a BSD-style
3# license that can be found in the LICENSE file.
4# SPDX-License-Identifier: BSD-2-Clause
5
6name: "codeql"
7
8on:
9  pull_request:
10    branches:
11    - main
12  push:
13    branches:
14    - main
15    - '*-ci'
16  schedule:
17    - cron: '0 0 * * 0'
18
19permissions:
20  security-events: write
21
22jobs:
23  codeql-build:
24    if: github.repository == 'Yubico/libfido2'
25    runs-on: ubuntu-22.04
26    steps:
27    - name: checkout
28      uses: actions/checkout@v4
29      with:
30        fetch-depth: 2
31    - name: init codeql
32      uses: github/codeql-action/init@v2
33    - name: build
34      env:
35        CC: gcc
36      run: |
37        sudo apt -q update
38        sudo apt install -q -y libcbor-dev libudev-dev libz-dev original-awk \
39         libpcsclite-dev
40        ./.actions/build-linux-gcc
41    - name: perform codeql analysis
42      uses: github/codeql-action/analyze@v2
43