mirror of
https://github.com/TokTok/c-toxcore
synced 2026-10-23 02:12:31 +00:00
chore: Add sonar-scan analysis on pushes.
We can't run this on pull requests because it needs access to the `SONAR_TOKEN` secret. Perhaps in the future we can make it a `pull_request_target` workflow, but then we can't use cmake to initialise the environment, meaning we need to specify the inputs manually.
This commit is contained in:
10 files changed
+101
-11
No files matched your search
@@ -26,8 +26,6 @@ scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P "$SSH_PORT" -
|
||||
RUN ls -lh
|
||||
|
||||
cd /c-toxcore
|
||||
CACHEDIR=/opt/cache
|
||||
mkdir "$CACHEDIR"
|
||||
. ".github/scripts/flags-clang.sh"
|
||||
|
||||
add_ld_flag -Wl,-z,defs
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
set -eu
|
||||
|
||||
CACHEDIR="$HOME/cache"
|
||||
NPROC=$(nproc)
|
||||
|
||||
sudo apt-get install -y --no-install-recommends libopus-dev libsodium-dev libvpx-dev ninja-build
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
set -eu
|
||||
|
||||
CACHEDIR="$HOME/cache"
|
||||
NPROC=$(sysctl -n hw.physicalcpu)
|
||||
|
||||
# Workaround for bug in Homebrew where it only finds an old Ruby version.
|
||||
|
||||
@@ -4,7 +4,6 @@ ACTION="$1"
|
||||
|
||||
set -eu
|
||||
|
||||
CACHEDIR="$HOME/cache"
|
||||
NPROC=$(nproc)
|
||||
|
||||
ci_install() {
|
||||
|
||||
@@ -9,9 +9,6 @@ add_flag() {
|
||||
add_cxx_flag "$@"
|
||||
}
|
||||
|
||||
export LD_LIBRARY_PATH="$CACHEDIR/lib"
|
||||
export PKG_CONFIG_PATH="$CACHEDIR/lib/pkgconfig"
|
||||
|
||||
# Our own flags which we can insert in the correct place. We don't use CFLAGS
|
||||
# and friends here (we unset them below), because they influence config tests
|
||||
# such as ./configure and cmake tests. Our warning flags break those tests, so
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
. ".github/scripts/flags-gcc.sh"
|
||||
|
||||
cmake --build _build --parallel "$(nproc)" --target install -- -k 0
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
sudo apt-get install -y --no-install-recommends libconfig-dev libopus-dev libsodium-dev libvpx-dev ninja-build
|
||||
|
||||
. ".github/scripts/flags-gcc.sh"
|
||||
|
||||
add_ld_flag -Wl,-z,defs
|
||||
|
||||
# Make compilation error on a warning
|
||||
add_flag -Werror
|
||||
|
||||
cmake -B_build -H. -GNinja \
|
||||
-DCMAKE_C_FLAGS="$C_FLAGS" \
|
||||
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="$LD_FLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="$PWD/_install" \
|
||||
-DMIN_LOGGER_LEVEL=TRACE \
|
||||
-DMUST_BUILD_TOXAV=ON \
|
||||
-DNON_HERMETIC_TESTS=OFF \
|
||||
-DSTRICT_ABI=ON \
|
||||
-DTEST_TIMEOUT_SECONDS=120 \
|
||||
-DUSE_IPV6=OFF \
|
||||
-DAUTOTEST=ON \
|
||||
-DENABLE_SHARED=OFF
|
||||
Reference in new issue
Block a user