summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-04-18 20:52:17 +0300
committerRan Benita <ran@unusedvar.com>2020-04-18 21:55:28 +0300
commit8dfece0cbbddefd2a65003243ea95519cf6b5cfc (patch)
treed820b787c7be28038326ea88f3b988992943ad2e /.github
parent0f1cae0cc482575c71d29d6241115886ebf25dec (diff)
downloadxorg-lib-libxkbcommon-8dfece0cbbddefd2a65003243ea95519cf6b5cfc.tar.gz
ci: add github actions build
We currently use Azure Pipelines. But it became out of date. Also it requires a different account and setup than github account itself. The configuration here is probably not very good and is less featureful than the Azure one but it's what I managed. Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/main.yml89
1 files changed, 89 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..1645afe
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,89 @@
+name: CI
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ linux:
+ runs-on: ubuntu-18.04
+ strategy:
+ matrix:
+ compiler: [clang, gcc]
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v1
+ with:
+ python-version: '3.7'
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip meson
+ sudo apt update -y
+ sudo env DEBIAN_FRONTEND=noninteractive apt install -y \
+ doxygen libxcb-xkb-dev valgrind ninja-build \
+ libwayland-dev wayland-protocols bison graphviz
+ - name: Setup
+ run: |
+ meson setup build
+ env:
+ CC: ${{ matrix.compiler }}
+ - name: Build
+ run: |
+ meson compile -C build
+ - name: Test
+ run:
+ meson test -C build --print-errorlogs --wrapper="valgrind --leak-check=full --track-origins=yes --error-exitcode=99"
+
+ macos:
+ runs-on: macos-10.15
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v1
+ with:
+ python-version: '3.7'
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip meson
+ brew install doxygen bison ninja
+ brew link bison --force
+ env:
+ HOMEBREW_NO_AUTO_UPDATE: 1
+ HOMEBREW_NO_INSTALL_CLEANUP: 1
+ - name: Setup
+ run: |
+ PATH="/usr/local/opt/bison/bin:${PATH}" meson setup -Denable-wayland=false -Denable-x11=false build
+ - name: Build
+ run: |
+ PATH="/usr/local/opt/bison/bin:${PATH}" meson compile -C build
+ - name: Test
+ run:
+ meson test -C build --print-errorlogs
+
+ windows:
+ runs-on: windows-2019
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v1
+ with:
+ python-version: '3.7'
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip meson
+ choco install ninja winflexbison3 -y --no-progress --stop-on-first-failure
+ - name: Setup
+ shell: cmd
+ run: |
+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+ meson setup -Denable-wayland=false -Denable-x11=false -Denable-docs=false build
+ env:
+ CC: cl
+ - name: Build
+ shell: cmd
+ run: |
+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+ meson compile -C build
+ - name: Test
+ run:
+ meson test -C build --print-errorlogs