From 50186bf22d5200a56f92cebd98bd28cd06df7fbf Mon Sep 17 00:00:00 2001 From: mbkma Date: Tue, 27 Jan 2026 23:12:51 +0100 Subject: [PATCH 1/9] 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. --- .github/dependabot.yml | 8 ++++ .github/workflows/archlinux.sh | 33 +++++++++++++++ .github/workflows/builds.sh | 38 +++++++++++++++++ .github/workflows/builds.yml | 75 ++++++++++++++++++++++++++++++++++ .github/workflows/debian.sh | 39 ++++++++++++++++++ .github/workflows/fedora.sh | 34 +++++++++++++++ .github/workflows/release.yml | 30 ++++++++++++++ .github/workflows/ubuntu.sh | 38 +++++++++++++++++ .travis.yml | 74 --------------------------------- 9 files changed, 295 insertions(+), 74 deletions(-) create mode 100644 .github/dependabot.yml create mode 100755 .github/workflows/archlinux.sh create mode 100755 .github/workflows/builds.sh create mode 100644 .github/workflows/builds.yml create mode 100755 .github/workflows/debian.sh create mode 100755 .github/workflows/fedora.sh create mode 100644 .github/workflows/release.yml create mode 100755 .github/workflows/ubuntu.sh delete mode 100644 .travis.yml 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..487e6d7 --- /dev/null +++ b/.github/workflows/archlinux.sh @@ -0,0 +1,33 @@ +#!/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 +) + +requires+=( + autoconf-archive + caja + gcc + git + make + mate-common + 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..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..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/ccache-action@v1.2 + 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..6c4dba6 --- /dev/null +++ b/.github/workflows/debian.sh @@ -0,0 +1,39 @@ +#!/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 +) + +requires+=( + autoconf-archive + autopoint + gcc + git + gtk-doc-tools + libcaja-extension-dev + libgirepository1.0-dev + make + mate-common + python3-dev + python-gi-dev + quilt +) + +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..edcc9af --- /dev/null +++ b/.github/workflows/fedora.sh @@ -0,0 +1,34 @@ +#!/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 +) + +requires+=( + autoconf-archive + caja-devel + gcc + git + make + mate-common + 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..7b03226 --- /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/install-gh-cli-action@v0.2.1 + with: + gh-cli-version: 2.72.0 + + - name: Create github release + run: | + gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --generate-notes python-caja-*.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..08f0af7 --- /dev/null +++ b/.github/workflows/ubuntu.sh @@ -0,0 +1,38 @@ +#!/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 +) + +requires+=( + autoconf-archive + autopoint + git + gtk-doc-tools + libcaja-extension-dev + libgirepository1.0-dev + make + mate-common + python3-dev + python-gi-dev + quilt +) + +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 04248f9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,74 +0,0 @@ -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/python-caja - 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" From 5d217241844245172ee46763fccc365b359726e9 Mon Sep 17 00:00:00 2001 From: mbkma Date: Wed, 28 Jan 2026 08:50:07 +0100 Subject: [PATCH 2/9] ci: add missing packages and downstream links to CI scripts --- .github/workflows/archlinux.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/archlinux.sh b/.github/workflows/archlinux.sh index 487e6d7..7860ed2 100755 --- a/.github/workflows/archlinux.sh +++ b/.github/workflows/archlinux.sh @@ -11,17 +11,17 @@ infoend() { # 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/python-caja requires+=( - autoconf-archive - caja gcc git + intltool make - mate-common - python-gobject which + mate-common ) infobegin "Update system" From 0982b4a3308a503a41f59d74c49eff4a2c6e8de7 Mon Sep 17 00:00:00 2001 From: mbkma Date: Wed, 28 Jan 2026 09:00:33 +0100 Subject: [PATCH 3/9] ci: add missing PKGBUILD depends to archlinux CI script --- .github/workflows/archlinux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/archlinux.sh b/.github/workflows/archlinux.sh index 7860ed2..84e63fd 100755 --- a/.github/workflows/archlinux.sh +++ b/.github/workflows/archlinux.sh @@ -16,12 +16,14 @@ requires=( # https://gitlab.archlinux.org/archlinux/packaging/packages/python-caja requires+=( + caja gcc git intltool make - which mate-common + python-gobject + which ) infobegin "Update system" From 3f58b9bd0df9b46370375695a58400dbeee0959f Mon Sep 17 00:00:00 2001 From: mbkma Date: Wed, 28 Jan 2026 09:52:45 +0100 Subject: [PATCH 4/9] remove .build.yml --- .build.yml | 117 ----------------------------------------------------- 1 file changed, 117 deletions(-) delete mode 100644 .build.yml diff --git a/.build.yml b/.build.yml deleted file mode 100644 index 4ec38c0..0000000 --- a/.build.yml +++ /dev/null @@ -1,117 +0,0 @@ -########################################################## -# THE FOLLOWING LINES IS USED BY docker-build -########################################################## -requires: - archlinux: - # Useful URL: https://git.archlinux.org/svntogit/community.git/tree/python-caja - - autoconf-archive - - caja - - clang - - gcc - - git - - make - - mate-common - - python-gobject - - which - - debian: - # Useful URL: https://github.com/mate-desktop/debian-packages - # Useful URL: https://salsa.debian.org/debian-mate-team/python-caja - - autoconf-archive - - autopoint - - clang - - clang-tools - - cppcheck - - gcc - - git - - gtk-doc-tools - - libcaja-extension-dev - - libgirepository1.0-dev - - make - - mate-common - - python3-dev - - python-gi-dev - - quilt - - fedora: - # Useful URL: https://src.fedoraproject.org/cgit/rpms/python-caja.git - - autoconf-archive - - caja-devel - - clang - - clang-analyzer - - cppcheck-htmlreport - - gcc - - git - - make - - mate-common - - pygobject3-devel - - python3-devel - - redhat-rpm-config - - ubuntu: - - autoconf-archive - - autopoint - - clang - - clang-tools - - git - - gtk-doc-tools - - libcaja-extension-dev - - libgirepository1.0-dev - - make - - mate-common - - python3-dev - - python-gi-dev - - quilt - -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: - -build_scripts: - - NOCONFIGURE=1 ./autogen.sh - - scan-build $CHECKERS ./configure --enable-compile-warnings=maximum - - if [ $CPU_COUNT -gt 1 ]; then - - scan-build $CHECKERS --keep-cc -o html-report make -j $CPU_COUNT - - else - - scan-build $CHECKERS --keep-cc -o html-report make - - fi - - if [ ${DISTRO_NAME} == "debian" ];then - - cppcheck --enable=warning,style,performance,portability,information,missingInclude . - - 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 - - make distcheck - -releases: - draft: false - prerelease: false - checksum: true - file_glob: true - files: python-caja-*.tar.xz - github_release: - tags: true - overwrite: true - base_version: 1.20.0 - notify_servers: - - https://release.mate-desktop.org/release From 56e649c09bd8a5968bc3a6706f0ab80e971202b5 Mon Sep 17 00:00:00 2001 From: mbkma Date: Thu, 29 Jan 2026 23:17:51 +0100 Subject: [PATCH 5/9] ci: remove redundant GH CLI installation step --- .github/workflows/release.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b03226..db43951 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,12 +17,6 @@ jobs: - name: Build the source code run: .github/workflows/builds.sh autotools - - - name: Install GH CLI - uses: dev-hanz-ops/install-gh-cli-action@v0.2.1 - with: - gh-cli-version: 2.72.0 - - name: Create github release run: | gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --generate-notes python-caja-*.tar.xz From 0f7b00f89b171d1fb05cb0085fa99e3bbc9686d1 Mon Sep 17 00:00:00 2001 From: mbkma Date: Fri, 30 Jan 2026 00:26:21 +0100 Subject: [PATCH 6/9] ci: add set -eo pipefail to workflow scripts --- .github/workflows/archlinux.sh | 2 ++ .github/workflows/debian.sh | 2 ++ .github/workflows/fedora.sh | 2 ++ .github/workflows/ubuntu.sh | 2 ++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/archlinux.sh b/.github/workflows/archlinux.sh index 84e63fd..72dbd40 100755 --- a/.github/workflows/archlinux.sh +++ b/.github/workflows/archlinux.sh @@ -1,5 +1,7 @@ #!/usr/bin/bash +set -eo pipefail + # Use grouped output messages infobegin() { echo "::group::${1}" diff --git a/.github/workflows/debian.sh b/.github/workflows/debian.sh index 6c4dba6..ab5f506 100755 --- a/.github/workflows/debian.sh +++ b/.github/workflows/debian.sh @@ -1,5 +1,7 @@ #!/usr/bin/bash +set -eo pipefail + # Use grouped output messages infobegin() { echo "::group::${1}" diff --git a/.github/workflows/fedora.sh b/.github/workflows/fedora.sh index edcc9af..10c4f64 100755 --- a/.github/workflows/fedora.sh +++ b/.github/workflows/fedora.sh @@ -1,5 +1,7 @@ #!/usr/bin/bash +set -eo pipefail + # Use grouped output messages infobegin() { echo "::group::${1}" diff --git a/.github/workflows/ubuntu.sh b/.github/workflows/ubuntu.sh index 08f0af7..534c4ef 100755 --- a/.github/workflows/ubuntu.sh +++ b/.github/workflows/ubuntu.sh @@ -1,5 +1,7 @@ #!/usr/bin/bash +set -eo pipefail + # Use grouped output messages infobegin() { echo "::group::${1}" From 5c780d1a3eefb1147c70331c2244a598756e8db7 Mon Sep 17 00:00:00 2001 From: mbkma Date: Fri, 30 Jan 2026 00:39:26 +0100 Subject: [PATCH 7/9] build: add AC_CONFIG_MACRO_DIRS([m4]) for gettext m4 macros --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 78f5c87..1e5ff26 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,7 @@ AC_SUBST(VERSION) AM_INIT_AUTOMAKE(1.10 dist-xz no-dist-gzip check-news) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_HEADERS(config.h) +AC_CONFIG_MACRO_DIRS([m4]) AC_CONFIG_MACRO_DIR([m4]) MATE_COMPILE_WARNINGS From 080f77d9813d7e10791f919d6545a3d18bf99e19 Mon Sep 17 00:00:00 2001 From: mbkma Date: Fri, 30 Jan 2026 13:14:06 +0100 Subject: [PATCH 8/9] ci: add missing pkgs --- .github/workflows/fedora.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fedora.sh b/.github/workflows/fedora.sh index 10c4f64..1c37d5a 100755 --- a/.github/workflows/fedora.sh +++ b/.github/workflows/fedora.sh @@ -22,7 +22,7 @@ requires+=( git make mate-common - pygobject3-devel + python3-gobject-devel python3-devel redhat-rpm-config ) From d9b192ea920e070c4f1c143f56ccac5d6fc25b65 Mon Sep 17 00:00:00 2001 From: mbkma Date: Fri, 30 Jan 2026 13:19:41 +0100 Subject: [PATCH 9/9] fix configure.ac --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1e5ff26..724063e 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,6 @@ AM_INIT_AUTOMAKE(1.10 dist-xz no-dist-gzip check-news) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_MACRO_DIRS([m4]) -AC_CONFIG_MACRO_DIR([m4]) MATE_COMPILE_WARNINGS