|
| 1 | +name: "CodeQL" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + # The branches below must be a subset of the branches above |
| 8 | + branches: [ master ] |
| 9 | + schedule: |
| 10 | + - cron: '33 12 * * 6' |
| 11 | + |
| 12 | +jobs: |
| 13 | + analyze: |
| 14 | + name: Analyze |
| 15 | + runs-on: ubuntu-latest |
| 16 | + permissions: |
| 17 | + actions: read |
| 18 | + contents: read |
| 19 | + security-events: write |
| 20 | + |
| 21 | + strategy: |
| 22 | + fail-fast: false |
| 23 | + matrix: |
| 24 | + language: [ 'cpp' ] |
| 25 | + |
| 26 | + steps: |
| 27 | + - name: Checkout repository |
| 28 | + uses: actions/checkout@v3 |
| 29 | + |
| 30 | + - name: Install dependencies |
| 31 | + run: | |
| 32 | + sudo apt-get update |
| 33 | + sudo apt-get -y install git build-essential autoconf libtool libpcap-dev pkg-config libxml2-dev libfuse3-dev fuse3 cmake liblz4-dev |
| 34 | + ( git clone --depth 1 https://github.com/CESNET/nemea-framework /tmp/nemea-framework; cd /tmp/nemea-framework; ./bootstrap.sh &&./configure --bindir=/usr/bin/nemea/ -q &&make -j10 && sudo make install; sudo ldconfig) |
| 35 | + ( git clone -b release --depth 1 https://github.com/CESNET/telemetry /tmp/telemetry; cd /tmp/telemetry; mkdir build && cd build; cmake -DCMAKE_INSTALL_PREFIX=/usr .. &&make -j10 && sudo make install; ) |
| 36 | + # Initializes the CodeQL tools for scanning. |
| 37 | + - name: Initialize CodeQL |
| 38 | + uses: github/codeql-action/init@v2 |
| 39 | + with: |
| 40 | + languages: ${{ matrix.language }} |
| 41 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 42 | + # By default, queries listed here will override any specified in a config file. |
| 43 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 44 | + # queries: ./path/to/local/query, your-org/your-repo/queries@main |
| 45 | + |
| 46 | + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 47 | + # If this step fails, then you should remove it and run the build manually (see below) |
| 48 | + #- name: Autobuild |
| 49 | + # uses: github/codeql-action/autobuild@v2 |
| 50 | + |
| 51 | + # ℹ️ Command-line programs to run using the OS shell. |
| 52 | + # 📚 https://git.io/JvXDl |
| 53 | + |
| 54 | + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
| 55 | + # and modify them (or add more) to build your code if your project |
| 56 | + # uses a compiled language |
| 57 | + |
| 58 | + #- run: | |
| 59 | + # make bootstrap |
| 60 | + # make release |
| 61 | + - name: Build |
| 62 | + run: | |
| 63 | + autoreconf -i |
| 64 | + ./configure --with-nemea |
| 65 | + make |
| 66 | +
|
| 67 | + - name: Perform CodeQL Analysis |
| 68 | + uses: github/codeql-action/analyze@v2 |
0 commit comments