This repository was archived by the owner on Nov 25, 2026. It is now read-only.
Repository navigation
75 lines (64 loc) · 2.25 KB
/
Copy pathcodeql.yml
File metadata and controls
75 lines (64 loc) · 2.25 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
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "36 22 * * 3"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ cpp ]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Read dependency refs
id: dep
run: |
echo "tool=$(cat .github/workflows/emp-tool.dep)" >> "$GITHUB_OUTPUT"
echo "ot=$(cat .github/workflows/emp-ot.dep)" >> "$GITHUB_OUTPUT"
- name: Build and install emp-tool + emp-ot siblings
run: |
INSTALL="$RUNNER_TEMP/install"
git clone --depth 1 --branch "${{ steps.dep.outputs.tool }}" \
https://github.com/emp-toolkit/emp-tool.git "$RUNNER_TEMP/emp-tool"
cmake -S "$RUNNER_TEMP/emp-tool" -B "$RUNNER_TEMP/emp-tool/build" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$INSTALL" \
-DEMP_TOOL_NATIVE_ARCH=OFF \
-DEMP_TOOL_BUILD_TESTS=OFF
cmake --build "$RUNNER_TEMP/emp-tool/build" -j
cmake --install "$RUNNER_TEMP/emp-tool/build"
git clone --depth 1 --branch "${{ steps.dep.outputs.ot }}" \
https://github.com/emp-toolkit/emp-ot.git "$RUNNER_TEMP/emp-ot"
cmake -S "$RUNNER_TEMP/emp-ot" -B "$RUNNER_TEMP/emp-ot/build" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$INSTALL" \
-DCMAKE_PREFIX_PATH="$INSTALL" \
-DEMP_OT_BUILD_TESTS=OFF
cmake --build "$RUNNER_TEMP/emp-ot/build" -j
cmake --install "$RUNNER_TEMP/emp-ot/build"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Build
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$RUNNER_TEMP/install"
cmake --build build -j
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"