diff options
| author | mbkma <[email protected]> | 2026-03-12 18:17:20 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-12 17:17:20 +0000 |
| commit | 8a0c5df52081a00eeb8e08de0963fa65b8187602 (patch) | |
| tree | 2ccaa298b93a444285f9b017c3a8e7c38cdbf8b8 /.github/workflows/builds.sh | |
| parent | 99c7f79ded93e50f6449fba599e3b212ce7e3abb (diff) | |
| download | libmatekbd-8a0c5df52081a00eeb8e08de0963fa65b8187602.tar.bz2 libmatekbd-8a0c5df52081a00eeb8e08de0963fa65b8187602.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.
Diffstat (limited to '.github/workflows/builds.sh')
| -rwxr-xr-x | .github/workflows/builds.sh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/.github/workflows/builds.sh b/.github/workflows/builds.sh new file mode 100755 index 0000000..20c1ad5 --- /dev/null +++ b/.github/workflows/builds.sh @@ -0,0 +1,64 @@ +#!/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::" +} + +# Run meson first, then run autotools +# Because meson dist requires a clean git workspace +# Autotools will modify some files (such as po, etc.), making them dirty. +if [ -f meson.build ]; then + + infobegin "Configure (meson)" + meson setup _build --prefix=/usr + infoend + + infobegin "Build (meson)" + meson compile -C _build + infoend + + infobegin "Test (meson)" + ninja -C _build test + infoend + + infobegin "Dist (meson)" + # Git safedirectory stop ninja dist + # https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9 + # https://git-scm.com/docs/git-config/2.35.2#Documentation/git-config.txt-safedirectory + git config --global --add safe.directory ${PWD} + ninja -C _build dist + infoend +fi + +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 |
