Skip to content

Commit ec63ede

Browse files
committed
github actions: add build description
Add basic builds on Ubuntu and macOS hosts for Github's CI automation. Each builds with either GNU Autotools, CMake, or the plain Makefile, and then builds the documentation. This gives some feedback on pull requests submitted through github. Based on similar code from libopusenc, borrowing steps from the ci scripts directory and .travis-ci.yml.
1 parent 0704e3b commit ec63ede

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

.github/workflows/build.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: GitHub CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 1 * *'
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
name:
14+
[
15+
ubuntu-autotools,
16+
ubuntu-cmake,
17+
ubuntu-makefile,
18+
macos-autotools,
19+
macos-cmake,
20+
macos-makefile,
21+
]
22+
include:
23+
24+
- name: ubuntu-autotools
25+
os: ubuntu-latest
26+
build-system: autotools
27+
28+
- name: ubuntu-cmake
29+
os: ubuntu-latest
30+
build-system: cmake
31+
32+
- name: ubuntu-makefile
33+
os: ubuntu-latest
34+
build-system: makefile
35+
36+
- name: macos-autotools
37+
os: macos-latest
38+
build-system: autotools
39+
40+
- name: macos-cmake
41+
os: macos-latest
42+
build-system: cmake
43+
44+
- name: macos-makefile
45+
os: macos-latest
46+
build-system: makefile
47+
48+
runs-on: ${{ matrix.os }}
49+
50+
env:
51+
BUILD: _build
52+
53+
steps:
54+
- uses: actions/checkout@v2
55+
with:
56+
fetch-depth: 0
57+
58+
- name: Install Linux dependencies
59+
if: startsWith(matrix.os,'ubuntu')
60+
run: |
61+
sudo apt-get update
62+
sudo apt-get install -y libopus-dev libogg-dev libssl-dev
63+
sudo apt-get install -y doxygen graphviz
64+
65+
- name: Install macOS dependencies
66+
if: startsWith(matrix.os,'macos')
67+
run: |
68+
brew bundle
69+
70+
- name: Build with Autotools
71+
if: startsWith(matrix.build-system,'autotools')
72+
run: |
73+
./autogen.sh
74+
./configure
75+
make
76+
make check
77+
78+
- name: distcheck with Autotools
79+
if: startsWith(matrix.build-system,'autotools')
80+
run: |
81+
make distcheck
82+
83+
- name: Build with Makefile
84+
if: startsWith(matrix.build-system,'makefile')
85+
run: |
86+
make -C unix
87+
make -C unix check
88+
89+
- name: Build Documentation
90+
if: ${{ ! startsWith(matrix.build-system,'cmake') }}
91+
run: |
92+
make -C doc
93+
94+
- name: Build with CMake
95+
if: startsWith(matrix.build-system,'cmake')
96+
run: |
97+
cmake -S . -B ${{ env.BUILD }}
98+
cmake --build ${{ env.BUILD }}
99+
ctest --test-dir ${{ env.BUILD }} -V -C Debug

0 commit comments

Comments
 (0)