Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 0 additions & 117 deletions .build.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions .github/workflows/archlinux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/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/python-caja
requires+=(
caja
gcc
git
intltool
make
mate-common
python-gobject
which
)

infobegin "Update system"
pacman --noconfirm -Syu
infoend

infobegin "Install dependency packages"
pacman --noconfirm -S ${requires[@]}
infoend
38 changes: 38 additions & 0 deletions .github/workflows/builds.sh
Original file line number Diff line number Diff line change
@@ -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
75 changes: 75 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -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
41 changes: 41 additions & 0 deletions .github/workflows/debian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/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
)

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
36 changes: 36 additions & 0 deletions .github/workflows/fedora.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/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
)

requires+=(
autoconf-archive
caja-devel
gcc
git
make
mate-common
python3-gobject-devel
python3-devel
redhat-rpm-config
)

infobegin "Update system"
dnf update -y
infoend

infobegin "Install dependency packages"
dnf install -y ${requires[@]}
infoend
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 python-caja-*.tar.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading