CI #213
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |