ci: possible fix for release workflow
[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 # Set permissions at the job level.
10 permissions: {}
11
12 jobs:
13   linux:
14     runs-on: ubuntu-20.04
15     permissions:
16       contents: read
17     strategy:
18       matrix:
19         compiler: [clang, gcc]
20     steps:
21       - uses: actions/checkout@v2
22         with:
23           persist-credentials: false
24       - uses: actions/setup-python@v2
25         with:
26           python-version: '3.9'
27       - name: Install dependencies
28         run: |
29           python -m pip install --upgrade meson
30           sudo apt install -y \
31             doxygen libxcb-xkb-dev valgrind ninja-build \
32             libwayland-dev wayland-protocols bison graphviz
33       - name: Setup
34         run: |
35           meson setup build
36         env:
37           CC: ${{ matrix.compiler }}
38       - name: Build
39         run: |
40           meson compile -C build
41       - name: Test
42         run:
43           meson test -C build --print-errorlogs --setup=valgrind --no-suite python-tests
44
45   macos:
46     runs-on: macos-10.15
47     permissions:
48       contents: read
49     steps:
50       - uses: actions/checkout@v2
51         with:
52           persist-credentials: false
53       - uses: actions/setup-python@v2
54         with:
55           python-version: '3.9'
56       - name: Install dependencies
57         run: |
58           python -m pip install --upgrade meson
59           brew install libxml2 doxygen bison ninja
60           brew link bison --force
61         env:
62           HOMEBREW_NO_AUTO_UPDATE: 1
63           HOMEBREW_NO_INSTALL_CLEANUP: 1
64       - name: Setup
65         run: |
66           PATH="/usr/local/opt/bison/bin:${PATH}" meson setup -Denable-wayland=false -Denable-x11=false build
67       - name: Build
68         run: |
69           PATH="/usr/local/opt/bison/bin:${PATH}" meson compile -C build
70       - name: Test
71         run:
72           meson test -C build --print-errorlogs
73
74   windows:
75     runs-on: windows-2019
76     permissions:
77       contents: read
78     steps:
79       - uses: actions/checkout@v2
80         with:
81           persist-credentials: false
82       - uses: actions/setup-python@v2
83         with:
84           python-version: '3.9'
85       - name: Install dependencies
86         shell: powershell
87         run: |
88           python -m pip install --upgrade meson
89           Invoke-WebRequest -Uri https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-win.zip -OutFile ninja.zip
90           Invoke-WebRequest -Uri https://github.com/lexxmark/winflexbison/releases/download/v2.5.23/win_flex_bison-2.5.23.zip -OutFile win_flex_bison.zip
91           Expand-Archive -Path win_flex_bison.zip -DestinationPath bin
92           Expand-Archive -Path ninja.zip -DestinationPath bin
93           Write-Output ((Get-Location).ToString() + "./bin") | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
94       - name: Setup
95         shell: cmd
96         run: |
97           call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
98           meson setup -Denable-wayland=false -Denable-x11=false -Denable-docs=false -Denable-xkbregistry=false build
99         env:
100           CC: cl
101       - name: Build
102         shell: cmd
103         run: |
104           call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
105           meson compile -C build
106       - name: Test
107         run:
108           meson test -C build --print-errorlogs