-
Notifications
You must be signed in to change notification settings - Fork 147
75 lines (68 loc) · 2.87 KB
/
codeql-analysis.yml
File metadata and controls
75 lines (68 loc) · 2.87 KB
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
72
73
74
75
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