mirror of
https://github.com/Motion-Project/motion.git
synced 2026-06-11 15:24:42 -04:00
104
.github/workflows/ci.yml
vendored
Normal file
104
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
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/motionplus
|
||||
./src/motionplus -h || true
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: motionplus-${{ matrix.cc }}-${{ matrix.libc }}-${{ github.sha }}
|
||||
path: src/motionplus
|
||||
compression-level: 9
|
||||
Reference in New Issue
Block a user