diff --git a/.github/workflows/build-alpine.yml b/.github/workflows/build-alpine.yml index 2c38d50c..f381a66d 100644 --- a/.github/workflows/build-alpine.yml +++ b/.github/workflows/build-alpine.yml @@ -1,5 +1,5 @@ -name: Build (alpine) -on: [push, pull_request] +name: Multi-platform Builds (Alpine) +on: [pull_request] jobs: Build: strategy: @@ -20,9 +20,9 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - - name: Build (alpine) + - name: Build uses: docker/build-push-action@v3 with: context: ./ @@ -32,4 +32,4 @@ jobs: push: false cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache - platforms: linux/amd64,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v6 diff --git a/.github/workflows/build-arch-all.yml b/.github/workflows/build-arch-all.yml new file mode 100644 index 00000000..64131db9 --- /dev/null +++ b/.github/workflows/build-arch-all.yml @@ -0,0 +1,39 @@ +name: All-option Builds (Arch) +on: [pull_request] +jobs: + Build: + strategy: + matrix: + LMS_BUILD_TYPE: [Release, Debug] + LMS_UNITY_BUILD: [ON, OFF] + LMS_IMAGE_BACKEND: [stb, graphicsmagick] + runs-on: ubuntu-latest + steps: + - name: Check Out Repo + uses: actions/checkout@v3 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Build + uses: docker/build-push-action@v3 + with: + context: ./ + file: ./Dockerfile-build-arch + builder: ${{ steps.buildx.outputs.name }} + build-args: | + LMS_BUILD_TYPE=${{ matrix.LMS_BUILD_TYPE }} + LMS_UNITY_BUILD=${{ matrix.LMS_UNITY_BUILD }} + LMS_IMAGE_BACKEND=${{ matrix.LMS_IMAGE_BACKEND }} + push: false + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/build-arch.yml b/.github/workflows/build-arch-basic.yml similarity index 77% rename from .github/workflows/build-arch.yml rename to .github/workflows/build-arch-basic.yml index d9fee967..069b1dd8 100644 --- a/.github/workflows/build-arch.yml +++ b/.github/workflows/build-arch-basic.yml @@ -1,10 +1,7 @@ -name: Build (arch) -on: [push, pull_request] +name: Basic Build (Arch) +on: [push] jobs: Build: - strategy: - matrix: - BUILD_TYPE: [Release, Debug] runs-on: ubuntu-latest steps: - name: Check Out Repo @@ -20,7 +17,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build uses: docker/build-push-action@v3 @@ -28,7 +25,10 @@ jobs: context: ./ file: ./Dockerfile-build-arch builder: ${{ steps.buildx.outputs.name }} - build-args: LMS_BUILD_TYPE=${{ matrix.BUILD_TYPE }} + build-args: | + LMS_BUILD_TYPE=Release + LMS_UNITY_BUILD=ON + LMS_IMAGE_BACKEND=stb push: false cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0498d4a4..444eb88c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,8 +1,6 @@ name: "CodeQL" on: - push: - branches: [ "master", "develop" ] pull_request: branches: [ "master", "develop" ] schedule: @@ -42,24 +40,24 @@ jobs: popd - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} queries: +security-and-quality - if: matrix.language == 'javascript' name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - if: matrix.language == 'cpp' name: Build run: | mkdir -p build cd build - cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release .. + cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_UNITY_BUILD=ON .. make -j$(nproc) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{ matrix.language }}" diff --git a/Dockerfile-build-alpine b/Dockerfile-build-alpine index d7abb765..d38f71ab 100644 --- a/Dockerfile-build-alpine +++ b/Dockerfile-build-alpine @@ -37,7 +37,7 @@ ARG LMS_BUILD_TYPE="Release" RUN \ DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \ xx-info is-cross && export BUILD_TESTS=OFF || export BUILD_TESTS=ON && \ - PKG_CONFIG_PATH=/$(xx-info)/usr/lib/pkgconfig cmake /tmp/lms/ -DCMAKE_INCLUDE_PATH=/$(xx-info)/usr/include -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} $(xx-clang --print-cmake-defines) -DCMAKE_PREFIX_PATH=/$(xx-info)/usr/lib/cmake -DBUILD_TESTING=${BUILD_TESTS} -DBUILD_BENCHMARKS=ON && \ + PKG_CONFIG_PATH=/$(xx-info)/usr/lib/pkgconfig cmake /tmp/lms/ -DCMAKE_INCLUDE_PATH=/$(xx-info)/usr/include -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} $(xx-clang --print-cmake-defines) -DCMAKE_PREFIX_PATH=/$(xx-info)/usr/lib/cmake -DBUILD_TESTING=${BUILD_TESTS} -DBUILD_BENCHMARKS=ON && \ VERBOSE=1 make -j$(nproc) && \ xx-verify src/lms/lms && \ (xx-info is-cross || make test) diff --git a/Dockerfile-build-arch b/Dockerfile-build-arch index 55a5e7eb..0da7c55b 100644 --- a/Dockerfile-build-arch +++ b/Dockerfile-build-arch @@ -12,18 +12,23 @@ ARG BUILD_PACKAGES="\ libconfig \ make \ pkgconfig \ + stb \ taglib \ wt \ xxhash" -RUN pacman -Syu --noconfirm -RUN pacman -S --noconfirm ${BUILD_PACKAGES} +RUN pacman -Syu --noconfirm ${BUILD_PACKAGES} && \ + pacman -Scc --noconfirm && \ + rm -rf /var/cache/pacman/pkg/* # LMS COPY . /tmp/lms/ -ARG LMS_BUILD_TYPE="Release" -RUN \ - DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \ - cmake /tmp/lms/ -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=/usr -DLMS_IMAGE_BACKEND=graphicsmagick -DBUILD_BENCHMARKS=ON && \ - VERBOSE=1 make -j$(nproc) && \ - make test +RUN mkdir -p /tmp/lms/build +WORKDIR /tmp/lms/build + +ARG LMS_BUILD_TYPE=Release +ARG LMS_UNITY_BUILD=ON +ARG LMS_IMAGE_BACKEND=stb +RUN cmake .. -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} -DCMAKE_UNITY_BUILD=${LMS_UNITY_BUILD} -DLMS_IMAGE_BACKEND=${LMS_IMAGE_BACKEND} -DBUILD_BENCHMARKS=ON +RUN VERBOSE=1 make -j$(nproc) +RUN make test diff --git a/Dockerfile-release b/Dockerfile-release index e55552fe..69ae0be3 100644 --- a/Dockerfile-release +++ b/Dockerfile-release @@ -116,7 +116,7 @@ RUN \ COPY . /tmp/lms/ RUN \ DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \ - PKG_CONFIG_PATH=/tmp/install/lib/pkgconfig CXXFLAGS="-I${PREFIX}/include" LDFLAGS="-L${PREFIX}/lib -Wl,--rpath-link=${PREFIX}/lib" cmake /tmp/lms/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} && \ + PKG_CONFIG_PATH=/tmp/install/lib/pkgconfig CXXFLAGS="-I${PREFIX}/include" LDFLAGS="-L${PREFIX}/lib -Wl,--rpath-link=${PREFIX}/lib" cmake /tmp/lms/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE -DCMAKE_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} && \ LD_LIBRARY_PATH=${PREFIX}/lib make -j$(nproc) install && \ LD_LIBRARY_PATH=${PREFIX}/lib make test && \ mkdir -p ${PREFIX}/etc/ && \ diff --git a/INSTALL.md b/INSTALL.md index e4973605..98cad01f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -51,15 +51,14 @@ git clone https://github.com/epoupon/lms.git lms cd lms mkdir build cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr +cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_UNITY_BUILD=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE -DCMAKE_INSTALL_PREFIX=/usr ``` __Notes__: * you can customize the installation directory using `-DCMAKE_INSTALL_PREFIX=path` (defaults to `/usr/local`). * you can customize the image library using `-DLMS_IMAGE_BACKEND=` (defaults to `stb`) ```sh -make +make -j$(nproc) ``` -__Note__: you can use `make -jN` to speed up compilation time (N is the number of compilation workers to spawn). ### Installation __Note__: the commands of this section require root privileges. ```sh diff --git a/approot/admin-scansettings.xml b/approot/admin-scansettings.xml index 71339c39..a33ecec6 100644 --- a/approot/admin-scansettings.xml +++ b/approot/admin-scansettings.xml @@ -39,6 +39,15 @@ ${artist-tag-delimiter-container class="row gy-3"} +
+ + ${artists-to-not-split class="form-control"} +
+ ${artists-to-not-split-info} +
+
+
+
+ ${allow-mbid-artist-merge class="form-check-input"} + +
+ ${allow-mbid-artist-merge-info} +
+
+