summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormbkma <[email protected]>2026-03-12 18:15:25 +0100
committerGitHub <[email protected]>2026-03-12 17:15:25 +0000
commitc8432a5a135ee5a8a187384eaf81d6fdf9aa2adb (patch)
tree33c071da8734a8cb2c96caad8c2c7e2521852907
parent1533537baa41b74904661846f5acb8516031fd5f (diff)
downloadlibmateweather-c8432a5a135ee5a8a187384eaf81d6fdf9aa2adb.tar.bz2
libmateweather-c8432a5a135ee5a8a187384eaf81d6fdf9aa2adb.tar.xz
ci: migrate from Travis CI to GitHub Actions
Replace Travis CI configuration with GitHub Actions workflows. Add CI build workflow for Debian, Fedora, Ubuntu, and Archlinux. Add release workflow for automated GitHub releases on tags. Add dependabot configuration for GHA pin updates. Remove obsolete .travis.yml and .build.yml.
-rw-r--r--.build.yml137
-rw-r--r--.github/dependabot.yml8
-rwxr-xr-x.github/workflows/archlinux.sh45
-rwxr-xr-x.github/workflows/builds.sh38
-rw-r--r--.github/workflows/builds.yml86
-rwxr-xr-x.github/workflows/debian.sh42
-rwxr-xr-x.github/workflows/fedora.sh38
-rw-r--r--.github/workflows/release.yml24
-rwxr-xr-x.github/workflows/ubuntu.sh42
-rw-r--r--.travis.yml76
10 files changed, 323 insertions, 213 deletions
diff --git a/.build.yml b/.build.yml
deleted file mode 100644
index 024b8f4..0000000
--- a/.build.yml
+++ /dev/null
@@ -1,137 +0,0 @@
-##########################################################
-# THE FOLLOWING LINES IS USED BY docker-build
-##########################################################
-requires:
- archlinux:
- # Useful URL: https://git.archlinux.org/svntogit/community.git/tree/libmateweather
- - autoconf-archive
- - clang
- - gcc
- - git
- - gtk3
- - libsoup3
- - make
- - mate-common
- - tzdata
- - which
-
- debian:
- # Useful URL: https://github.com/mate-desktop/debian-packages
- # Useful URL: https://salsa.debian.org/debian-mate-team/libmateweather
- - autopoint
- - clang
- - clang-tools
- - cppcheck
- - gcc
- - git
- - gtk-doc-tools
- - libglib2.0-dev
- - libgtk-3-dev
- - libsoup-3.0-dev
- - libxml2-dev
- - libxml2-utils
- - make
- - mate-common
- - tzdata
-
- fedora:
- # Useful URL: https://src.fedoraproject.org/cgit/rpms/libmateweather.git
- - autoconf-archive
- - clang
- - clang-analyzer
- - cppcheck-htmlreport
- - gcc
- - git
- - gtk3-devel
- - libsoup3-devel
- - libxml2-devel
- - make
- - mate-common
- - redhat-rpm-config
- - tzdata
-
- ubuntu:
- - autopoint
- - clang
- - clang-tools
- - gcc
- - git
- - gtk-doc-tools
- - libglib2.0-dev
- - libgtk-3-dev
- - libsoup-3.0-dev
- - libxml2-dev
- - libxml2-utils
- - make
- - mate-common
- - tzdata
-
-variables:
- - 'CHECKERS="
- -enable-checker deadcode.DeadStores
- -enable-checker alpha.deadcode.UnreachableCode
- -enable-checker alpha.core.CastSize
- -enable-checker alpha.core.CastToStruct
- -enable-checker alpha.core.IdenticalExpr
- -enable-checker alpha.core.SizeofPtr
- -enable-checker alpha.security.ArrayBoundV2
- -enable-checker alpha.security.MallocOverflow
- -enable-checker alpha.security.ReturnPtrRange
- -enable-checker alpha.unix.SimpleStream
- -enable-checker alpha.unix.cstring.BufferOverlap
- -enable-checker alpha.unix.cstring.NotNullTerminated
- -enable-checker alpha.unix.cstring.OutOfBounds
- -enable-checker alpha.core.FixedAddr
- -enable-checker security.insecureAPI.strcpy"'
-
-before_scripts:
- - if [ ${DISTRO_NAME} == "debian" ];then
- - curl -Ls -o debian.sh https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/debian.sh
- - bash ./debian.sh
- - fi
-
-build_scripts:
- - if [ ${DISTRO_NAME} == "debian" ];then
- - export CFLAGS+=" -Wsign-compare -Wunused-macros"
- - cppcheck --enable=warning,style,performance,portability,information,missingInclude .
- - fi
-
- - NOCONFIGURE=1 ./autogen.sh
- - scan-build $CHECKERS ./configure --enable-compile-warnings=maximum
- - if [ $CPU_COUNT -gt 1 ]; then
- - if [ ${DISTRO_NAME} == "debian" ];then
- - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make -j $CPU_COUNT
- - make clean
- - fi
- - scan-build $CHECKERS --keep-cc -o html-report make -j $CPU_COUNT
- - else
- - if [ ${DISTRO_NAME} == "debian" ];then
- - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make
- - make clean
- - fi
- - scan-build $CHECKERS --keep-cc -o html-report make
- - fi
-
-after_scripts:
- - if [ ${DISTRO_NAME} == "fedora" ];then
- - cppcheck --xml --output-file=cppcheck.xml --enable=warning,style,performance,portability,information,missingInclude .
- - cppcheck-htmlreport --title=${REPO_NAME} --file=cppcheck.xml --report-dir=cppcheck-htmlreport
- - ./gen-index -l 20
- - fi
- - if [ ${DISTRO_NAME} == "debian" ];then
- - make check
- - fi
- - make distcheck
-
-releases:
- draft: false
- prerelease: false
- checksum: true
- file_glob: true
- files: libmateweather-*.tar.xz
- github_release:
- tags: true
- overwrite: true
- base_version: 1.20.0
- notify_servers:
- - https://release.mate-desktop.org/release
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..80851cd
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,8 @@
+# Enable dependabot to keep our GHA pins automatically
+# updated, so we don't fall too far behind in the future
+version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: "/"
+ schedule:
+ interval: weekly
diff --git a/.github/workflows/archlinux.sh b/.github/workflows/archlinux.sh
new file mode 100755
index 0000000..c21a522
--- /dev/null
+++ b/.github/workflows/archlinux.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/bash
+
+set -eo pipefail
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+# Required packages on Archlinux
+requires=(
+ ccache # Use ccache to speed up build
+ clang # Build with clang on Archlinux
+)
+
+# https://gitlab.archlinux.org/archlinux/packaging/packages/libmateweather
+requires+=(
+ dconf
+ gdk-pixbuf2
+ glib2
+ glibc
+ gtk3
+ hicolor-icon-theme
+ libsoup3
+ libxml2
+ git
+ glib2-devel
+ gobject-introspection
+ gtk-doc
+ make
+ mate-common
+ tar
+ which
+)
+
+infobegin "Update system"
+pacman --noconfirm -Syu
+infoend
+
+infobegin "Install dependency packages"
+pacman --noconfirm -S ${requires[@]}
+infoend
diff --git a/.github/workflows/builds.sh b/.github/workflows/builds.sh
new file mode 100755
index 0000000..b192d97
--- /dev/null
+++ b/.github/workflows/builds.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/bash
+
+set -e
+set -o pipefail
+
+CPUS=$(grep processor /proc/cpuinfo | wc -l)
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+if [ -f autogen.sh ]; then
+ infobegin "Configure (autotools)"
+ NOCONFIGURE=1 ./autogen.sh
+ ./configure --prefix=/usr --enable-compile-warnings=maximum || {
+ cat config.log
+ exit 1
+ }
+ infoend
+
+ infobegin "Build (autotools)"
+ make -j ${CPUS}
+ infoend
+
+ infobegin "Check (autotools)"
+ make -j ${CPUS} check || {
+ true
+ }
+ infoend
+
+ infobegin "Distcheck (autotools)"
+ make -j ${CPUS} distcheck
+ infoend
+fi
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
new file mode 100644
index 0000000..5ae1254
--- /dev/null
+++ b/.github/workflows/builds.yml
@@ -0,0 +1,86 @@
+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.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.sha }}
+ cancel-in-progress: true
+
+env:
+ MATE_DESKTOP_VERSION: 1.28.2
+ CACHE_PATH: /tmp/.cache
+
+jobs:
+ build:
+ name: Build on ${{matrix.container}} (using ${{matrix.cc}})
+ runs-on: ubuntu-latest
+ container:
+ image: ${{matrix.container}}
+ volumes:
+ - /tmp/.cache
+ - /var/cache/apt
+
+ strategy:
+ fail-fast: false # don't cancel other jobs in the matrix if one fails
+ matrix:
+ container:
+ [
+ "debian:testing",
+ "fedora:latest",
+ "ubuntu:rolling",
+ "archlinux:latest",
+ ]
+ cc: ["gcc"]
+ cxx: ["g++"]
+ include:
+ - container: "archlinux:latest"
+ cc: "clang"
+ cxx: "clang++"
+
+ env:
+ # Speed up build with ccache
+ CC: ccache ${{ matrix.cc }}
+ CXX: ccache ${{ matrix.cxx }}
+ CONTAINER: ${{ matrix.container }}
+
+ steps:
+ - name: Setup environment variables
+ id: distro-name
+ shell: bash
+ run: |
+ split=(${CONTAINER//:/ })
+ distro=${split[0]}
+ short_sha=${SHA:0:8}
+ echo "DISTRO=$distro" | tee -a $GITHUB_ENV
+ - name: Install git command
+ shell: bash
+ run: |
+ echo "::group::Install git ..."
+ apt-get update -qq && apt-get install --assume-yes git || true
+ dnf update -y && dnf install -y git || true
+ pacman --noconfirm -Sy git || true
+ echo "::endgroup::"
+ - name: Repository checkout
+ uses: actions/checkout@v5
+ - name: Install dependency packages
+ run: .github/workflows/${{ env.DISTRO }}.sh
+ - name: Enable ccache to speed up builds
+ uses: hendrikmuhs/[email protected]
+ with:
+ key: ${{ env.DISTRO }}-${{ matrix.cc }}
+ - name: Cache mate-desktop binary packages
+ uses: actions/cache@v5
+ id: cache-mate-desktop
+ with:
+ path: ${{ env.CACHE_PATH }}
+ key: ${{ env.DISTRO }}-build-mate-desktop-${{env.MATE_DESKTOP_VERSION}}
+ - name: Build the source code
+ run: .github/workflows/builds.sh
diff --git a/.github/workflows/debian.sh b/.github/workflows/debian.sh
new file mode 100755
index 0000000..0cb659c
--- /dev/null
+++ b/.github/workflows/debian.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/bash
+
+set -eo pipefail
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+# Required packages on Debian
+requires=(
+ ccache # Use ccache to speed up build
+)
+
+# https://salsa.debian.org/debian-mate-team/libmateweather
+requires+=(
+ autopoint
+ gcc
+ git
+ gtk-doc-tools
+ libglib2.0-dev
+ libgtk-3-dev
+ libsoup-3.0-dev
+ libxml2-dev
+ libxml2-utils
+ make
+ mate-common
+ tzdata
+)
+
+infobegin "Update system"
+apt-get update -qq
+infoend
+
+infobegin "Install dependency packages"
+env DEBIAN_FRONTEND=noninteractive \
+ apt-get install --assume-yes \
+ ${requires[@]}
+infoend
diff --git a/.github/workflows/fedora.sh b/.github/workflows/fedora.sh
new file mode 100755
index 0000000..830c5a1
--- /dev/null
+++ b/.github/workflows/fedora.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/bash
+
+set -eo pipefail
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+# Required packages on Fedora
+requires=(
+ ccache # Use ccache to speed up build
+)
+
+# https://src.fedoraproject.org/cgit/rpms/libmateweather.git
+requires+=(
+ autoconf-archive
+ gcc
+ git
+ gtk3-devel
+ libsoup3-devel
+ libxml2-devel
+ make
+ mate-common
+ redhat-rpm-config
+ tzdata
+)
+
+infobegin "Update system"
+dnf update -y
+infoend
+
+infobegin "Install dependency packages"
+dnf install -y ${requires[@]}
+infoend
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..7d7f1c7
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,24 @@
+name: Release Version
+on:
+ push:
+ tags:
+ - "v*.*.*"
+
+jobs:
+ release:
+ name: Release New Version
+ runs-on: ubuntu-latest
+ steps:
+ - name: Repository checkout
+ uses: actions/checkout@v5
+
+ - name: Install dependency packages
+ run: sudo .github/workflows/ubuntu.sh
+
+ - name: Build the source code
+ run: .github/workflows/builds.sh autotools
+ - name: Create github release
+ run: |
+ gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --generate-notes libmateweather-*.tar.xz
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/ubuntu.sh b/.github/workflows/ubuntu.sh
new file mode 100755
index 0000000..24346f6
--- /dev/null
+++ b/.github/workflows/ubuntu.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/bash
+
+set -eo pipefail
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+# Required packages on Ubuntu
+requires=(
+ ccache # Use ccache to speed up build
+)
+
+# https://git.launchpad.net/ubuntu/+source/libmateweather/tree/debian/control
+requires+=(
+ autopoint
+ gcc
+ git
+ gtk-doc-tools
+ libglib2.0-dev
+ libgtk-3-dev
+ libsoup-3.0-dev
+ libxml2-dev
+ libxml2-utils
+ make
+ mate-common
+ tzdata
+)
+
+infobegin "Update system"
+apt-get update -y
+infoend
+
+infobegin "Install dependency packages"
+env DEBIAN_FRONTEND=noninteractive \
+ apt-get install --assume-yes \
+ ${requires[@]}
+infoend
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6f66888..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-# vim: set ts=2 sts=2 sw=2 expandtab :
-dist: jammy
-language: shell
-os: linux
-services:
- - docker
-addons:
- apt:
- packages:
- - python3-pip
- - python3-setuptools
-
-branches:
- except:
- - gh-pages
-
-before_install:
- - curl -Ls -o docker-build https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/docker-build
- - curl -Ls -o gen-index https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/gen-index.sh
- - chmod +x docker-build gen-index
-
-install:
- - pip3 install PyGithub
- - ./docker-build --name ${DISTRO} --config .build.yml --install
-
-script:
- - ./docker-build --name ${DISTRO} --verbose --config .build.yml --build scripts
-
-notifications:
- irc:
- if: (tag OR branch = master) AND
- repo = mate-desktop/libmateweather
- channels:
- - "irc.libera.chat#mate-dev"
- template:
- - "[%{repository_name}] %{author}: %{commit_subject}"
- - "[%{branch}] %{commit} %{message} %{build_url}"
- on_success: never
- on_failure: always
-
-deploy:
- - provider: pages
- edge: true
- token: $GITHUB_TOKEN
- keep_history: false
- committer_from_gh: true
- target_branch: gh-pages
- local_dir: html-report
- strategy: git
- on:
- all_branches: true
- condition: ${DISTRO} =~ ^fedora.*$
- - provider: script
- edge: true
- script: ./docker-build --verbose --config .build.yml --release github
- on:
- tags: true
- condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$"
-
-after_success:
- - 'if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then
- REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//\// });
- REPO_NAME=${REPO_SLUG_ARRAY[1]};
- URL="https://${REPO_NAME}.mate-desktop.dev";
- COMMENT="Code analysis completed";
- curl -H "Authorization: token $GITHUB_TOKEN" -X POST
- -d "{\"state\": \"success\", \"description\": \"$COMMENT\", \"context\":\"scan-build\", \"target_url\": \"$URL\"}"
- https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA};
- fi'
-
-
-env:
-# - DISTRO="archlinux:latest"
- - DISTRO="debian:testing"
- - DISTRO="fedora:latest"
-# - DISTRO="ubuntu:rolling"