|
1 | | ---- |
2 | | -name: CodeQL |
| 1 | +# For most projects, this workflow file will not need changing; you simply need |
| 2 | +# to commit it to your repository. |
| 3 | +# |
| 4 | +# You may wish to alter this file to override the set of languages analyzed, |
| 5 | +# or to provide custom queries or build logic. |
| 6 | +# |
| 7 | +# ******** NOTE ******** |
| 8 | +# We have attempted to detect the languages in your repository. Please check |
| 9 | +# the `language` matrix defined below to confirm you have the correct set of |
| 10 | +# supported CodeQL languages. |
| 11 | +# |
| 12 | +name: "CodeQL Advanced" |
| 13 | + |
3 | 14 | on: |
4 | 15 | push: |
5 | | - branches: |
6 | | - - develop |
7 | | - - master |
| 16 | + branches: [ "master", "develop" ] |
| 17 | + pull_request: |
| 18 | + branches: [ "master" ] |
| 19 | + |
8 | 20 | jobs: |
9 | 21 | analyze: |
10 | | - name: Analyze |
11 | | - runs-on: ubuntu-22.04 |
| 22 | + name: Analyze (${{ matrix.language }}) |
| 23 | + # Runner size impacts CodeQL analysis time. To learn more, please see: |
| 24 | + # - https://gh.io/recommended-hardware-resources-for-running-codeql |
| 25 | + # - https://gh.io/supported-runners-and-hardware-resources |
| 26 | + # - https://gh.io/using-larger-runners (GitHub.com only) |
| 27 | + # Consider using larger runners or machines with greater resources for possible analysis time improvements. |
| 28 | + runs-on: 'ubuntu-24.04' |
12 | 29 | permissions: |
| 30 | + # required for all workflows |
| 31 | + security-events: write |
| 32 | + |
| 33 | + # required to fetch internal or private CodeQL packs |
| 34 | + packages: read |
| 35 | + |
| 36 | + # only required for workflows in private repositories |
13 | 37 | actions: read |
14 | 38 | contents: read |
15 | | - security-events: write |
| 39 | + |
16 | 40 | strategy: |
17 | 41 | fail-fast: false |
18 | 42 | matrix: |
19 | | - language: |
20 | | - - cpp |
| 43 | + include: |
| 44 | + - language: c-cpp |
| 45 | + build-mode: autobuild |
| 46 | + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' |
| 47 | + # Use `c-cpp` to analyze code written in C, C++ or both |
| 48 | + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both |
| 49 | + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
| 50 | + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, |
| 51 | + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. |
| 52 | + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how |
| 53 | + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages |
21 | 54 | steps: |
22 | | - - name: Checkout |
23 | | - uses: actions/checkout@v3 |
24 | | - - name: Install Packages |
25 | | - run: | |
26 | | - echo 'deb http://download.opensuse.org/repositories/home:/PerryWerneck:/pw3270/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:PerryWerneck:pw3270.list |
27 | | - curl -fsSL https://download.opensuse.org/repositories/home:PerryWerneck:pw3270/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_PerryWerneck_pw3270.gpg > /dev/null |
28 | | - sudo apt-get update |
29 | | - sudo apt-get install --yes git make autopoint autotools-dev autoconf automake gettext libipc3270-dev |
30 | | - - name: Initialize CodeQL |
31 | | - uses: github/codeql-action/init@v2 |
32 | | - with: |
33 | | - languages: ${{ matrix.language }} |
34 | | - queries: +security-and-quality |
35 | | - - name: Autobuild |
36 | | - uses: github/codeql-action/autobuild@v2 |
37 | | - - name: Perform CodeQL Analysis |
38 | | - uses: github/codeql-action/analyze@v2 |
39 | | - with: |
40 | | - category: /language:${{ matrix.language }} |
| 55 | + - name: Checkout repository |
| 56 | + uses: actions/checkout@v4 |
| 57 | + |
| 58 | + - name: Install Packages |
| 59 | + run: | |
| 60 | + echo 'deb http://download.opensuse.org/repositories/home:/PerryWerneck:/pw3270/xUbuntu_24.04/ /' | sudo tee /etc/apt/sources.list.d/home:PerryWerneck:pw3270.list |
| 61 | + curl -fsSL https://download.opensuse.org/repositories/home:PerryWerneck:pw3270/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_PerryWerneck_pw3270.gpg > /dev/null |
| 62 | + sudo apt update |
| 63 | + sudo apt install --yes meson pkg-config pkg-config gettext libipc3270-dev |
| 64 | +
|
| 65 | + # Initializes the CodeQL tools for scanning. |
| 66 | + # Initializes the CodeQL tools for scanning. |
| 67 | + - name: Initialize CodeQL |
| 68 | + uses: github/codeql-action/init@v3 |
| 69 | + with: |
| 70 | + languages: ${{ matrix.language }} |
| 71 | + |
| 72 | + - name: Build the code |
| 73 | + run: | |
| 74 | + meson setup --prefix=/usr .build |
| 75 | + meson compile -C .build |
| 76 | +
|
| 77 | + - name: Perform CodeQL Analysis |
| 78 | + uses: github/codeql-action/analyze@v3 |
| 79 | + with: |
| 80 | + category: "/language:${{matrix.language}}" |
| 81 | + |
0 commit comments