mirror of
https://github.com/Motion-Project/motion.git
synced 2026-01-19 04:08:38 -05:00
98 lines
2.2 KiB
YAML
98 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- .github/ISSUE_TEMPLATE/**
|
|
- doc/**
|
|
- man/**
|
|
- '**/LICENCE'
|
|
- '**/.gitignore'
|
|
- '**.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- .github/ISSUE_TEMPLATE/**
|
|
- doc/**
|
|
- man/**
|
|
- '**/LICENCE'
|
|
- '**/.gitignore'
|
|
- '**.md'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
cxx: [g++, clang++]
|
|
libc: [glibc, musl]
|
|
include:
|
|
- cxx: g++
|
|
cc: gcc
|
|
- cxx: clang++
|
|
cc: clang
|
|
- libc: glibc
|
|
shell: bash
|
|
- libc: musl
|
|
shell: alpine.sh {0}
|
|
|
|
defaults:
|
|
run:
|
|
shell: ${{ matrix.shell }}
|
|
|
|
steps:
|
|
- name: Set up Ubuntu
|
|
if: matrix.libc == 'glibc'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y autopoint pkgconf gettext libcamera-dev libopencv-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswscale-dev libwebp-dev libmicrohttpd-dev libmariadb-dev libasound2-dev libpulse-dev libfftw3-dev
|
|
|
|
- name: Set up Alpine
|
|
if: matrix.libc == 'musl'
|
|
uses: jirutka/setup-alpine@master
|
|
with:
|
|
branch: edge
|
|
packages: >
|
|
build-base
|
|
clang
|
|
file
|
|
autoconf
|
|
automake
|
|
gettext-dev
|
|
libtool
|
|
libzip-dev
|
|
jpeg-dev
|
|
v4l-utils-libs
|
|
libcamera-dev
|
|
opencv-dev
|
|
ffmpeg-dev
|
|
libmicrohttpd-dev
|
|
sqlite-dev
|
|
mariadb-dev
|
|
alsa-lib-dev
|
|
pulseaudio-dev
|
|
fftw-dev
|
|
|
|
- name: Checkout source
|
|
uses: actions/checkout@main
|
|
|
|
- name: Configure build
|
|
run: |
|
|
autoreconf -fiv
|
|
./configure CC=${{ matrix.cc }} CXX=${{ matrix.cxx }}
|
|
|
|
- name: Build target
|
|
run: |
|
|
${{ matrix.CXX }} --version
|
|
make -j $(($(nproc)+1))
|
|
|
|
- name: Run artifact
|
|
run: |
|
|
file ./src/motion
|
|
./src/motion -h || true
|