CI: Deprecate Jenkins Sonar jobs
[ci-management.git] / jjb / ric-plt-alarm-go / prescan-alarm-go-ubuntu.sh
1 #!/bin/bash
2 # Installs NNG then runs a build script in the repository
3 # Assumes ubuntu - uses apt-get
4
5 echo "--> prescan-alarm-go-ubuntu.sh"
6
7 set -ex
8
9 sudo apt-get install -y cmake ninja-build
10
11 # NNG repo is not frequently tagged so it's pinned to a commit hash.
12 # This commit repairs bug https://github.com/nanomsg/nng/issues/970
13 git clone https://github.com/nanomsg/nng.git
14 (cd nng \
15     && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \
16     && mkdir build \
17     && cd build \
18     && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \
19     && ninja \
20     && sudo ninja install)
21
22 # build script must start in this subdir
23 cd build
24 bash build_ubuntu.sh
25
26 echo "--> prescan-alarm-go-ubuntu.sh ends"