-
-
Notifications
You must be signed in to change notification settings - Fork 19
47 lines (40 loc) · 1.14 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
name: CI
on:
push: { branches: [master] }
pull_request: { branches: [master] }
schedule: [ cron: '3 15 * * 6' ] # Every Saturday, 03:15
jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
matrix:
compiler: [gcc, clang]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install \
libglib2.0-dev libwnck-3-dev procps make cmake pkg-config
- name: Install lint dependencies
if: matrix.compiler == 'gcc'
run: |
sudo apt-get install cppcheck groff python3-wheel
pip3 install --user cpplint
- name: Lint
if: matrix.compiler == 'gcc'
run: |
./lint.sh
! groff -wall -mandoc -Thtml doc/xsuspender.1 |& grep ' warning: '
- name: Build & Test
env:
CC: ${{ matrix.compiler }}
DISPLAY: mock-for-later
run: |
cd build
cmake -DCMAKE_C_FLAGS=-Werror -DCMAKE_INSTALL_PREFIX=~ ..
make
make install
cpack
xvfb-run make test