-
Notifications
You must be signed in to change notification settings - Fork 40
97 lines (87 loc) · 2.21 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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