Link with the necessary libraries #219
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- for-master | |
- github-ci | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- master | |
- for-master | |
jobs: | |
check_commits_job: | |
name: "Check commits" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "env" | |
run: env | sort | |
- name: "Developer's Certificate of Origin" | |
run: | | |
echo | |
echo 'Commits to check:' | |
git log --no-merges --pretty='%H%x09%s%x09%ce%x09-%(trailers:key=Signed-off-by,valueonly,separator=%x00)' origin/master.. | | |
tee /tmp/commits | | |
cut -f1,2 | |
echo '' | |
if grep -e '-$' /tmp/commits | cut -f1,2 | grep -e '^' > /tmp/bad-commits; then | |
echo 'Сommits that fail verification:' | |
cat /tmp/bad-commits | |
echo '' | |
echo 'The DCO Signoff Check for all commits has FAILED.' | |
echo 'See https://github.com/legionus/kbd/blob/master/docs/process/howto-contribute.md#patches=' | |
echo '' | |
exit 1 | |
fi | |
distcheck_job: | |
name: "Distcheck" | |
runs-on: ubuntu-latest | |
needs: [ check_commits_job ] | |
steps: | |
- name: "Check out repository" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "Install dependencies" | |
run: | | |
sudo apt-get update -y -qq | |
sudo apt-get install -y -qq gcc autoconf automake autopoint libtool libpam0g-dev bison flex gettext | |
- name: "Configure" | |
run: | | |
tests/configure.sh --datadir="$PWD/data" | |
- name: "Build" | |
run: | | |
make V=1 | |
- name: "Distcheck" | |
run: | | |
sudo -E make distcheck | |
build_job: | |
name: "Check with ${{ matrix.compiler }} / ${{ matrix.libc }}" | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
cc: gcc | |
compiler: gcc | |
libc: glibc | |
configure: | |
check: unittest e2e | |
- os: ubuntu-latest | |
cc: clang | |
compiler: clang | |
libc: glibc | |
configure: | |
check: unittest e2e | |
- os: ubuntu-latest | |
cc: musl-gcc -static -idirafter /usr/include/ -idirafter /usr/include/x86_64-linux-gnu/ | |
compiler: gcc | |
libc: musl | |
configure: --disable-libkeymap --disable-vlock | |
check: unittest e2e | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
needs: [ distcheck_job ] | |
env: | |
CC: ${{ matrix.cc }} | |
CHECK_KEYWORDS: ${{ matrix.check }} | |
SANDBOX: priviliged | |
TTY: /dev/tty60 | |
steps: | |
- name: "Check out repository" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: sudo apt-get update -y -qq | |
- run: sudo apt-get install -y -qq autoconf automake autopoint libtool libtool-bin libpam0g-dev bison flex gettext kbd strace | |
- run: sudo apt-get install -y -qq gcc clang musl musl-dev musl-tools | |
- name: "Configure" | |
run: | | |
tests/configure.sh --datadir="$PWD/tests/data" ${{ matrix.configure }} | |
- name: "Build" | |
run: | | |
make V=1 | |
- name: "Check" | |
run: | | |
sudo -E tests/check.sh | |
- name: "Upload artifacts" | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-${{ matrix.compiler }}-${{ matrix.libc }} | |
path: | | |
config.log | |
tests/testsuite.dir | |
tests/testsuite.log | |
if-no-files-found: ignore | |
retention-days: 1 | |