diff options
| author | mbkma <[email protected]> | 2026-03-12 00:28:16 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-12 00:28:16 +0100 |
| commit | 3146dfa2b6e7b7f1d1e24ed2a62e2bb01aef337d (patch) | |
| tree | 2ad341d0bff673cbd039814749e79fa353f06ab7 /.github/workflows/mate-desktop.sh | |
| parent | b70d97e762a165828402307bca87221fdfa26d51 (diff) | |
| download | mate-utils-3146dfa2b6e7b7f1d1e24ed2a62e2bb01aef337d.tar.bz2 mate-utils-3146dfa2b6e7b7f1d1e24ed2a62e2bb01aef337d.tar.xz | |
ci: migrate from Travis CI to GitHub Actions (#373)
* 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.
* ci: add missing PKGBUILD depends to archlinux CI script
* remove .build.yml
* ci: remove redundant GH CLI installation step
* ci: add set -eo pipefail to workflow scripts
* build: add AC_CONFIG_MACRO_DIRS([m4]) for gettext m4 macros
* ci: add missing pkgs
* ci: build mate-desktop from source
* ci: disable pt language for help in search tool in Fedora build
---------
Co-authored-by: Victor Kareh <[email protected]>
Diffstat (limited to '.github/workflows/mate-desktop.sh')
| -rwxr-xr-x | .github/workflows/mate-desktop.sh | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/.github/workflows/mate-desktop.sh b/.github/workflows/mate-desktop.sh new file mode 100755 index 00000000..b55046d5 --- /dev/null +++ b/.github/workflows/mate-desktop.sh @@ -0,0 +1,148 @@ +#!/usr/bin/bash + +set -e +set -o pipefail + +NAME="mate-desktop" +TEMP_DIR=$(mktemp -d) +OS=$(cat /etc/os-release | grep ^ID | head -n 1 | awk -F= '{ print $2}') +TAG=$1 +CACHE_DIR=$2 + +# Use grouped output messages +infobegin() { + echo "::group::${1}" +} +infoend() { + echo "::endgroup::" +} + +# Required packages to build mate-desktop +# https://gitlab.archlinux.org/archlinux/packaging/packages/mate-desktop +arch_requires=( + autoconf-archive + gobject-introspection + mate-common + intltool +) + +# https://salsa.debian.org/debian-mate-team/mate-desktop/-/blob/master/debian/control +debian_requires=( + autoconf-archive + autopoint + gobject-introspection + gtk-doc-tools + intltool + iso-codes + libdconf-dev + libgdk-pixbuf-2.0-dev + libgirepository1.0-dev + libglib2.0-dev + libglib2.0-doc + libgtk-3-dev + libgtk-3-doc + librsvg2-bin + libstartup-notification0-dev + libx11-dev + libxml2-dev + libxrandr-dev + mate-common +) + +# https://src.fedoraproject.org/rpms/mate-desktop/blob/rawhide/f/mate-desktop.spec +fedora_requires=( + dconf-devel + desktop-file-utils + gobject-introspection-devel + make + mate-common + startup-notification-devel + gtk3-devel + iso-codes-devel + gobject-introspection-devel + cairo-gobject-devel +) + +# https://git.launchpad.net/ubuntu/+source/mate-desktop/tree/debian/control +ubuntu_requires=( + autoconf-archive + autopoint + gobject-introspection + gtk-doc-tools + intltool + iso-codes + libdconf-dev + libgdk-pixbuf-2.0-dev + libgirepository1.0-dev + libglib2.0-dev + libglib2.0-doc + libgtk-3-dev + libgtk-3-doc + librsvg2-bin + libstartup-notification0-dev + libx11-dev + libxml2-dev + libxrandr-dev + mate-common +) + +requires=$(eval echo '${'"${OS}_requires[@]}") + +infobegin "Install Depends for mate-desktop" +case ${OS} in +arch) + pacman --noconfirm -Syu + pacman --noconfirm -S ${requires[@]} + ;; +debian | ubuntu) + apt-get update -qq + env DEBIAN_FRONTEND=noninteractive \ + apt-get install --assume-yes --no-install-recommends ${requires[@]} + ;; +fedora) + dnf update -y + dnf install -y ${requires[@]} + ;; +esac +infoend + +# Use cached packages first +if [ -f $CACHE_DIR/${NAME}-${TAG}.tar.xz ]; then + echo "Found cache package, reuse it" + tar -C / -Jxf $CACHE_DIR/${NAME}-${TAG}.tar.xz +else + git clone --recurse-submodules https://github.com/mate-desktop/${NAME} + + # Foldable output information + infobegin "Configure" + cd ${NAME} + git checkout v${TAG} + if [[ ${OS} == "debian" || ${OS} == "ubuntu" ]]; then + ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu || { + cat config.log + exit 1 + } + else + ./autogen.sh --prefix=/usr || { + cat config.log + exit 1 + } + fi + infoend + + infobegin "Build" + make -j ${JOBS} + infoend + + infobegin "Install" + make install + infoend + + # Cache this package version + infobegin "Cache" + [ -d ${CACHE_DIR} ] || mkdir -p ${CACHE_DIR} + make install DESTDIR=${TEMP_DIR} + cd $TEMP_DIR + tar -J -cf $CACHE_DIR/${NAME}-${TAG}.tar.xz * + infoend +fi |
