diff options
Diffstat (limited to 'util/ci')
-rwxr-xr-x | util/ci/build.sh | 14 | ||||
-rwxr-xr-x | util/ci/build_prometheus_cpp.sh | 2 | ||||
-rwxr-xr-x | util/ci/clang-tidy.sh | 12 | ||||
-rw-r--r-- | util/ci/common.sh | 9 |
4 files changed, 17 insertions, 20 deletions
diff --git a/util/ci/build.sh b/util/ci/build.sh index ba77cd645..88349b852 100755 --- a/util/ci/build.sh +++ b/util/ci/build.sh @@ -1,8 +1,10 @@ #! /bin/bash -e -mkdir cmakebuild -cd cmakebuild -cmake -DCMAKE_BUILD_TYPE=Debug \ - -DRUN_IN_PLACE=TRUE -DENABLE_GETTEXT=TRUE \ - -DBUILD_SERVER=TRUE ${CMAKE_FLAGS} .. -make -j2 +cmake -B build \ + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Debug} \ + -DRUN_IN_PLACE=TRUE \ + -DENABLE_GETTEXT=${CMAKE_ENABLE_GETTEXT:-TRUE} \ + -DBUILD_SERVER=${CMAKE_BUILD_SERVER:-TRUE} \ + ${CMAKE_FLAGS} + +cmake --build build --parallel $(($(nproc) + 1)) diff --git a/util/ci/build_prometheus_cpp.sh b/util/ci/build_prometheus_cpp.sh index edfd574cd..f3e4a5559 100755 --- a/util/ci/build_prometheus_cpp.sh +++ b/util/ci/build_prometheus_cpp.sh @@ -8,6 +8,6 @@ cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_TESTING=0 -make -j2 +make -j$(nproc) sudo make install diff --git a/util/ci/clang-tidy.sh b/util/ci/clang-tidy.sh index bb4e99fef..e678cf3b9 100755 --- a/util/ci/clang-tidy.sh +++ b/util/ci/clang-tidy.sh @@ -1,17 +1,13 @@ #! /bin/bash -eu -mkdir -p cmakebuild -cd cmakebuild -cmake -DCMAKE_BUILD_TYPE=Debug \ +cmake -B build -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DRUN_IN_PLACE=TRUE \ -DENABLE_{GETTEXT,SOUND}=FALSE \ - -DBUILD_SERVER=TRUE .. -make GenerateVersion - -cd .. + -DBUILD_SERVER=TRUE +cmake --build build --target GenerateVersion ./util/ci/run-clang-tidy.py \ - -clang-tidy-binary=clang-tidy-9 -p cmakebuild \ + -clang-tidy-binary=clang-tidy-9 -p build \ -quiet -config="$(cat .clang-tidy)" \ 'src/.*' diff --git a/util/ci/common.sh b/util/ci/common.sh index 88bed9ed4..82529c712 100644 --- a/util/ci/common.sh +++ b/util/ci/common.sh @@ -7,19 +7,18 @@ install_linux_deps() { libhiredis-dev libogg-dev libgmp-dev libvorbis-dev libopenal-dev \ gettext libpq-dev libleveldb-dev libcurl4-openssl-dev libzstd-dev) - if [[ "$1" == "--old-irr" ]]; then + if [[ "$1" == "--no-irr" ]]; then + shift + elif [[ "$1" == "--old-irr" ]]; then shift pkgs+=(libirrlicht-dev) else - wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt3/ubuntu-bionic.tar.gz" + wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt5/ubuntu-bionic.tar.gz" sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local fi sudo apt-get update sudo apt-get install -y --no-install-recommends ${pkgs[@]} "$@" - - # workaround for bug with Github Actions' ubuntu-18.04 image - sudo apt-get remove -y libgcc-11-dev gcc-11 || : } # Mac OSX build only |