summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormbkma <[email protected]>2026-01-27 23:12:51 +0100
committerLuke from DC <[email protected]>2026-03-08 07:30:00 +0000
commitd77fb3fb05664782398177af84f93dee226dfc62 (patch)
tree36dfeb81548c6b82097259b97e791f9d1a608866
parent7d4b7f4a8e6870674decc974190222bacb296c81 (diff)
downloadmozo-d77fb3fb05664782398177af84f93dee226dfc62.tar.bz2
mozo-d77fb3fb05664782398177af84f93dee226dfc62.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.
-rw-r--r--.github/dependabot.yml8
-rwxr-xr-x.github/workflows/archlinux.sh35
-rwxr-xr-x.github/workflows/builds.sh64
-rw-r--r--.github/workflows/builds.yml75
-rwxr-xr-x.github/workflows/debian.sh37
-rwxr-xr-x.github/workflows/fedora.sh35
-rw-r--r--.github/workflows/release.yml30
-rwxr-xr-x.github/workflows/ubuntu.sh37
-rw-r--r--.travis.yml48
9 files changed, 321 insertions, 48 deletions
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..dacaa31
--- /dev/null
+++ b/.github/workflows/archlinux.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/bash
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+# Required packages on Archlinux
+requires=(
+ ccache # Use ccache to speed up build
+ meson # Used for meson build
+)
+
+requires+=(
+ gcc
+ git
+ gtk3
+ intltool
+ make
+ mate-common
+ mate-menus
+ python-gobject
+ 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..20c1ad5
--- /dev/null
+++ b/.github/workflows/builds.sh
@@ -0,0 +1,64 @@
+#!/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::"
+}
+
+# Run meson first, then run autotools
+# Because meson dist requires a clean git workspace
+# Autotools will modify some files (such as po, etc.), making them dirty.
+if [ -f meson.build ]; then
+
+ infobegin "Configure (meson)"
+ meson setup _build --prefix=/usr
+ infoend
+
+ infobegin "Build (meson)"
+ meson compile -C _build
+ infoend
+
+ infobegin "Test (meson)"
+ ninja -C _build test
+ infoend
+
+ infobegin "Dist (meson)"
+ # Git safedirectory stop ninja dist
+ # https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9
+ # https://git-scm.com/docs/git-config/2.35.2#Documentation/git-config.txt-safedirectory
+ git config --global --add safe.directory ${PWD}
+ ninja -C _build dist
+ infoend
+fi
+
+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..b7d7864
--- /dev/null
+++ b/.github/workflows/builds.yml
@@ -0,0 +1,75 @@
+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
+
+
+jobs:
+ build:
+ name: Build on ${{matrix.container}} (using ${{matrix.cc}})
+ runs-on: ubuntu-latest
+ container:
+ image: ${{matrix.container}}
+
+ 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: 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..51fa32c
--- /dev/null
+++ b/.github/workflows/debian.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/bash
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+# Required packages on Debian
+requires=(
+ ccache # Use ccache to speed up build
+ meson # Used for meson build
+)
+
+requires+=(
+ autopoint
+ gettext
+ git
+ intltool
+ libmate-menu-dev
+ make
+ mate-common
+ python-gi-dev
+ python3
+)
+
+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..5e76ebf
--- /dev/null
+++ b/.github/workflows/fedora.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/bash
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+# Required packages on Fedora
+requires=(
+ ccache # Use ccache to speed up build
+ meson # Used for meson build
+)
+
+requires+=(
+ desktop-file-utils
+ gcc
+ git
+ make
+ mate-common
+ mate-menus-devel
+ pygobject3-devel
+ python3-devel
+ redhat-rpm-config
+)
+
+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..d190c1f
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,30 @@
+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: Install GH CLI
+ uses: dev-hanz-ops/[email protected]
+ with:
+ gh-cli-version: 2.72.0
+
+ - name: Create github release
+ run: |
+ gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --generate-notes mozo-*.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..d1eaba6
--- /dev/null
+++ b/.github/workflows/ubuntu.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/bash
+
+# Use grouped output messages
+infobegin() {
+ echo "::group::${1}"
+}
+infoend() {
+ echo "::endgroup::"
+}
+
+# Required packages on Ubuntu
+requires=(
+ ccache # Use ccache to speed up build
+ meson # Used for meson build
+)
+
+requires+=(
+ autopoint
+ gettext
+ git
+ intltool
+ libmate-menu-dev
+ make
+ mate-common
+ python-gi-dev
+ python3
+)
+
+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 e0ce4b1..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,48 +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
-
-before_install:
- - curl -Ls -o docker-build https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/docker-build
- - chmod +x docker-build
-
-install:
- - pip3 install PyGithub
- - ./docker-build --name ${DISTRO} --config .build.yml --install
-
-script:
- - ./docker-build --name ${DISTRO} --verbose --config .build.yml --build meson --build scripts
-
-notifications:
- irc:
- if: (tag OR branch = master) AND
- repo = mate-desktop/mozo
- 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: script
- edge: true
- script: ./docker-build --verbose --config .build.yml --release github
- on:
- tags: true
- condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$"
-
-env:
-# - DISTRO="archlinux:latest"
- - DISTRO="debian:testing"
- - DISTRO="fedora:latest"
-# - DISTRO="ubuntu:rolling"