Repository navigation
81 lines (68 loc) · 2.05 KB
/
Copy pathcodeql.yml
File metadata and controls
81 lines (68 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: codeql
run-name: ${{ github.actor }} CodeQL analysis
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
contents: read
security-events: write
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1"
push:
branches:
- dev
paths:
- "apps/server/**"
- "libs/**"
- ".github/**"
pull_request:
branches:
- dev
paths:
- "apps/server/**"
- "libs/**"
- ".github/**"
merge_group:
branches:
- dev
jobs:
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language:
- javascript-typescript
- rust
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- name: Install zstd
run: sudo apt-get update && sudo apt-get install -y zstd
# Free disk space must run BEFORE Initialize CodeQL,
# otherwise it deletes the freshly installed CodeQL binary.
- name: Free Disk Space
if: matrix.language == 'rust'
uses: ./.github/actions/free-disk-space
- name: Setup Nix
if: matrix.language == 'rust'
uses: ./.github/actions/setup-nix
- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
languages: ${{ matrix.language }}
# vanling-server excluded: requires SHERPA_ONNX_LIB_DIR (sherpa-onnx prebuilt libs)
# only available via Nix buildRustPackage, not the devShell
- name: Build Rust
if: matrix.language == 'rust'
run: nix develop --command cargo build --workspace --exclude vanling-server --verbose
- name: Autobuild
uses: github/codeql-action/autobuild@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
if: matrix.language != 'rust'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1