|
6 | 6 | jobs:
|
7 | 7 | analyze:
|
8 | 8 | name: Analyze
|
9 |
| - runs-on: ubuntu-22.04 |
| 9 | + runs-on: ${{ matrix.config.runner }} |
10 | 10 | permissions:
|
11 | 11 | actions: read
|
12 | 12 | contents: read
|
13 | 13 | security-events: write
|
14 | 14 | strategy:
|
15 | 15 | fail-fast: false
|
16 | 16 | matrix:
|
17 |
| - language: ['go', 'actions'] |
| 17 | + config: |
| 18 | + - runner: ubuntu-24.04 |
| 19 | + language: 'go' |
| 20 | + - os: ubuntu-24.04 |
| 21 | + language: 'go' |
| 22 | + - os: ubuntu-latest-64-cores-256gb |
| 23 | + language: 'cpp' |
18 | 24 | steps:
|
19 | 25 | - name: Checkout repository
|
20 | 26 | uses: actions/checkout@v4
|
21 | 27 | - name: Initialize CodeQL
|
22 | 28 | uses: github/codeql-action/init@v3
|
23 | 29 | with:
|
24 |
| - languages: ${{ matrix.language }} |
25 |
| - - name: Autobuild |
26 |
| - uses: github/codeql-action/autobuild@v3 |
27 |
| - - name: Perform CodeQL Analysis |
28 |
| - uses: github/codeql-action/analyze@v3 |
29 |
| - with: |
30 |
| - category: '/language:${{matrix.language}}' |
| 30 | + languages: ${{ matrix.config.language }} |
31 | 31 |
|
32 |
| - analyze-cpp: |
33 |
| - name: Analyze |
34 |
| - runs-on: ubuntu-latest-64-cores-256gb |
35 |
| - permissions: |
36 |
| - actions: read |
37 |
| - contents: read |
38 |
| - security-events: write |
39 |
| - steps: |
40 |
| - - name: Checkout repository |
41 |
| - uses: actions/checkout@v4 |
42 |
| - |
43 |
| - - name: Initialize CodeQL |
44 |
| - uses: github/codeql-action/init@v3 |
45 |
| - with: |
46 |
| - languages: 'cpp' |
47 |
| - |
48 |
| - - name: Install deps (for C++) |
49 |
| - shell: bash |
50 |
| - run: | |
51 |
| - sudo apt-get update --error-on=any |
52 |
| - sudo apt-get install --yes \ |
53 |
| - libtool cmake automake autoconf make ninja-build curl unzip \ |
54 |
| - virtualenv openjdk-11-jdk build-essential libc++1 |
55 |
| - mkdir -p bin/clang17 |
56 |
| - cd bin/clang17 |
57 |
| - wget https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz |
58 |
| - tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz --strip-components 1 |
| 32 | + - name: Install deps (for C++) |
| 33 | + if: matrix.config.language == 'cpp' |
| 34 | + shell: bash |
| 35 | + run: | |
| 36 | + sudo apt-get update --error-on=any |
| 37 | + sudo apt-get install --yes \ |
| 38 | + libtool cmake automake autoconf make ninja-build curl unzip \ |
| 39 | + virtualenv openjdk-11-jdk build-essential libc++1 |
| 40 | + mkdir -p bin/clang17 |
| 41 | + cd bin/clang17 |
| 42 | + wget https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz |
| 43 | + tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz --strip-components 1 |
59 | 44 |
|
60 |
| - - name: Build (for C++) |
61 |
| - run: | |
62 |
| - bazel/setup_clang.sh bin/clang17 |
63 |
| - bazelisk shutdown |
64 |
| - bazel build \ |
| 45 | + - name: Build (for C++) |
| 46 | + if: matrix.config.language == 'cpp' |
| 47 | + run: | |
| 48 | + bazel/setup_clang.sh bin/clang17 |
| 49 | + bazelisk shutdown |
| 50 | + bazel build \ |
65 | 51 | -c fastbuild \
|
66 | 52 | --spawn_strategy=local \
|
67 | 53 | --discard_analysis_cache \
|
|
71 | 57 | --config=ci \
|
72 | 58 | //cilium/...
|
73 | 59 |
|
74 |
| - - name: Perform CodeQL Analysis |
75 |
| - uses: github/codeql-action/analyze@v3 |
76 |
| - with: |
77 |
| - category: '/language:cpp' |
| 60 | + - name: Autobuild |
| 61 | + if: matrix.config.language != 'cpp' |
| 62 | + uses: github/codeql-action/autobuild@v3 |
| 63 | + |
| 64 | + - name: Perform CodeQL Analysis |
| 65 | + uses: github/codeql-action/analyze@v3 |
| 66 | + with: |
| 67 | + category: '/language:${{matrix.config.language}}' |
0 commit comments