]> www.wagner.pp.ru Git - openssl-gost/engine.git/blob - .github/workflows/codeql-analysis.yml
Making a gost provider - Add the provider foundation
[openssl-gost/engine.git] / .github / workflows / codeql-analysis.yml
1 name: "CodeQL"
2
3 env:
4   OPENSSL_BRANCH: openssl-3.0
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         # gost-engine has submodules
31         submodules: true
32
33     # If this run was triggered by a pull request event, then checkout
34     # the head of the pull request instead of the merge commit.
35     - run: git checkout HEAD^2
36       if: ${{ github.event_name == 'pull_request' }}
37
38     # Initializes the CodeQL tools for scanning.
39     - name: Initialize CodeQL
40       uses: github/codeql-action/init@v1
41       # languages: cpp
42       # Override language selection by uncommenting this and choosing your languages
43       # with:
44
45     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
46     # If this step fails, then you should remove it and run the build manually (see below)
47     #- name: Autobuild
48     #  uses: github/codeql-action/autobuild@v1
49
50     # â„šī¸ Command-line programs to run using the OS shell.
51     # đŸ“š https://git.io/JvXDl
52
53     # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines
54     #    and modify them (or add more) to build your code if your project
55     #    uses a compiled language
56
57     - run: |
58        curl -L https://cpanmin.us | sudo perl - --sudo App::cpanminus
59        sudo cpanm --notest Test2::V0 > build.log 2>&1 || (cat build.log && exit 1)
60        if [ "$APT_INSTALL" ]; then sudo apt-get install -y $APT_INSTALL; fi
61        git clone --depth 1 -b ${OPENSSL_BRANCH} https://github.com/openssl/openssl.git
62        export PREFIX=`pwd`/opt
63        export RPATH="-Wl,-rpath=${PREFIX}/lib"
64        cd openssl
65        git describe --always --long
66        ./config shared -d --prefix=${PREFIX} --openssldir=${PREFIX} --libdir=lib ${RPATH}
67        make -s build_libs
68        make -s build_programs
69        make -s install_sw
70        cd ..
71        set -e
72        mkdir build
73        cd build
74        cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_ENGINES_DIR=${PREFIX}/engines ${ASAN} ..
75        make
76
77     - name: Perform CodeQL Analysis
78       uses: github/codeql-action/analyze@v1