WIP: Enable a github actions build #2
Workflow file for this run
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 Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
# cancel already running builds of the same branch or pull request | |
concurrency: | |
group: ci-${{ github.head_ref }} || concat(${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration | |
JOBS: 2 | |
jobs: | |
build: | |
name: Build on Ubuntu | |
runs-on: ubuntu-latest | |
env: | |
CC: ccache gcc | |
CXX: ccache g++ | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install --assume-yes --no-install-recommends \ | |
ccache \ | |
autoconf-archive \ | |
autopoint \ | |
clang \ | |
clang-tools \ | |
cppcheck \ | |
gir1.2-freedesktop \ | |
git \ | |
gobject-introspection \ | |
gtk-doc-tools \ | |
libatk1.0-dev \ | |
libcairo2-dev \ | |
libdconf-dev \ | |
libgirepository1.0-dev \ | |
libglib2.0-dev \ | |
libgtk-3-dev \ | |
libgtk-layer-shell-dev \ | |
libice-dev \ | |
libmate-desktop-dev \ | |
libmate-menu-dev \ | |
libmateweather-dev \ | |
libpango1.0-dev \ | |
libsm-dev \ | |
libsoup2.4-dev \ | |
libwnck-3-dev \ | |
libx11-dev \ | |
libxrandr-dev \ | |
lsb-release \ | |
make \ | |
mate-common \ | |
meson \ | |
yelp-tools \ | |
iso-codes \ | |
gobject-introspection \ | |
libgirepository1.0-dev | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
- name: Configure | |
run: | | |
NOCONFIGURE=1 ./autogen.sh | |
mkdir _build | |
cd _build | |
{ ../configure || { cat config.log; exit 1; } ; } | |
- name: Build | |
run: make -C _build -j ${{ env.JOBS }} | |
- name: Run Tests | |
run: make -C _build -j ${{ env.JOBS }} check | |
- name: Run distcheck | |
run: make -C _build -j ${{ env.JOBS }} distcheck | |
- name: cppcheck | |
run: cppcheck --enable=warning,style,performance,portability,information,missingInclude -i'gtk-layer-shell-build' . |