From d1ed8488a4493cba46ada496dcc917358a7cb1fb Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Mon, 19 Dec 2022 17:10:41 +0200 Subject: [PATCH] Setup Code-QL scans (#1130) IB-7528 Signed-off-by: Raul Metsma Signed-off-by: Raul Metsma --- .github/workflows/build.yml | 31 ++++++++++++++++++++++++++++++- README.md | 4 ++-- lgtm.yml | 28 ---------------------------- 3 files changed, 32 insertions(+), 31 deletions(-) delete mode 100644 lgtm.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8c2c34f8..c40a5c7a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -214,7 +214,7 @@ jobs: build/*.appx coverity: name: Run Coverity tests - if: contains(github.repository, 'open-eid/DigiDoc4-Client') && contains(github.ref, 'coverity_scan') + if: github.repository == 'open-eid/DigiDoc4-Client' && contains(github.ref, 'coverity_scan') runs-on: ubuntu-20.04 env: TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} @@ -257,3 +257,32 @@ jobs: -F version=master \ -F description="Github Actions CI build" \ https://scan.coverity.com/builds?project=$PROJECTNAME + codeql: + name: Run CodeQL tests + if: github.repository == 'open-eid/DigiDoc4-Client' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Install dependencies + run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libldap2-dev gettext libpcsclite-dev libminizip-dev libxml-security-c-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev + - name: Download artifact + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build.yml + branch: master + name: debs + path: libdigidocpp-pkg + repo: open-eid/libdigidocpp + - name: Install artifact + run: sudo dpkg -i libdigidocpp-pkg/*$(lsb_release -rs)*.deb + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: cpp + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/README.md b/README.md index 2888b4357..03e2b3229 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ * Install # Ubuntu - sudo apt install cmake qttools5-dev libqt5svg5-dev qttools5-dev-tools libpcsclite-dev libssl-dev libdigidocpp-dev libldap2-dev gettext pkg-config + sudo apt install cmake qt6-tools-dev libqt6core5compat6-dev libqt6svg6-dev libpcsclite-dev libssl-dev libdigidocpp-dev libldap2-dev gettext pkg-config # Fedora - sudo dnf install qt5-qttools-devel qt5-qtsvg-devel qt5-linguist pcsc-lite-devel openssl-devel libdigidocpp openldap-devel gettext pkg-config + sudo dnf install qt6-qtsvg-devel qt6-qttools-devel qt6-qt5compat-devel pcsc-lite-devel openssl-devel libdigidocpp openldap-devel gettext pkg-config * Also runtime dependency opensc-pkcs11 and pcscd is needed diff --git a/lgtm.yml b/lgtm.yml deleted file mode 100644 index 9f667c81f..000000000 --- a/lgtm.yml +++ /dev/null @@ -1,28 +0,0 @@ -extraction: - cpp: - prepare: - packages: - - cmake - - vim-common - - xsdcxx - - libxml-security-c-dev - - zlib1g-dev - - libldap2-dev - - gettext - - libpcsclite-dev - - libminizip-dev - - libxml-security-c-dev - - libqt5svg5-dev - - qttools5-dev-tools - - qttools5-dev - after_prepare: - - git clone --recursive --depth 1 https://github.com/open-eid/libdigidocpp.git - - cd libdigidocpp - - cmake -DCMAKE_INSTALL_PREFIX=../libdigidocpp-install -DCMAKE_INSTALL_SYSCONFDIR=$PWD/../libdigidocpp-install/etc -DPODOFO_INCLUDE_DIR=NOTFOUND . - - make install - - cd .. - configure: - command: - - mkdir _lgtm_build_dir - - cd _lgtm_build_dir - - cmake -DLIBDIGIDOCPP_LIBRARY=../libdigidocpp-install/lib/libdigidocpp.so -DLIBDIGIDOCPP_INCLUDE_DIR=../libdigidocpp-install/include ..