]> www.wagner.pp.ru Git - openssl-gost/engine.git/blob - .github/workflows/codeql-analysis.yml
8c6a405a66e123093751075de154fa423cb3e2b6
[openssl-gost/engine.git] / .github / workflows / codeql-analysis.yml
1 name: "CodeQL"
2
3 env:
4   OPENSSL_BRANCH: openssl-3.0.0-alpha6
5   #RPATH: "-Wl,-rpath=${PREFIX}/lib"
6   #PREFIX: ${HOME}/opt
7   #PATH: ${PREFIX}/bin:${PATH}
8
9 on:
10   push:
11     branches: [master, ]
12   pull_request:
13     # The branches below must be a subset of the branches above
14     branches: [master]
15   schedule:
16     - cron: '0 2 * * 0'
17
18 jobs:
19   analyse:
20     name: Analyse
21     runs-on: ubuntu-latest
22
23     steps:
24     - name: Checkout repository
25       uses: actions/checkout@v2
26       with:
27         # We must fetch at least the immediate parents so that if this is
28         # a pull request then we can checkout the head.
29         fetch-depth: 2
30
31     # If this run was triggered by a pull request event, then checkout
32     # the head of the pull request instead of the merge commit.
33     - run: git checkout HEAD^2
34       if: ${{ github.event_name == 'pull_request' }}
35
36     # Initializes the CodeQL tools for scanning.
37     - name: Initialize CodeQL
38       uses: github/codeql-action/init@v1
39       # languages: cpp
40       # Override language selection by uncommenting this and choosing your languages
41       # with:
42
43     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
44     # If this step fails, then you should remove it and run the build manually (see below)
45     #- name: Autobuild
46     #  uses: github/codeql-action/autobuild@v1
47
48     # â„šī¸ Command-line programs to run using the OS shell.
49     # đŸ“š https://git.io/JvXDl
50
51     # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines
52     #    and modify them (or add more) to build your code if your project
53     #    uses a compiled language
54
55     - run: |
56        curl -L https://cpanmin.us | sudo perl - --sudo App::cpanminus
57        sudo cpanm --notest Test2::V0 > build.log 2>&1 || (cat build.log && exit 1)
58        if [ "$APT_INSTALL" ]; then sudo apt-get install -y $APT_INSTALL; fi
59        git clone --depth 1 -b ${OPENSSL_BRANCH} https://github.com/openssl/openssl.git
60        export PREFIX=`pwd`/opt
61        export RPATH="-Wl,-rpath=${PREFIX}/lib"
62        cd openssl
63        git describe --always --long
64        ./config shared -d --prefix=${PREFIX} --openssldir=${PREFIX} ${RPATH}
65        make -s build_libs
66        make -s build_programs
67        make -s install_sw
68        cd ..
69        set -e
70        mkdir build
71        cd build
72        cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_LIBRARIES=${PREFIX}/lib -DOPENSSL_ENGINES_DIR=${PREFIX}/engines ${ASAN} ..
73        make
74
75     - name: Perform CodeQL Analysis
76       uses: github/codeql-action/analyze@v1