From 558891aab5b32c75cd68fa15bd41d9ec09fdd762 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sun, 25 Dec 2022 08:21:38 -0500 Subject: [PATCH] Use ninja instead of make in build. --- .github/workflows/build-and-test-linux.yaml | 7 ++++--- .github/workflows/build-and-test-macos.yaml | 9 +++++---- Dockerfile | 9 +++++---- appimage/build.sh | 9 +++++---- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yaml b/.github/workflows/build-and-test-linux.yaml index cceab9c0..bb2cf194 100644 --- a/.github/workflows/build-and-test-linux.yaml +++ b/.github/workflows/build-and-test-linux.yaml @@ -86,6 +86,7 @@ jobs: libxmmsclient-dev \ libxnvctrl-dev \ ncurses-dev \ + ninja \ wayland-protocols - name: Install libc++ if: matrix.compiler == 'clang' @@ -112,7 +113,7 @@ jobs: mkdir build cd build - cmake .. \ + cmake .. -G Ninja \ -DBUILD_AUDACIOUS=ON \ -DBUILD_HTTP=ON \ -DBUILD_ICAL=ON \ @@ -137,7 +138,7 @@ jobs: -DMAINTAINER_MODE=ON - name: Compile working-directory: build - run: make -j5 + run: ninja - name: Test working-directory: build - run: make test + run: ninja test diff --git a/.github/workflows/build-and-test-macos.yaml b/.github/workflows/build-and-test-macos.yaml index 933cbd67..23003186 100644 --- a/.github/workflows/build-and-test-macos.yaml +++ b/.github/workflows/build-and-test-macos.yaml @@ -22,7 +22,8 @@ jobs: librsvg \ libxft \ libxinerama \ - lua + lua \ + ninja - name: Checkout uses: actions/checkout@v3 - name: Configure with CMake @@ -30,13 +31,13 @@ jobs: set -x mkdir build cd build - cmake .. \ + cmake .. -G Ninja \ -DMAINTAINER_MODE=ON \ -DBUILD_WAYLAND=OFF \ -DBUILD_TESTS=ON - name: Compile working-directory: build - run: make -j5 + run: ninja - name: Test working-directory: build - run: make test + run: ninja test diff --git a/Dockerfile b/Dockerfile index 276826f1..3246311b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update \ libxmmsclient-dev \ libxnvctrl-dev \ make \ + ninja \ patch \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -59,7 +60,7 @@ WORKDIR /conky/build ARG X11=yes RUN sh -c 'if [ "$X11" = "yes" ] ; then \ - cmake \ + cmake -G Ninja \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_INSTALL_PREFIX=/opt/conky \ @@ -81,7 +82,7 @@ RUN sh -c 'if [ "$X11" = "yes" ] ; then \ -DBUILD_XMMS2=ON \ ../ \ ; else \ - cmake \ + cmake -G Ninja \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_INSTALL_PREFIX=/opt/conky \ @@ -103,8 +104,8 @@ RUN sh -c 'if [ "$X11" = "yes" ] ; then \ -DBUILD_XMMS2=ON \ ../ \ ; fi' \ - && make -j5 all \ - && make -j5 install + && ninja \ + && ninja install FROM ubuntu:jammy diff --git a/appimage/build.sh b/appimage/build.sh index 4f7c4a23..bf5ff081 100755 --- a/appimage/build.sh +++ b/appimage/build.sh @@ -30,7 +30,7 @@ pushd "$BUILD_DIR" # configure build files with cmake # we need to explicitly set the install prefix, as CMake's default is /usr/local for some reason... -cmake \ +cmake -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DRELEASE=ON \ -DBUILD_AUDACIOUS=ON \ @@ -53,11 +53,12 @@ cmake \ -DBUILD_X11=ON \ -DBUILD_XMMS2=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ - "$REPO_ROOT" + "$REPO_ROOT" \ + --target install -- DESTDIR=AppDir # build project and install files into AppDir -make -j4 -make install DESTDIR=AppDir +ninja +ninja install wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage