Fixed issues highlighted by cppcheck/ASAN [docker_verify] #418
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Code Analysis using CodeQL" | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| analyze: | |
| name: Analyze | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, '[skip_build]')" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: ['cpp'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v2 | |
| with: | |
| languages: ${{ matrix.language }} | |
| - run: | | |
| sudo apt update -yqq && sudo apt install --no-install-recommends -yqq ninja-build libpq-dev libcurl4-openssl-dev autoconf-archive unzip uuid-dev odbc-postgresql unixodbc unixodbc-dev apache2 apache2-dev libapr1-dev libaprutil1-dev memcached libmemcached-dev redis-server libssl-dev zlib1g-dev cmake make clang-format ninja-build libjsoncpp-dev libjansson-dev libc-ares-dev libboost-all-dev | |
| pushd /tmp | |
| wget -q https://github.com/efficient/libcuckoo/archive/master.zip | |
| unzip master.zip | |
| rm -f master.zip | |
| cd libcuckoo-master | |
| cmake -DCMAKE_INSTALL_PREFIX=/usr . && sudo make install | |
| cd /tmp | |
| rm -rf libcuckoo-master | |
| #wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.2/mongo-c-driver-1.4.2.tar.gz | |
| #tar xf mongo-c-driver-1.4.2.tar.gz | |
| #rm -f mongo-c-driver-1.4.2.tar.gz | |
| #cd mongo-c-driver-1.4.2/ && ./configure --disable-automatic-init-and-cleanup && make && sudo make install | |
| #cd /tmp | |
| #rm -rf mongo-c-driver-1.4.2 | |
| VERSION=1.26.2 | |
| wget "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/$VERSION.tar.gz" --output-document="mongo-c-driver-$VERSION.tar.gz" | |
| tar xf "mongo-c-driver-$VERSION.tar.gz" | |
| rm -f "mongo-c-driver-$VERSION.tar.gz" | |
| cd mongo-c-driver-$VERSION/ && mkdir _build && cmake -S . -B _build \ | |
| -D ENABLE_EXTRA_ALIGNMENT=OFF \ | |
| -D ENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -D ENABLE_TESTS=OFF -D ENABLE_EXAMPLES=OFF \ | |
| -D CMAKE_BUILD_TYPE=RelWithDebInfo \ | |
| -D BUILD_VERSION="$VERSION" \ | |
| -D ENABLE_SSL=OFF \ | |
| -D ENABLE_SASL=OFF \ | |
| -D ENABLE_MONGOC=ON && cmake --build _build --config RelWithDebInfo --parallel && sudo cmake --install _build | |
| rm -rf "mongo-c-driver-$VERSION" | |
| wget -q https://github.com/redis/hiredis/archive/v1.0.0.tar.gz | |
| tar xf v1.0.0.tar.gz | |
| rm -f v1.0.0.tar.gz | |
| cd hiredis-1.0.0/ | |
| cmake . && sudo make install | |
| cd /tmp | |
| rm -rf hiredis-1.0.0 | |
| popd | |
| cmake -GNinja -DSRV_EMB=on -DMOD_MEMCACHED=on -DMOD_REDIS=on -DMOD_SDORM_MONGO=on . | |
| sudo ninja install | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v2 |