Switched from Travis CI to github actions
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
build
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
name: Build
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
Build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
BUILD_TYPE: [Release, Debug]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check Out Repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: ./
|
||||||
|
file: ./Dockerfile-build
|
||||||
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
|
build-args: LMS_BUILD_TYPE=${{ matrix.BUILD_TYPE }}
|
||||||
|
push: false
|
||||||
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
platforms: linux/amd64,linux/arm/v6
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
FROM alpine:3.13 AS build
|
||||||
|
|
||||||
|
WORKDIR /tmp/workdir
|
||||||
|
|
||||||
|
ARG MAKEFLAGS="-j2"
|
||||||
|
|
||||||
|
ARG PREFIX="/tmp/install"
|
||||||
|
|
||||||
|
ARG BUILD_PACKAGES=" \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
coreutils \
|
||||||
|
bzip2 \
|
||||||
|
pkgconfig \
|
||||||
|
g++ \
|
||||||
|
ffmpeg-dev \
|
||||||
|
make \
|
||||||
|
cmake \
|
||||||
|
boost-dev \
|
||||||
|
libconfig-dev \
|
||||||
|
taglib-dev \
|
||||||
|
wt-dev \
|
||||||
|
gtest-dev"
|
||||||
|
|
||||||
|
RUN apk add --no-cache --update ${BUILD_PACKAGES}
|
||||||
|
|
||||||
|
# STB
|
||||||
|
ARG STB_VERSION=b42009b3b9d4ca35bc703f5310eedc74f584be58
|
||||||
|
RUN \
|
||||||
|
DIR=/tmp/stb && mkdir -p ${DIR} && cd ${DIR} && \
|
||||||
|
curl -sLO https://github.com/nothings/stb/archive/${STB_VERSION}.tar.gz && \
|
||||||
|
tar -x --strip-components=1 -f ${STB_VERSION}.tar.gz && \
|
||||||
|
mkdir -p ${PREFIX}/include/stb && \
|
||||||
|
cp ./*.h ${PREFIX}/include/stb
|
||||||
|
|
||||||
|
# LMS
|
||||||
|
COPY . /tmp/lms/
|
||||||
|
ARG LMS_BUILD_TYPE="Release"
|
||||||
|
RUN \
|
||||||
|
DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \
|
||||||
|
CXXFLAGS="-I${PREFIX}/include" cmake /tmp/lms/ -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} && \
|
||||||
|
VERBOSE=1 make && \
|
||||||
|
make test
|
||||||
|
|
||||||
@@ -101,20 +101,15 @@ RUN \
|
|||||||
cp ./*.h ${PREFIX}/include/stb
|
cp ./*.h ${PREFIX}/include/stb
|
||||||
|
|
||||||
# LMS
|
# LMS
|
||||||
ARG LMS_VERSION=v3.25.2
|
COPY . /tmp/lms/
|
||||||
RUN \
|
RUN \
|
||||||
DIR=/tmp/lms && mkdir -p ${DIR} && cd ${DIR} && \
|
DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \
|
||||||
curl -sL https://github.com/epoupon/lms/archive/${LMS_VERSION}.tar.gz -o ${LMS_VERSION}.tar.gz && \
|
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_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} && \
|
||||||
tar -x --strip-components=1 -f ${LMS_VERSION}.tar.gz
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
DIR=/tmp/lms && 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 . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} && \
|
|
||||||
LD_LIBRARY_PATH=${PREFIX}/lib VERBOSE=1 make && \
|
LD_LIBRARY_PATH=${PREFIX}/lib VERBOSE=1 make && \
|
||||||
LD_LIBRARY_PATH=${PREFIX}/lib make test && \
|
LD_LIBRARY_PATH=${PREFIX}/lib make test && \
|
||||||
make install && \
|
make install && \
|
||||||
mkdir -p ${PREFIX}/etc/ && \
|
mkdir -p ${PREFIX}/etc/ && \
|
||||||
cp conf/lms.conf ${PREFIX}/etc
|
cp /tmp/lms/conf/lms.conf ${PREFIX}/etc
|
||||||
|
|
||||||
# Now copy all the stuff installed in a new folder (/tmp/fakeroot/)
|
# Now copy all the stuff installed in a new folder (/tmp/fakeroot/)
|
||||||
RUN \
|
RUN \
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# LMS - Lightweight Music Server
|
# LMS - Lightweight Music Server
|
||||||
|
|
||||||
 [](https://travis-ci.org/epoupon/lms) [](https://lgtm.com/projects/g/epoupon/lms/context:cpp)
|
[](https://github.com/epoupon/lms/releases) [](https://github.com/epoupon/lms/actions) [](https://lgtm.com/projects/g/epoupon/lms/context:cpp)
|
||||||
|
|
||||||
_LMS_ is a self-hosted music streaming software: access your music collection from anywhere using a web interface!
|
_LMS_ is a self-hosted music streaming software: access your music collection from anywhere using a web interface!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user