File: codeql.yml

package info (click to toggle)
genomicsdb 1.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,316 kB
  • sloc: cpp: 68,637; ansic: 58,281; java: 8,230; python: 2,315; sh: 2,115; perl: 1,621; makefile: 499; xml: 496
file content (106 lines) | stat: -rw-r--r-- 3,513 bytes parent folder | download
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
  push:
    branches: [ master, develop ]
    paths:
      - '**/CMakeLists.txt'
      - 'pom.xml'
      - 'src/main/**'
      - 'src/resources/**'
      - '.github/resources/codeql-config.yml'
      - '.github/workflows/codeql.yml'
  pull_request:
    branches: [ master, develop ]
    paths:
      - '**/CMakeLists.txt'
      - 'pom.xml'
      - 'src/main/**'
      - 'src/resources/**'
      - '.github/resources/codeql-config.yml'
      - '.github/workflows/codeql.yml'

env:
  PREREQS_ENV: ${{github.workspace}}/prereqs.sh
  PREREQS_INSTALL_DIR: ${{github.workspace}}/prereqs
  CMAKE_INSTALL_PREFIX: ${{github.workspace}}/install
  GENOMICSDB_BUILD_DIR: ${{github.workspace}}/build

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-20.04
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
      # Learn more about CodeQL language support at https://git.io/codeql-language-support

    steps:
    - uses: actions/checkout@v4

    - uses: actions/setup-java@v4
      with:
        distribution: 'temurin'
        java-package: jdk
        java-version: '17'

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v3
      with:
        config-file: ./.github/resources/codeql-config.yml
        languages: cpp, java
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.
        # queries: ./path/to/local/query, your-org/your-repo/queries@main

    - name: Cache built prerequisites for ubuntu
      uses: actions/cache@v4
      with:
        path: |
          ${{env.PREREQS_INSTALL_DIR}}
          ~/.m2/repository
          ~/awssdk-install
          ~/gcssdk-install
          ~/protobuf-install
        key: ubuntu-codeql-cache-prereqs-v1

    - name: Build GenomicsDB
      shell: bash
      run: |
        $GITHUB_WORKSPACE/.github/scripts/cleanup_hosts.sh
        echo "Install Prerequisites for Linux.."
        pushd $GITHUB_WORKSPACE/scripts/prereqs
        sudo INSTALL_PREFIX=$PREREQS_INSTALL_DIR PREREQS_ENV=$PREREQS_ENV ./install_prereqs.sh
        popd
        echo "Install prerequisites for Linux DONE"
        source $PREREQS_ENV
        cmake $GITHUB_WORKSPACE -DCMAKE_PREFIX_PATH=$PREREQS_INSTALL_DIR -DBUILD_JAVA=1 -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX
        make -j4
        make install
        rm -fr dependencies/ src/test/ test/

    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    # - name: Autobuild
    #  uses: github/codeql-action/autobuild@v1

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v3