summaryrefslogtreecommitdiff
path: root/.github/workflows/builds.yml
diff options
context:
space:
mode:
authormbkma <[email protected]>2026-03-12 18:13:32 +0100
committerGitHub <[email protected]>2026-03-12 17:13:32 +0000
commit311fd9d2dc7540ac3db97107cb68d1b94931e259 (patch)
tree17c2a235969a3c3af85a64a20d54207a99f1e77b /.github/workflows/builds.yml
parent6df44358e1e1688a32c63d840ea50e21491ffc0a (diff)
downloadmate-session-manager-311fd9d2dc7540ac3db97107cb68d1b94931e259.tar.bz2
mate-session-manager-311fd9d2dc7540ac3db97107cb68d1b94931e259.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. remove .build.yml
Diffstat (limited to '.github/workflows/builds.yml')
-rw-r--r--.github/workflows/builds.yml77
1 files changed, 77 insertions, 0 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
new file mode 100644
index 0000000..22eb58f
--- /dev/null
+++ b/.github/workflows/builds.yml
@@ -0,0 +1,77 @@
+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
+ 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 }}
+
+ - name: Build the source code
+ run: .github/workflows/builds.sh