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/builds.yml | |
| 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/builds.yml')
| -rw-r--r-- | .github/workflows/builds.yml | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml new file mode 100644 index 00000000..eafdc6f2 --- /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-utils depends mate-desktop 1.27.1+, 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-utils depends mate-desktop 1.27.1+, install finished. + + - name: Build the source code + run: .github/workflows/builds.sh |
