2022-01-16 21:05:41 -07:00
|
|
|
name: linux
|
|
|
|
|
2022-12-16 12:36:13 -07:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
2022-01-16 21:05:41 -07:00
|
|
|
|
|
|
|
# Set permissions at the job level.
|
|
|
|
permissions: {}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
linux:
|
2023-05-12 13:00:32 -06:00
|
|
|
runs-on: ubuntu-22.04
|
2022-01-16 21:05:41 -07:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
compiler: [clang, gcc]
|
|
|
|
steps:
|
2022-12-06 16:41:11 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-16 21:05:41 -07:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2022-12-06 16:41:11 -07:00
|
|
|
- uses: actions/setup-python@v4
|
2022-01-16 21:05:41 -07:00
|
|
|
with:
|
|
|
|
python-version: '3.9'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-05-14 07:11:15 -06:00
|
|
|
python -m pip install --upgrade meson PyYAML
|
2022-03-20 05:50:12 -06:00
|
|
|
sudo apt update
|
2022-01-16 21:05:41 -07:00
|
|
|
sudo apt install -y \
|
|
|
|
doxygen libxcb-xkb-dev valgrind ninja-build \
|
2023-12-07 04:21:53 -07:00
|
|
|
libwayland-dev wayland-protocols bison graphviz libicu-dev
|
2023-09-18 05:17:30 -06:00
|
|
|
- name: Install xkeyboard-config
|
|
|
|
run: |
|
|
|
|
# Install master version of xkeyboard-config, in order to ensure
|
|
|
|
# its latest version works well with xkbcommon.
|
|
|
|
# HACK: We use meson to install, while it would be cleaner
|
|
|
|
# to create a proper package to install or use some PPA.
|
|
|
|
pushd ~
|
|
|
|
git clone --depth=1 https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config.git
|
|
|
|
cd "xkeyboard-config"
|
|
|
|
BUILDDIR=build
|
|
|
|
meson setup $BUILDDIR -Dprefix=/usr
|
|
|
|
meson install -C $BUILDDIR
|
|
|
|
popd
|
2022-01-16 21:05:41 -07:00
|
|
|
- name: Setup
|
|
|
|
run: |
|
2023-05-12 13:00:32 -06:00
|
|
|
# -gdwarf-4 - see https://github.com/llvm/llvm-project/issues/56550.
|
2023-05-07 18:35:16 -06:00
|
|
|
CFLAGS='-gdwarf-4' meson setup build -Denable-cool-uris=true
|
2022-01-16 21:05:41 -07:00
|
|
|
env:
|
|
|
|
CC: ${{ matrix.compiler }}
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
meson compile -C build
|
|
|
|
- name: Test
|
2022-07-14 21:07:26 -06:00
|
|
|
run:
|
|
|
|
meson test -C build --print-errorlogs --no-suite python-tests
|
|
|
|
- name: Test with valgrind
|
2022-01-16 21:05:41 -07:00
|
|
|
run:
|
|
|
|
meson test -C build --print-errorlogs --setup=valgrind --no-suite python-tests
|
2022-07-14 21:01:52 -06:00
|
|
|
- name: Upload test logs
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: test logs
|
|
|
|
path: |
|
|
|
|
build/meson-logs/
|
2023-07-02 23:57:51 -06:00
|
|
|
- name: Ensure doxygen version is correct
|
|
|
|
run: |
|
|
|
|
doxygen --version > version.txt
|
|
|
|
echo "1.9.6" >> version.txt
|
|
|
|
if [ $(sort -V version.txt | tail -n1) != "1.9.6" ]; then
|
|
|
|
echo "Doxygen version 1.9.6 or earlier expected, see #347"
|
|
|
|
exit 1
|
|
|
|
fi
|
2023-05-07 18:35:16 -06:00
|
|
|
- name: Store doxygen docs for use by the pages workflow
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
name: doxygen-docs
|
|
|
|
path: |
|
|
|
|
build/html/
|