75eee79ab7685cd1eb906c2da8962544e6423aa6
[platform/upstream/libxkbcommon.git] / .github / workflows / main.yml
1 name: CI
2
3 on:
4   push:
5     branches: [ master ]
6   pull_request:
7     branches: [ master ]
8
9 jobs:
10   linux:
11     runs-on: ubuntu-18.04
12     strategy:
13       matrix:
14         compiler: [clang, gcc]
15     steps:
16       - uses: actions/checkout@v2
17       - uses: actions/setup-python@v1
18         with:
19           python-version: '3.7'
20       - name: Install dependencies
21         run: |
22           python -m pip install --upgrade pip meson
23           sudo apt update -y
24           sudo env DEBIAN_FRONTEND=noninteractive apt install -y \
25             doxygen libxcb-xkb-dev valgrind ninja-build \
26             libwayland-dev wayland-protocols bison graphviz
27       - name: Setup
28         run: |
29           meson setup build
30         env:
31           CC: ${{ matrix.compiler }}
32       - name: Build
33         run: |
34           meson compile -C build
35       - name: Test
36         run:
37           meson test -C build --print-errorlogs # --wrapper="valgrind --leak-check=full --track-origins=yes --error-exitcode=99"
38
39   macos:
40     runs-on: macos-10.15
41     steps:
42       - uses: actions/checkout@v2
43       - uses: actions/setup-python@v1
44         with:
45           python-version: '3.7'
46       - name: Install dependencies
47         run: |
48           python -m pip install --upgrade pip meson
49           brew install doxygen bison ninja
50           brew link bison --force
51         env:
52           HOMEBREW_NO_AUTO_UPDATE: 1
53           HOMEBREW_NO_INSTALL_CLEANUP: 1
54       - name: Setup
55         run: |
56           PATH="/usr/local/opt/bison/bin:${PATH}" meson setup -Denable-wayland=false -Denable-x11=false -Denable-xkbregistry=false build
57       - name: Build
58         run: |
59           PATH="/usr/local/opt/bison/bin:${PATH}" meson compile -C build
60       - name: Test
61         run:
62           meson test -C build --print-errorlogs
63
64   windows:
65     runs-on: windows-2019
66     steps:
67       - uses: actions/checkout@v2
68       - uses: actions/setup-python@v1
69         with:
70           python-version: '3.7'
71       - uses: actions/cache@v2
72         with:
73           path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
74           key: ${{ runner.os }}-chocolatey-${{ matrix.os }}-${{ github.sha }}
75           restore-keys: |
76             ${{ runner.os }}-chocolatey-${{ matrix.os }}-
77             ${{ runner.os }}-chocolatey-
78       - name: Install dependencies
79         run: |
80           python -m pip install --upgrade pip meson
81           choco install ninja winflexbison3 -y --no-progress --stop-on-first-failure
82       - name: Setup
83         shell: cmd
84         run: |
85           call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
86           meson setup -Denable-wayland=false -Denable-x11=false -Denable-docs=false -Denable-xkbregistry=false build
87         env:
88           CC: cl
89       - name: Build
90         shell: cmd
91         run: |
92           call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
93           meson compile -C build
94       - name: Test
95         run:
96           meson test -C build --print-errorlogs