From c55efcf30c5b79f0f52b67194bb695b433ca1507 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 23:06:23 +0200 Subject: [PATCH 01/27] ci: Create makefile.yml --- .github/workflows/makefile.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/makefile.yml diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 00000000..fe7f7b0c --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,30 @@ +name: Makefile CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: apt update -y && apt install -y gtk-doc-tools yelp-tools libgeoclue-2-dev nettle-dev liboauth-dev libzip-dev libjson-glib-dev libgtk-3-dev xxd + + - name: configure + run: ./configure + + - name: Build + run: make + + - name: Run check + run: make check + + - name: Run distcheck + run: make distcheck From d9ead672ed2d4b8d19682d8d62076d00e5a3458f Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 21:12:21 +0000 Subject: [PATCH 02/27] ci: force on all push --- .github/workflows/makefile.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index fe7f7b0c..2260c7e8 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -2,7 +2,6 @@ name: Makefile CI on: push: - branches: [ "master" ] pull_request: branches: [ "master" ] From ea719ede2f9b6ec1acc45c2708e45126b49be2c1 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 21:14:51 +0000 Subject: [PATCH 03/27] ci: copy instructions from README --- .github/workflows/makefile.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 2260c7e8..eeeeec15 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -14,9 +14,12 @@ jobs: - uses: actions/checkout@v3 - name: Install dependencies - run: apt update -y && apt install -y gtk-doc-tools yelp-tools libgeoclue-2-dev nettle-dev liboauth-dev libzip-dev libjson-glib-dev libgtk-3-dev xxd + run: apt update -y && apt install -y gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool xxd - - name: configure + - name: Prepare + run: ./autogen.sh + + - name: Configure run: ./configure - name: Build From 7c26b30524a9b54af616aa91715b07b8c91298aa Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 21:27:21 +0000 Subject: [PATCH 04/27] ci: use action for apt packages installation --- .github/workflows/makefile.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index eeeeec15..cdd3db11 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -13,8 +13,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install dependencies - run: apt update -y && apt install -y gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool xxd + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool xxd + version: 1.0 - name: Prepare run: ./autogen.sh From c6915decf0c8cab19ac3e653cd5307255e76fe49 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 21:36:33 +0000 Subject: [PATCH 05/27] build: autopoint is required --- .github/workflows/makefile.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index cdd3db11..df7b5adb 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -15,7 +15,7 @@ jobs: - uses: awalsh128/cache-apt-pkgs-action@latest with: - packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool xxd + packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool autopoint xxd version: 1.0 - name: Prepare diff --git a/README.md b/README.md index c188a7b2..c4c8ab5c 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Git repository: On Debian Sid, following packages must be installed before building: - $ sudo apt install gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool xxd + $ sudo apt install gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool autopoint xxd The following packages are needed (they are included by default in Debian Sid, but not in other distributions). They must be installed too: From fdadecc2ad84e72fe4dce722fdc61a367267090c Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 21:40:31 +0000 Subject: [PATCH 06/27] ci: add other dependencies --- .github/workflows/makefile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index df7b5adb..71b3c49f 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -15,7 +15,7 @@ jobs: - uses: awalsh128/cache-apt-pkgs-action@latest with: - packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool autopoint xxd + packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool autopoint xxd libcurl4-gnutls-dev libglib2.0-dev-bin version: 1.0 - name: Prepare From 59977c8aad6c204881734ea3ee380c8b077e5ddf Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 21:44:03 +0000 Subject: [PATCH 07/27] ci: extensions dependencies --- .github/workflows/makefile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 71b3c49f..be82f3d0 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -15,7 +15,7 @@ jobs: - uses: awalsh128/cache-apt-pkgs-action@latest with: - packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev libicu-dev libjson-glib-dev intltool autopoint xxd libcurl4-gnutls-dev libglib2.0-dev-bin + packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev 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 version: 1.0 - name: Prepare From cfee5e1daf4abdfce906fe91e6e75ccc15511497 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 21:49:27 +0000 Subject: [PATCH 08/27] doc: remove ref to Travis CI --- .travis.yml | 50 -------------------------------------------------- README.md | 4 +--- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d4528fb3..00000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: c - -services: -- docker - -env: - global: -# https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1802718 -# and/or travis docker image(s) not having enabled 'deb-src' lines -# contrary to docker documentation -> https://docs.docker.com/samples/library/ubuntu/ -# NB At time of writing 2018-11-11: artful doesn't really need this FIX_APT_CONFIG, but no harm in applying it -# TRAVIS BROKEN -# - FIX_APT_CONFIG="sed -i '/^#\sdeb-src /s/^#//' /etc/apt/sources.list" -# The common extra dependencies required beyond the default distribution 'build-dep' - - COMMON_DEPS="gtk-doc-tools yelp-tools libgeoclue-2-dev nettle-dev liboauth-dev libzip-dev libjson-glib-dev libgtk-3-dev xxd" -# 'glib-compile-resources' has moved around packages libglib2.0-bin --> libglib2.0-dev-bin, so can't be in common. -# -# For available build images-> https://docs.travis-ci.com/user/reference/overview/ -# - matrix: - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin -# Docker images previously (temporarily?) available but have vanished: -# - BUILD_IMG=ubuntu:18.10 -# - BUILD_IMG=ubuntu:19.04 -# - BUILD_IMG=ubuntu:19.10 DEPS=libglib2.0-dev-bin -# Test basic levels of some configure options -# Use the latest LTS version for these - - BUILD_IMG=ubuntu:18.04 DEPS="libglib2.0-dev-bin libexif-dev" OPTS="--with-libexif" - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-bzip2" - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-geotag" - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-magic" - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-mapnik" - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-mbtiles" - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-nettle" - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-realtime-gps-tracking" - - BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-zip" -# NB Ubuntu 16.04 doesn't have a new enough geoclue so simply disable using it -# NB Ubuntu 16.04 is GTK 3.18.9, so keep as GTK2 only - - BUILD_IMG=ubuntu:16.04 DEPS="libglib2.0-bin libmapnik-dev" OPTS="--enable-gtk2 --disable-geoclue" - - BUILD_IMG=ubuntu:18.04 DEPS="libglib2.0-dev-bin libgtk2.0-dev" OPTS="--enable-gtk2" -# -# Allow specifying docker user for increased rate allowance (compared to anonymous access): -# https://docs.docker.com/docker-hub/download-rate-limit/ -# https://www.docker.com/increase-rate-limits -# These DOCKERHUB env vars can be set in your travis settings -# -script: > - if [ ! -z "${DOCKERHUB_USERNAME:-}" ]; then set -x; echo "${DOCKERHUB_PASSWORD}" | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin; set +x; fi && - docker run --rm=true -v $HOME:$HOME:rw $BUILD_IMG /bin/sh -c "sed -i '/^#\sdeb-src /s/^#//' /etc/apt/sources.list && apt-get update && apt-get build-dep --yes viking && apt-get install --yes $COMMON_DEPS $DEPS && cd $PWD && ./autogen.sh $OPTS && make -j && make -j check || (cat test/test-suite.log ; false) && make install" -# Further packages are installed as these are new dependencies for the latest source code, compared to the dependencies listed in the distribution version (`apt-get build-dep` always refers to the version which is built for the OS rather than the up-to-date source) diff --git a/README.md b/README.md index c4c8ab5c..9c3c2e84 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -# Viking [![Build Status](https://travis-ci.com/viking-gps/viking.svg?branch=master)](https://travis-ci.com/viking-gps/viking) +# Viking ![Build Status](https://github.com/viking-gps/viking/actions/workflows/makefile.yml/badge.svg) [![GitHub license](https://img.shields.io/github/license/viking-gps/viking)](https://github.com/viking-gps/viking/master/COPYING) -[![Build history](https://buildstats.info/travisci/chart/viking-gps/viking?branch=master&showStats=true)](https://travis-ci.com/viking-gps/viking/builds) - Viking is a free/open source program to manage GPS data. You can import, plot and create tracks, routes and waypoints, show OSM and other maps, generate maps (using Mapnik), From e349a70d10deb632e27eaf34a35a30faaaac858f Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 12 Jul 2023 21:58:22 +0000 Subject: [PATCH 09/27] ci: keep test suite log if failure --- .github/workflows/makefile.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index be82f3d0..d4529f17 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -30,5 +30,12 @@ jobs: - name: Run check run: make check + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: test-suite-log + path: test/test-suite.log + retention-days: 5 + - name: Run distcheck run: make distcheck From b599e0f60ceb5ed2cf2708cb4ec92e1cfc38416c Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Tue, 1 Aug 2023 12:05:42 +0200 Subject: [PATCH 10/27] ci: build on multiple versions --- .github/workflows/{makefile.yml => build.yml} | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) rename .github/workflows/{makefile.yml => build.yml} (90%) diff --git a/.github/workflows/makefile.yml b/.github/workflows/build.yml similarity index 90% rename from .github/workflows/makefile.yml rename to .github/workflows/build.yml index d4529f17..e5206b3f 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,11 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-20.04] + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 From ffd06371c4e58925ce1268fc94585980cd4169ba Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Tue, 1 Aug 2023 14:45:15 +0200 Subject: [PATCH 11/27] ci: force install script of deps mapnik.h is not found when running from cache. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5206b3f..7522b5d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: with: packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev 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 version: 1.0 + execute_install_scripts: true - name: Prepare run: ./autogen.sh From 62ea0ebe553a2889451d2691aac33ede4b6a89b7 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Tue, 1 Aug 2023 15:25:59 +0200 Subject: [PATCH 12/27] ci: fix missed cache --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7522b5d3..06ddb570 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,10 @@ jobs: packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev 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 version: 1.0 execute_install_scripts: true - + - name: deal with anomalies from cache + run: sudo apt-get install libmapnik-dev + shell: bash + - name: Prepare run: ./autogen.sh From 2ef0becbbd93c0b5c5dd1990f8fb5d5d265f6ee2 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 2 Aug 2023 18:10:31 +0200 Subject: [PATCH 13/27] ci: fail fast In order to have feedback on various platforms. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06ddb570..e325ae2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,7 @@ jobs: build: strategy: + fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-20.04] From 91aad9899919ece635a37ebec0ed5861b37e9c16 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 2 Aug 2023 23:27:43 +0200 Subject: [PATCH 14/27] ci: add gtk 2 --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e325ae2f..de93654b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-20.04] + libgtk: [libgtk-3-dev, libgtk2.0-dev] runs-on: ${{ matrix.os }} @@ -20,7 +21,7 @@ jobs: - uses: awalsh128/cache-apt-pkgs-action@latest with: - packages: gtk-doc-tools docbook-xsl yelp-tools libpng-dev libgtk-3-dev 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 + packages: 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 version: 1.0 execute_install_scripts: true - name: deal with anomalies from cache From cd305b42bc699b02e0410f6d9da52815f9f4e807 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Thu, 3 Aug 2023 18:46:26 +0200 Subject: [PATCH 15/27] ci: explicitly enable gtk2 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de93654b..bcbb2cac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: run: ./autogen.sh - name: Configure - run: ./configure + run: ./configure ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' }} - name: Build run: make From fdb0342077ff9cc1f158459c41b6a4cefbd7640a Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Thu, 3 Aug 2023 18:56:24 +0200 Subject: [PATCH 16/27] ci: do not use cached packages This Actions introduce many bugs. --- .github/workflows/build.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bcbb2cac..06773a22 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,13 +19,8 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: 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 - version: 1.0 - execute_install_scripts: true - - name: deal with anomalies from cache - run: sudo apt-get install libmapnik-dev + - name: "Install requirements" + run: 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 shell: bash - name: Prepare From 5c809addf56539e6f3ef09110e3d9a524a7f0cdb Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Thu, 3 Aug 2023 18:58:14 +0200 Subject: [PATCH 17/27] ci: explicitly enable gtk2 if needed --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06773a22..bf695b4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: shell: bash - name: Prepare - run: ./autogen.sh + run: ./autogen.sh ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' }} - name: Configure run: ./configure ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' }} From b8c086f3fef060974df384b9cfad8c30b6998dfe Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Sat, 5 Aug 2023 18:08:07 +0200 Subject: [PATCH 18/27] ci: add xvfb as tests require DISPLAY --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf695b4a..fc9cea58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,9 @@ jobs: run: make - name: Run check - run: make check + uses: coactions/setup-xvfb@v1 + with: + run: make check - uses: actions/upload-artifact@v3 if: failure() From 3e23926435525009405c51033de0e1c9fd33c6e3 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Fri, 11 Aug 2023 00:22:24 +0200 Subject: [PATCH 19/27] ci: remove uneeded step configure Already done by autogen --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc9cea58..47f86286 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,12 +23,9 @@ jobs: run: 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 shell: bash - - name: Prepare + - name: Configure run: ./autogen.sh ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' }} - - name: Configure - run: ./configure ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' }} - - name: Build run: make From 222dce0607e951b4554a9ac9d222e233e9ca72b7 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Fri, 11 Aug 2023 00:23:03 +0200 Subject: [PATCH 20/27] ci: fix autogen argument Else we have 'false' --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47f86286..8382ce99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: shell: bash - name: Configure - run: ./autogen.sh ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' }} + run: ./autogen.sh ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' || '' }} - name: Build run: make From c5f26e7e30213d97416928bc6e446bc9c2a9d1aa Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Fri, 11 Aug 2023 00:27:37 +0200 Subject: [PATCH 21/27] ci: pass option to distcheck --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8382ce99..960607ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,4 +42,4 @@ jobs: retention-days: 5 - name: Run distcheck - run: make distcheck + run: make distcheck DISTCHECK_CONFIGURE_FLAGS=${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' || '' }} From 1334b64e83f97c3ba0a338d14e3168d280c481a5 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Tue, 8 Aug 2023 22:07:43 +0200 Subject: [PATCH 22/27] ci: build inside docker Avoid reinstalling dependencies --- .github/workflows/build.yml | 48 ++++++++++++++++++++++++++++++++----- docker/build/Dockerfile | 10 ++++++++ docker/build/Makefile | 18 ++++++++++++++ 3 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 docker/build/Dockerfile create mode 100644 docker/build/Makefile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 960607ee..3def1f9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,23 +6,59 @@ on: branches: [ "master" ] jobs: + docker: + + strategy: + matrix: + ubuntu: [22.04, 20.04] + libgtk: [libgtk-3-dev, libgtk2.0-dev] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + docker: + - 'docker/**' + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: "{{defaultContext}}:docker/build" + build-args: | + UBUNTU_VERSION=${{ matrix.ubuntu }} + LIBGTK=${{ matrix.libgtk }} + push: true + tags: ghcr.io/viking-gps/viking-build-env:${{ matrix.ubuntu }}-${{ matrix.libgtk }} + if: steps.changes.outputs.docker == 'true' + build: + if: ${{ always() }} + needs: docker strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-20.04] + ubuntu: [22.04, 20.04] libgtk: [libgtk-3-dev, libgtk2.0-dev] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest + container: + image: ghcr.io/viking-gps/viking-build-env:${{ matrix.ubuntu }}-${{ matrix.libgtk }} steps: - uses: actions/checkout@v3 - - name: "Install requirements" - run: 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 - shell: bash - - name: Configure run: ./autogen.sh ${{ matrix.libgtk == 'libgtk2.0-dev' && '--enable-gtk2' || '' }} diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile new file mode 100644 index 00000000..86253c7e --- /dev/null +++ b/docker/build/Dockerfile @@ -0,0 +1,10 @@ +ARG UBUNTU_VERSION=22.04 + +FROM ubuntu:$UBUNTU_VERSION + +ARG LIBGTK=libgtk-3-dev + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt update && \ + apt install -y gtk-doc-tools docbook-xsl yelp-tools libpng-dev $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 && \ + rm -rf /var/lib/apt/lists/* diff --git a/docker/build/Makefile b/docker/build/Makefile new file mode 100644 index 00000000..72bb5fba --- /dev/null +++ b/docker/build/Makefile @@ -0,0 +1,18 @@ +all: \ + ubuntu2004-gtk3 \ + ubuntu2004-gtk2 \ + ubuntu2204-gtk3 \ + ubuntu2204-gtk2 + +ubuntu2004-gtk3: + docker build --build-arg UBUNTU_VERSION=20.04 --build-arg LIBGTK=libgtk-3-dev -t viking-build:$@ . + +ubuntu2004-gtk2: + docker build --build-arg UBUNTU_VERSION=20.04 --build-arg LIBGTK=libgtk2.0-dev -t viking-build:$@ . + +ubuntu2204-gtk3: + docker build --build-arg UBUNTU_VERSION=22.04 --build-arg LIBGTK=libgtk-3-dev -t viking-build:$@ . + +ubuntu2204-gtk2: + docker build --build-arg UBUNTU_VERSION=22.04 --build-arg LIBGTK=libgtk2.0-dev -t viking-build:$@ . + \ No newline at end of file From c98487d06c024a8c0dee35876ce1adbe3df7757f Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Tue, 8 Aug 2023 22:27:01 +0200 Subject: [PATCH 23/27] switch to guyou --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3def1f9c..565ed0a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: UBUNTU_VERSION=${{ matrix.ubuntu }} LIBGTK=${{ matrix.libgtk }} push: true - tags: ghcr.io/viking-gps/viking-build-env:${{ matrix.ubuntu }}-${{ matrix.libgtk }} + tags: ghcr.io/guyou/viking-build-env:${{ matrix.ubuntu }}-${{ matrix.libgtk }} if: steps.changes.outputs.docker == 'true' build: @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/viking-gps/viking-build-env:${{ matrix.ubuntu }}-${{ matrix.libgtk }} + image: ghcr.io/guyou/viking-build-env:${{ matrix.ubuntu }}-${{ matrix.libgtk }} steps: - uses: actions/checkout@v3 From aac70302790fa19d3d8ca5a0700c4b095d8a27cf Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Thu, 10 Aug 2023 22:56:35 +0200 Subject: [PATCH 24/27] ci: install sudo Needed by XVFB --- docker/build/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index 86253c7e..ed9ea227 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -7,4 +7,5 @@ ARG LIBGTK=libgtk-3-dev ENV DEBIAN_FRONTEND=noninteractive RUN apt update && \ apt install -y gtk-doc-tools docbook-xsl yelp-tools libpng-dev $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 && \ + apt install -y sudo && \ rm -rf /var/lib/apt/lists/* From 081ec5d13b02fb104247b7ddd234d520f44b2402 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Thu, 10 Aug 2023 23:31:04 +0200 Subject: [PATCH 25/27] ci(docker): add build essential Compiler is needed. --- docker/build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index ed9ea227..bc538287 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -6,6 +6,6 @@ ARG LIBGTK=libgtk-3-dev ENV DEBIAN_FRONTEND=noninteractive RUN apt update && \ - apt install -y gtk-doc-tools docbook-xsl yelp-tools libpng-dev $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 && \ + apt install -y build-essential gtk-doc-tools docbook-xsl yelp-tools libpng-dev $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 && \ apt install -y sudo && \ rm -rf /var/lib/apt/lists/* From 795c07699d91fce8f3acf6e537402399a74d82ff Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Thu, 10 Aug 2023 23:38:58 +0200 Subject: [PATCH 26/27] ci(docker): add xvfb --- docker/build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index bc538287..96ed6e96 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -7,5 +7,5 @@ ARG LIBGTK=libgtk-3-dev ENV DEBIAN_FRONTEND=noninteractive RUN apt update && \ apt install -y build-essential gtk-doc-tools docbook-xsl yelp-tools libpng-dev $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 && \ - apt install -y sudo && \ + apt install -y xvfb sudo && \ rm -rf /var/lib/apt/lists/* From cc3b524135e952f8d881c1e0afd3a168448cf553 Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Thu, 10 Aug 2023 23:50:49 +0200 Subject: [PATCH 27/27] ci(docker): missing X11 dependency --- docker/build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index 96ed6e96..6a8da202 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -7,5 +7,5 @@ ARG LIBGTK=libgtk-3-dev ENV DEBIAN_FRONTEND=noninteractive RUN apt update && \ apt install -y build-essential gtk-doc-tools docbook-xsl yelp-tools libpng-dev $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 && \ - apt install -y xvfb sudo && \ + apt install -y xvfb x11-xserver-utils sudo && \ rm -rf /var/lib/apt/lists/*