diff options
| -rw-r--r-- | .build.yml | 210 | ||||
| -rw-r--r-- | .github/dependabot.yml | 8 | ||||
| -rwxr-xr-x | .github/workflows/archlinux.sh | 49 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 280 | ||||
| -rwxr-xr-x | .github/workflows/builds.sh | 38 | ||||
| -rw-r--r-- | .github/workflows/builds.yml | 94 | ||||
| -rwxr-xr-x | .github/workflows/debian.sh | 54 | ||||
| -rwxr-xr-x | .github/workflows/fedora.sh | 43 | ||||
| -rwxr-xr-x | .github/workflows/mate-desktop.sh | 148 | ||||
| -rwxr-xr-x | .github/workflows/ubuntu.sh | 55 | ||||
| -rw-r--r-- | configure.ac | 2 |
11 files changed, 490 insertions, 491 deletions
diff --git a/.build.yml b/.build.yml deleted file mode 100644 index 01f02b68..00000000 --- a/.build.yml +++ /dev/null @@ -1,210 +0,0 @@ -########################################################## -# THE FOLLOWING LINES IS USED BY docker-build -########################################################## -requires: - archlinux: - # Useful URL: https://git.archlinux.org/svntogit/community.git/tree/mate-panel - - autoconf-archive - - clang - - gcc - - git - - gobject-introspection - - gtk-layer-shell - - itstool - - libcanberra - - libmateweather - - libsm - - libwnck3 - - make - - mate-common - - mate-desktop - - mate-menus - - meson - - which - - yelp-tools - # mate-desktop dependencies - - iso-codes - - gobject-introspection - - debian: - # Useful URL: https://github.com/mate-desktop/debian-packages - # Useful URL: https://salsa.debian.org/debian-mate-team/mate-panel - - autoconf-archive - - autopoint - - clang - - clang-tools - - cppcheck - - gir1.2-freedesktop - - git - - gobject-introspection - - gtk-doc-tools - - libatk1.0-dev - - libcairo2-dev - - libdconf-dev - - libgirepository1.0-dev - - libglib2.0-dev - - libgtk-3-dev - - libgtk-layer-shell-dev - - libice-dev - - libmate-desktop-dev - - libmate-menu-dev - - libmateweather-dev - - libpango1.0-dev - - libsm-dev - - libsoup-3.0-dev - - libwnck-3-dev - - libx11-dev - - libxrandr-dev - - lsb-release - - make - - mate-common - - meson - - yelp-tools - # mate-desktop dependencies - - iso-codes - - gobject-introspection - - libgirepository1.0-dev - - fedora: - # Useful URL: https://src.fedoraproject.org/cgit/rpms/mate-panel.git - - autoconf-archive - - clang-analyzer - - clang - - cppcheck-htmlreport - - desktop-file-utils - - gcc - - git - - gobject-introspection-devel - - gtk3-devel - - gtk-layer-shell-devel - - libSM-devel - - libmateweather-devel - - libwnck3-devel - - make - - mate-common - - mate-desktop-devel - - mate-menus-devel - - meson - - redhat-rpm-config - - yelp-tools - # mate-desktop dependencies - - iso-codes-devel - - gobject-introspection-devel - - ubuntu: - - autoconf-archive - - autopoint - - clang - - clang-tools - - gir1.2-freedesktop - - git - - gobject-introspection - - gtk-doc-tools - - libatk1.0-dev - - libcairo2-dev - - libdconf-dev - - libgirepository1.0-dev - - libglib2.0-dev - - libgtk-3-dev - - libgtk-layer-shell-dev - - libice-dev - - libmate-desktop-dev - - libmate-menu-dev - - libmateweather-dev - - libpango1.0-dev - - libsm-dev - - libsoup-3.0-dev - - libwnck-3-dev - - libx11-dev - - libxrandr-dev - - lsb-release - - make - - mate-common - - meson - - yelp-tools - # mate-desktop dependencies - - iso-codes - - gobject-introspection - - libgirepository1.0-dev - -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"' - - MATE_DESKTOP_VERSION=1.28.2 - -before_scripts: - -build_scripts: - - cd ${START_DIR} - - if [ ! -f mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz ];then - - curl -Ls -o mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz https://github.com/mate-desktop/mate-desktop/releases/download/v${MATE_DESKTOP_VERSION}/mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz - - fi - - tar xf mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz - - cd mate-desktop-${MATE_DESKTOP_VERSION} - - if [ ${DISTRO_NAME} == "debian" -o ${DISTRO_NAME} == "ubuntu" ];then - - ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu - - else - - ./autogen.sh --prefix=/usr - - fi - - if [ ${TRAVIS} == "false" ]; then - - make clean - - fi - - make - - make install - - - cd ${START_DIR} - - if [ ${DISTRO_NAME} == "debian" ];then - - export CFLAGS+=" -Wsign-compare" - - cppcheck --enable=warning,style,performance,portability,information,missingInclude -i'gtk-layer-shell-build' . - - fi - - - NOCONFIGURE=1 ./autogen.sh - - scan-build $CHECKERS ./configure --enable-compile-warnings=maximum --with-in-process-applets=all - - 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 -i'gtk-layer-shell-build' . - - cppcheck-htmlreport --title=${REPO_NAME} --file=cppcheck.xml --report-dir=cppcheck-htmlreport - - ./gen-index -l 20 -i https://raw.githubusercontent.com/${OWNER_NAME}/${REPO_NAME}/master/icons/16x16/${REPO_NAME}.png - - fi - - make distcheck - -releases: - draft: false - prerelease: false - checksum: true - file_glob: true - files: mate-panel-*.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 00000000..80851cd3 --- /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 00000000..9b2453d9 --- /dev/null +++ b/.github/workflows/archlinux.sh @@ -0,0 +1,49 @@ +#!/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/mate-panel +requires+=( + autoconf-archive + dbus-glib + dconf-editor + gcc + gettext + git + glib2-devel + gobject-introspection + gtk-layer-shell + itstool + libcanberra + libmateweather + libsm + libwnck3 + make + mate-common + mate-desktop + mate-menus + which + yelp-tools +) + +infobegin "Update system" +pacman --noconfirm -Syu +infoend + +infobegin "Install dependency packages" +pacman --noconfirm -S ${requires[@]} +infoend diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d1febfd6..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,280 +0,0 @@ -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_PANEL_DEP: 1.28.2 - CONFIGURE_FLAGS: --enable-compile-warnings=maximum - CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration - JOBS: 2 - DEBUG: 1 - # Useful URL: https://github.com/mate-desktop/debian-packages - # Useful URL: https://salsa.debian.org/debian-mate-team/mate-panel - DEB_LIBRARY_DEPS: | - libatk1.0-dev - libcairo2-dev - libdconf-dev - libgirepository1.0-dev - libglib2.0-dev - libgtk-3-dev - libgtk-layer-shell-dev - libice-dev - libmate-desktop-dev - libmate-menu-dev - libmateweather-dev - libpango1.0-dev - libsm-dev - libsoup-3.0-dev - libwnck-3-dev - libx11-dev - libxrandr-dev - # mate-desktop dependencies - DEB_LIBRARY_DEPS_MATE_DESKTOP: | - libgirepository1.0-dev - DEB_BUILD_DEPS: | - ccache - autoconf-archive - autopoint - gir1.2-freedesktop - git - gobject-introspection - gtk-doc-tools - lsb-release - make - mate-common - meson - yelp-tools - # mate-desktop dependencies - DEB_BUILD_DEPS_MATE_DESKTOP: | - iso-codes - gobject-introspection - # TODO - DEB_SCAN_BUILD_DEPS: | - clang - clang-tools - # Useful URL: https://git.archlinux.org/svntogit/community.git/tree/mate-panel - ARCH_BUILD_DEPS: | - ccache - autoconf-archive - clang - gcc - git - glib2-devel - gobject-introspection - gtk-layer-shell - itstool - libcanberra - libmateweather - libsm - libwnck3 - make - mate-common - mate-desktop - mate-menus - meson - which - yelp-tools - # mate-desktop dependencies - ARCH_BUILD_DEPS_MATE_DESKTOP: | - iso-codes - gobject-introspection - -jobs: - build: - name: Build on ${{matrix.container}} with in-process=${{matrix.in-process}} (using ${{matrix.cc}}) - runs-on: ubuntu-latest - container: ${{matrix.container}} - - strategy: - fail-fast: false # don't cancel other jobs in the matrix if one fails - matrix: - in-process: [all, none] - container: ['debian:testing', 'ubuntu:rolling', 'archlinux:latest'] - cc: ['gcc'] - cxx: ['g++'] - include: - # test with clang on archlinux:latest - - container: 'archlinux:latest' - cc: 'clang' - cxx: 'clang++' - in-process: all - - container: 'archlinux:latest' - cc: 'clang' - cxx: 'clang++' - in-process: none - - env: - # Speed up build with ccache - CC: ccache ${{matrix.cc}} - CXX: ccache ${{matrix.cxx}} - # root install path for the mate-desktop dependency - MATE_DESKTOP_INSTALL_PATH: ${{github.workspace}}/mate-desktop-install - - steps: - # We can't *extend* the environment in 'env' directly, so use GITHUB_ENV - # output variable to do so. - - name: Setup environment - run: | - echo "PATH=${MATE_DESKTOP_INSTALL_PATH}/bin:${PATH}" >> "$GITHUB_ENV" - echo "PKG_CONFIG_PATH=${MATE_DESKTOP_INSTALL_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}" >> "$GITHUB_ENV" - - # Debugging - - name: Show environment - run: env | sort - if: ${{ env.DEBUG == '1' }} - - # For Debian and Ubuntu (apt-based with reasonably compatible packages) - - name: Install dependencies - if: ${{ startsWith(matrix.container, 'debian:') || startsWith(matrix.container, 'ubuntu:') }} - run: | - apt-get update -qq - apt-get install --assume-yes --no-install-recommends \ - ${DEB_BUILD_DEPS} ${DEB_BUILD_DEPS_MATE_DESKTOP} \ - ${DEB_LIBRARY_DEPS} ${DEB_LIBRARY_DEPS_MATE_DESKTOP} - - # For ArchLinux - - name: Install dependencies - if: ${{ startsWith(matrix.container, 'archlinux:') }} - # don't upgrade, although told otherwise (see link below), because - # apparently in the container it doesn't quit work... - # https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported - run: | - pacman --noconfirm -Syu - pacman --noconfirm -S ${ARCH_BUILD_DEPS} ${ARCH_BUILD_DEPS_MATE_DESKTOP} - - # Checkout the repository - - uses: actions/checkout@v3 - with: - path: mate-panel - submodules: true - - # Setup ccache cache - - name: ccache - uses: hendrikmuhs/[email protected] - with: - key: ${{ github.job }}-${{ matrix.container }}-${{ matrix.cc }} - - # Cache the build of the mate-desktop dependency - - name: Cache mate-desktop v${{env.MATE_PANEL_DEP}} dependency - uses: actions/cache@v3 - id: cache-mate-desktop - with: - path: ${{env.MATE_DESKTOP_INSTALL_PATH}} - # We try and be as specific as possible not to use the wrongly cached - # build, as this is a *binary*. - key: ${{runner.os}}-${{runner.arch}}-${{matrix.container}}-build-mate-desktop-${{env.MATE_PANEL_DEP}} - - # Checkout mate-desktop dep, if not already cached - - name: Checkout mate-desktop v${{env.MATE_PANEL_DEP}} - uses: actions/checkout@v3 - if: ${{ steps.cache-mate-desktop.outputs.cache-hit != 'true' }} - with: - repository: mate-desktop/mate-desktop - ref: v${{env.MATE_PANEL_DEP}} - path: mate-desktop - submodules: true - - # Build and install mate-desktop dep, if not already cached - - name: Install mate-desktop v${{env.MATE_PANEL_DEP}} - if: ${{ steps.cache-mate-desktop.outputs.cache-hit != 'true' }} - run: | - cd mate-desktop - NOCONFIGURE=1 ./autogen.sh - { ./configure --prefix="${MATE_DESKTOP_INSTALL_PATH}" || { cat config.log; exit 1; } ; } - make -j ${{ env.JOBS }} - make -j ${{ env.JOBS }} install - - # Follows regular mate-panel build and test steps - - - name: Configure - run: | - cd mate-panel - NOCONFIGURE=1 ./autogen.sh - { ./configure ${CONFIGURE_FLAGS} --with-in-process-applets=${{matrix.in-process}} || { cat config.log; exit 1; } ; } - - - name: Build - run: make -C mate-panel -j ${{ env.JOBS }} - - - name: Run Tests - run: make -C mate-panel -j ${{ env.JOBS }} check - - - name: Run distcheck - # We only run distcheck on one container, because it takes time and - # doesn't seem so useful to repeat everywhere -- it mostly checks the - # build system itself, rather than the build. - if: ${{ startsWith(matrix.container, 'debian:') }} - run: make -C mate-panel -j ${{ env.JOBS }} distcheck - - # Do we need the real build for cppcheck run? I don't think so - cppcheck: - name: Run cppcheck - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - # Install code dependencies so that cppcheck has more info - - name: Install dependencies - run: | - sudo apt-get update -qq - sudo apt-get install --assume-yes --no-install-recommends \ - cppcheck ${DEB_LIBRARY_DEPS} ${DEB_LIBRARY_DEPS_MATE_DESKTOP} - - # - define relevant configuration I can think of - # - X11-related stuff - # - Wayland-related stuff - # - in-process for Wayland - # - optional features - # - _Noreturn: this is to avoid false positive with functions that - # don't return, like g_assert(false). Here, we rely on G_NORETURN - # (GLib 2.68+) using _Noreturn C11 attribute if __STDC_VERSION__ is - # high enough (cppcheck sets it for us in newer versions, but not on - # here yet); but the version of cppcheck we run on don't know about - # the C11 attribute, so map it to the GCC one it does know. - # This is a tad over-specific, but it removes some spurious warnings, - # and defining e.g. __GNUC__=12 is simpler, but is a *lot* slower - # (more than 3 times slower), and doesn't seem to yield other - # benefits for the moment. - # - -I flags from pkg-config (grepped from configure.ac) - # - ignore non-source directories - - name: cppcheck - env: - checks: warning,style,performance,portability,information,missingInclude - defines: > - -DHAVE_X11 -DHAVE_RANDR - -DHAVE_WAYLAND - -DCLOCK_INPROCESS -DFISH_INPROCESS -DNOTIFICATION_AREA_INPROCESS -DWNCKLET_INPROCESS - -DHAVE_LANGINFO_H -DHAVE_NL_LANGINFO - -DGETTEXT_PACKAGE="mate-panel" - -D__STDC_VERSION__=201112 -D_Noreturn=__attribute__((__noreturn__)) - packages: > - gdk-pixbuf-2.0 - gio-unix-2.0 - gmodule-2.0 - gtk+-3.0 - ice - libwnck-3.0 - mate-desktop-2.0 - sm - run: | - cppcheck --enable="$checks" \ - -j $JOBS \ - $defines \ - $(pkg-config --cflags-only-I $packages) \ - -i gtk-layer-shell-build \ - -i mate-panel/mate-submodules/ \ - . diff --git a/.github/workflows/builds.sh b/.github/workflows/builds.sh new file mode 100755 index 00000000..b192d971 --- /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 00000000..18c0ef90 --- /dev/null +++ b/.github/workflows/builds.yml @@ -0,0 +1,94 @@ +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 + with: + submodules: "true" + - 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 }} + + # INFO: mate-panel depends mate-desktop 1.28.2+, so we should install it from source. + - 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: Built and install mate-desktop from source + run: .github/workflows/mate-desktop.sh ${{env.MATE_DESKTOP_VERSION}} ${{ env.CACHE_PATH }} + # INFO: mate-panel depends mate-desktop 1.28.2+, install finished. + + - 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 00000000..ddf9ae76 --- /dev/null +++ b/.github/workflows/debian.sh @@ -0,0 +1,54 @@ +#!/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/mate-panel +requires+=( + autoconf-archive + autopoint + gir1.2-freedesktop + gobject-introspection + gtk-doc-tools + libatk1.0-dev + libcairo2-dev + libdconf-dev + libgirepository1.0-dev + libglib2.0-dev + libgtk-3-dev + libgtk-layer-shell-dev + libice-dev + libmate-menu-dev + libmateweather-dev + libpango1.0-dev + libsm-dev + libsoup-3.0-dev + libwnck-3-dev + libx11-dev + libxrandr-dev + make + mate-common + yelp-tools +) + +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 00000000..a77455a5 --- /dev/null +++ b/.github/workflows/fedora.sh @@ -0,0 +1,43 @@ +#!/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/mate-panel.git +requires+=( + autoconf-archive + desktop-file-utils + gcc + git + gobject-introspection-devel + gtk3-devel + gtk-layer-shell-devel + libSM-devel + libmateweather-devel + libwnck3-devel + make + mate-common + mate-menus-devel + redhat-rpm-config + yelp-tools +) + +infobegin "Update system" +dnf update -y +infoend + +infobegin "Install dependency packages" +dnf install -y ${requires[@]} +infoend 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 diff --git a/.github/workflows/ubuntu.sh b/.github/workflows/ubuntu.sh new file mode 100755 index 00000000..7bbb1f51 --- /dev/null +++ b/.github/workflows/ubuntu.sh @@ -0,0 +1,55 @@ +#!/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/mate-panel/tree/debian/control +requires+=( + autoconf-archive + autopoint + gir1.2-freedesktop + git + gobject-introspection + gtk-doc-tools + libatk1.0-dev + libcairo2-dev + libdconf-dev + libgirepository1.0-dev + libglib2.0-dev + libgtk-3-dev + libgtk-layer-shell-dev + libice-dev + libmate-menu-dev + libmateweather-dev + libpango1.0-dev + libsm-dev + libsoup-3.0-dev + libwnck-3-dev + libx11-dev + libxrandr-dev + make + mate-common + yelp-tools +) + +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/configure.ac b/configure.ac index 92dd8aae..2c2fbd97 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ AC_INIT([mate-panel], [1.29.0], [https://github.com/mate-desktop/mate-panel/issues], [mate-panel], [https://mate-desktop.org]) AC_CONFIG_HEADERS(config.h) +AC_CONFIG_MACRO_DIRS([m4]) AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz tar-ustar -Wno-portability check-news]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_CONFIG_MACRO_DIR([m4]) MATE_COMMON_INIT # Before making a release, the LT_VERSION string should be modified. |
