|
| 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 | +name: "CodeQL" |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: [master] |
| 11 | + pull_request: |
| 12 | + # The branches below must be a subset of the branches above |
| 13 | + branches: [master] |
| 14 | + schedule: |
| 15 | + - cron: '0 8 * * 0' |
| 16 | + |
| 17 | +jobs: |
| 18 | + analyze: |
| 19 | + name: Analyze |
| 20 | + runs-on: ubuntu-20.04 |
| 21 | + |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + # Override automatic language detection by changing the below list |
| 26 | + # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] |
| 27 | + language: ['cpp'] |
| 28 | + # Learn more... |
| 29 | + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
| 30 | + |
| 31 | + steps: |
| 32 | + - name: Checkout repository |
| 33 | + uses: actions/checkout@v2 |
| 34 | + with: |
| 35 | + # We must fetch at least the immediate parents so that if this is |
| 36 | + # a pull request then we can checkout the head. |
| 37 | + fetch-depth: 2 |
| 38 | + path: remote-software |
| 39 | + |
| 40 | + - name: Checkout integrations.library |
| 41 | + uses: actions/checkout@v2 |
| 42 | + with: |
| 43 | + repository: YIO-Remote/integrations.library |
| 44 | + path: integrations.library |
| 45 | + |
| 46 | + # If this run was triggered by a pull request event, then checkout |
| 47 | + # the head of the pull request instead of the merge commit. |
| 48 | + - run: git checkout HEAD^2 |
| 49 | + if: ${{ github.event_name == 'pull_request' }} |
| 50 | + working-directory: remote-software |
| 51 | + |
| 52 | + # Initializes the CodeQL tools for scanning. |
| 53 | + - name: Initialize CodeQL |
| 54 | + uses: github/codeql-action/init@v1 |
| 55 | + with: |
| 56 | + languages: ${{ matrix.language }} |
| 57 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 58 | + # By default, queries listed here will override any specified in a config file. |
| 59 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 60 | + # queries: ./path/to/local/query, your-org/your-repo/queries@main |
| 61 | + |
| 62 | + - name: Cache Qt |
| 63 | + id: cache-qt |
| 64 | + uses: actions/cache@v1 |
| 65 | + with: |
| 66 | + path: ../Qt |
| 67 | + key: ${{ runner.os }}-QtCache |
| 68 | + |
| 69 | + - name: Install Qt |
| 70 | + uses: jurplel/install-qt-action@v2 |
| 71 | + with: |
| 72 | + modules: qtvirtualkeyboard, qtnetworkauth |
| 73 | + cached: ${{ steps.cache-qt.outputs.cache-hit }} |
| 74 | + |
| 75 | + - name: Install system libs |
| 76 | + if: runner.os == 'Linux' |
| 77 | + run: | |
| 78 | + sudo apt install libavahi-client-dev libgl1-mesa-dev g++-8 libstdc++-8-dev |
| 79 | +
|
| 80 | + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 81 | + # If this step fails, then you should remove it and run the build manually (see below) |
| 82 | + #- name: Autobuild |
| 83 | + # uses: github/codeql-action/autobuild@v1 |
| 84 | + |
| 85 | + # ℹ️ Command-line programs to run using the OS shell. |
| 86 | + # 📚 https://git.io/JvXDl |
| 87 | + |
| 88 | + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
| 89 | + # and modify them (or add more) to build your code if your project |
| 90 | + # uses a compiled language |
| 91 | + |
| 92 | + - name: Build |
| 93 | + run: | |
| 94 | + qmake |
| 95 | + make -j 3 |
| 96 | + working-directory: remote-software |
| 97 | + |
| 98 | + - name: Perform CodeQL Analysis |
| 99 | + uses: github/codeql-action/analyze@v1 |
| 100 | + with: |
| 101 | + checkout_path: ${{ github.workspace }}/remote-software |
0 commit comments