blob: 9fd936f3fe5924744a86582d1b90150ca558467c [file] [log] [blame]
evpobrdd975a92020-04-06 11:35:26 +05001name: GitHub Actions
2
3on: [push]
4
5jobs:
6 build:
7 strategy:
8 matrix:
9 name:
10 [
11 ubuntu-latest-gcc-autotools,
12 ubuntu-latest-clang-autotools,
13 ubuntu-latest-gcc-cmake,
14 ubuntu-latest-clang-cmake,
15 macos-latest-clang-autotools,
16 macos-latest-clang-cmake,
17 ubuntu-latest-gcc-autotools-64-bit-words,
18 ubuntu-latest-clang-autotools-64-bit-words,
19 ubuntu-latest-gcc-cmake-64-bit-words,
20 ubuntu-latest-clang-cmake-64-bit-words,
21 macos-latest-clang-autotools-64-bit-words,
22 macos-latest-clang-cmake-64-bit-words
23 ]
24 include:
25 - name: ubuntu-latest-gcc-autotools
26 os: ubuntu-latest
27 cc: gcc
28 cxx: g++
29 build-system: autotools
30 configure-opts: ''
31
32 - name: ubuntu-latest-clang-autotools
33 os: ubuntu-latest
34 cc: clang
35 cxx: clang++
36 build-system: autotools
37 configure-opts: ''
38
39 - name: ubuntu-latest-gcc-cmake
40 os: ubuntu-latest
41 cc: gcc
42 cxx: g++
43 build-system: cmake
44 configure-opts: ''
45
46 - name: ubuntu-latest-clang-cmake
47 os: ubuntu-latest
48 cc: clang
49 cxx: clang++
50 build-system: cmake
51 configure-opts: ''
52
53 - name: macos-latest-clang-autotools
54 os: macos-latest
55 cc: clang
56 cxx: clang++
57 build-system: autotools
58 configure-opts: ''
59
60 - name: macos-latest-clang-cmake
61 os: macos-latest
62 cc: clang
63 cxx: clang++
64 build-system: cmake
65 configure-opts: ''
66
67 - name: ubuntu-latest-gcc-autotools-64-bit-words
68 os: ubuntu-latest
69 cc: gcc
70 cxx: g++
71 build-system: autotools
72 configure-opts: --enable-64-bit-words
73
74 - name: ubuntu-latest-clang-autotools-64-bit-words
75 os: ubuntu-latest
76 cc: clang
77 cxx: clang++
78 build-system: autotools
79 configure-opts: --enable-64-bit-words
80
81 - name: ubuntu-latest-gcc-cmake-64-bit-words
82 os: ubuntu-latest
83 cc: gcc
84 cxx: g++
85 build-system: cmake
86 configure-opts: -DENABLE_64_BIT_WORDS=ON
87
88 - name: ubuntu-latest-clang-cmake-64-bit-words
89 os: ubuntu-latest
90 cc: clang
91 cxx: clang++
92 build-system: cmake
93 configure-opts: -DENABLE_64_BIT_WORDS=ON
94
95 - name: macos-latest-clang-autotools-64-bit-words
96 os: macos-latest
97 cc: clang
98 cxx: clang++
99 build-system: autotools
100 configure-opts: --enable-64-bit-words
101
102 - name: macos-latest-clang-cmake-64-bit-words
103 os: macos-latest
104 cc: clang
105 cxx: clang++
106 build-system: cmake
107 configure-opts: -DENABLE_64_BIT_WORDS=ON
108
109 runs-on: ${{ matrix.os }}
110
111 steps:
112 - uses: actions/checkout@v2
113
114 - name: Install MacOS dependencies
115 if: startsWith(matrix.os,'macos')
116 run: |
117 brew update
118 brew install automake pkg-config libogg
119
120 - name: Install Lunux dependencies
121 if: startsWith(matrix.os,'ubuntu')
122 run: |
123 sudo apt-get update
124 sudo apt-get install -y libtool-bin libogg-dev doxygen libxml2-utils w3c-sgml-lib
125
126 - name: Build with Autotools
127 if: startsWith(matrix.build-system,'autotools')
128 env:
129 CC: ${{ matrix.cc }}
130 CXX: ${{ matrix.cxx }}
131 run: |
132 ./autogen.sh
133 ./configure ${{ matrix.configure-opts }}
134 make
135 make check
136
137 - name: Build with CMake
138 if: startsWith(matrix.build-system,'cmake')
139 env:
140 CC: ${{ matrix.cc }}
141 CXX: ${{ matrix.cxx }}
142 run: |
143 mkdir cmake-build
144 cd cmake-build
145 cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.configure-opts }} -DCMAKE_FIND_FRAMEWORK=NEVER
146 cmake --build .
147 ctest -V
148
149 - name: Check documentation
150 if: startsWith(matrix.os,'ubuntu') && startsWith(matrix.build-system,'autotools')
151 run: |
152 xmllint --valid --noout doc/html/*.html;
153 xmllint --valid --noout doc/html/api/*.html;