Check the doxygen version
[platform/upstream/libxkbcommon.git] / .github / workflows / linux.yml
1 name: linux
2
3 on:
4   push:
5     branches: [ master ]
6   pull_request:
7     branches: [ master ]
8
9 # Set permissions at the job level.
10 permissions: {}
11
12 jobs:
13   linux:
14     runs-on: ubuntu-22.04
15     permissions:
16       contents: read
17     strategy:
18       matrix:
19         compiler: [clang, gcc]
20     steps:
21       - uses: actions/checkout@v3
22         with:
23           persist-credentials: false
24       - uses: actions/setup-python@v4
25         with:
26           python-version: '3.9'
27       - name: Install dependencies
28         run: |
29           python -m pip install --upgrade meson PyYAML
30           sudo apt update
31           sudo apt install -y \
32             doxygen libxcb-xkb-dev valgrind ninja-build \
33             libwayland-dev wayland-protocols bison graphviz
34       - name: Setup
35         run: |
36           # -gdwarf-4 - see https://github.com/llvm/llvm-project/issues/56550.
37           CFLAGS='-gdwarf-4' meson setup build -Denable-cool-uris=true
38         env:
39           CC: ${{ matrix.compiler }}
40       - name: Build
41         run: |
42           meson compile -C build
43       - name: Test
44         run:
45           meson test -C build --print-errorlogs --no-suite python-tests
46       - name: Test with valgrind
47         run:
48           meson test -C build --print-errorlogs --setup=valgrind --no-suite python-tests
49       - name: Upload test logs
50         uses: actions/upload-artifact@v3
51         if: failure()
52         with:
53           name: test logs
54           path: |
55             build/meson-logs/
56       - name: Ensure doxygen version is correct
57         run: |
58             doxygen --version > version.txt
59             echo "1.9.6" >> version.txt
60             if [ $(sort -V version.txt | tail -n1) != "1.9.6" ]; then
61                 echo "Doxygen version 1.9.6 or earlier expected, see #347"
62                 exit 1
63             fi
64       - name: Store doxygen docs for use by the pages workflow
65         uses: actions/upload-artifact@v3
66         if: success()
67         with:
68           name: doxygen-docs
69           path: |
70             build/html/