aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/codeql-analysis.yml
blob: 05e718c10bb366d7dde19508cb9d195103bf2818 (plain) (blame)
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
# CodeQL GH Actions file
name: CodeQL

on:
  push:
    branches:
      - '*-dev'
      - '*-maint'
  pull_request:
    # The branches below must be a subset of the branches above
    branches:
      - '*-dev'
    paths-ignore:
      - '**/*.md'
      - '**/*.txt'
      - 'contrib'
      - 'doc'
      - 'share'
      - 'qa'

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

    strategy:
      fail-fast: false
      matrix:
        language: [ 'cpp' ]
        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    - name: Update system
      run: |
        sudo apt-get update --yes
        sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils --yes

    - name: Dependency cache
      uses: actions/cache@v2
      env:
        cache-name: depends
      with:
        path: ./depends/built
        key: codeql-${{ env.cache-name }}-${{ hashFiles('depends/packages/*') }}

    - name: Build depends
      run: |
        pushd depends
        make -j4 HOST=x86_64-pc-linux-gnu
        popd

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v1
      with:
        languages: ${{ matrix.language }}

    - name: Build Dogecoin
      run: |
       ./autogen.sh
       ./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu
       make -j4

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