Build action workflow
This commit is contained in:

committed by
Kamil Trzciński

parent
d36c2d590c
commit
ff81088824
@ -4,6 +4,6 @@
|
||||
test_*
|
||||
tmp/
|
||||
.vscode/
|
||||
.git/
|
||||
CMakeFiles/
|
||||
examples/
|
||||
Dockerfile
|
||||
|
26
.github/workflows/build.yaml
vendored
Normal file
26
.github/workflows/build.yaml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
debian_version: [buster, bullseye]
|
||||
docker_arch: [amd64, arm32v7, arm64v8]
|
||||
build_type: ["non-rpi", "rpi"]
|
||||
exclude:
|
||||
- docker_arch: amd64
|
||||
build_type: rpi
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Build Dockerfile
|
||||
run: docker build --build-arg DOCKER_ARCH --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE .
|
||||
env:
|
||||
DEBIAN_VERSION: ${{ matrix.debian_version }}
|
||||
DOCKER_ARCH: ${{ matrix.docker_arch }}/
|
||||
BUILD_TYPE: ${{ matrix.build_type }}
|
24
Dockerfile
24
Dockerfile
@ -3,10 +3,26 @@ ARG DEBIAN_VERSION
|
||||
FROM ${DOCKER_ARCH}debian:${DEBIAN_VERSION} as build_env
|
||||
|
||||
# Default packages
|
||||
RUN apt-get -y update && apt-get -y install gnupg2 libavformat-dev libavutil-dev libavcodec-dev v4l-utils pkg-config xxd build-essential ccache
|
||||
RUN apt-get -y update && apt-get -y install gnupg2 build-essential xxd cmake ccache git-core pkg-config \
|
||||
libavformat-dev libavutil-dev libavcodec-dev libssl-dev v4l-utils
|
||||
|
||||
# Add RPI packages
|
||||
ARG DEBIAN_VERSION
|
||||
RUN echo "deb http://archive.raspberrypi.org/debian/ $DEBIAN_VERSION main" > /etc/apt/sources.list.d/raspi.list
|
||||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 82B129927FA3303E
|
||||
RUN apt-get -y update && apt-get -y install libcamera-dev liblivemedia-dev
|
||||
ARG BUILD_TYPE="non-rpi"
|
||||
RUN [ "$BUILD_TYPE" != "rpi" ] || \
|
||||
( \
|
||||
echo "deb http://archive.raspberrypi.org/debian/ $DEBIAN_VERSION main" > /etc/apt/sources.list.d/raspi.list && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 82B129927FA3303E && \
|
||||
apt-get -y update && \
|
||||
apt-get -y install libcamera-dev liblivemedia-dev \
|
||||
)
|
||||
|
||||
FROM scratch as build
|
||||
COPY --from=build_env / .
|
||||
|
||||
ADD / /src
|
||||
WORKDIR /src
|
||||
RUN git clean -ffdx
|
||||
RUN git submodule update --init --recursive --recommend-shallow
|
||||
RUN git submodule foreach git clean -ffdx
|
||||
RUN make -j$(nproc)
|
||||
|
@ -276,7 +276,7 @@ error:
|
||||
|
||||
#else // USE_RTSP
|
||||
|
||||
extern "C" int rtsp_server()
|
||||
extern "C" int rtsp_server(rtsp_options_t *options)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user