Enabled unity build by default
This commit is contained in:
@@ -6,6 +6,7 @@ jobs:
|
||||
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
|
||||
@@ -32,6 +33,7 @@ jobs:
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -12,6 +12,7 @@ ARG BUILD_PACKAGES="\
|
||||
libconfig \
|
||||
make \
|
||||
pkgconfig \
|
||||
stb \
|
||||
taglib \
|
||||
wt \
|
||||
xxhash"
|
||||
@@ -27,6 +28,7 @@ WORKDIR /tmp/lms/build
|
||||
|
||||
ARG LMS_BUILD_TYPE=Release
|
||||
ARG LMS_UNITY_BUILD=ON
|
||||
RUN cmake .. -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} -DCMAKE_UNITY_BUILD=${LMS_UNITY_BUILD} -DLMS_IMAGE_BACKEND=graphicsmagick -DBUILD_BENCHMARKS=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
|
||||
|
||||
+1
-1
@@ -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/ && \
|
||||
|
||||
+2
-3
@@ -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=<stb|graphicsmagick>` (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
|
||||
|
||||
Reference in New Issue
Block a user