Skip to content

Merge pull request #260 from jidanni/patch-2 #54

Merge pull request #260 from jidanni/patch-2

Merge pull request #260 from jidanni/patch-2 #54

Workflow file for this run

name: CI Primary Build and Tests
on:
push:
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
libgtk: [libgtk-3-dev, libgtk2.0-dev]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# See at least https://github.com/actions/runner-images/issues/2155
# regarding ubuntu default image vs server packages mismatch
# Hence must always *update* before applying any install
# xvfb is only needed for headless CI tests
- name: "Install requirements"
run: sudo apt-get update -y && sudo apt-get install gtk-doc-tools docbook-xsl yelp-tools libpng-dev ${{ matrix.libgtk }} libicu-dev libjson-glib-dev intltool autopoint xxd libcurl4-gnutls-dev libglib2.0-dev-bin libsqlite3-dev nettle-dev libmapnik-dev libgeoclue-2-dev libgexiv2-dev libgps-dev libmagic-dev libbz2-dev libzip-dev liboauth-dev libnova-dev xvfb
shell: bash
# Fake DISPLAY for detection as used in configure - which decides which tests to run for the main check
- name: Configure
run: xvfb-run ./autogen.sh ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' || '' }}
- name: Build
run: make
# Full tests - including those that use a DISPLAY
- name: Run check
run: xvfb-run make check
- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-suite-log-${{ matrix.os }}-${{ matrix.libgtk }}
path: test/test-suite.log
retention-days: 7
# NB During this build/run inside the distcheck there is no DISPLAY
# Hence number of tests run is less (since some rely on GTK3 and a DISPLAY - thus are omitted)
# than the main check performed above
- name: Run distcheck
run: make distcheck DISTCHECK_CONFIGURE_FLAGS=${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' || '' }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-suite-log-${{ matrix.os }}-${{ matrix.libgtk }}
path: viking-1.*/_build/sub/test/test-suite.log
retention-days: 7