Skip to content

Commit 71efc89

Browse files
committed
CI: Add workflow to test Meson and CMake builds
This adds a workflow using GitHub Actions which builds libwpe twice: one time with CMake, and another with Meson. Both results are checked to ensure that both build systems produce the same set of headers (and with the same contents), and libraries with the same public symbols.
1 parent 68a4cc3 commit 71efc89

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
3+
name: CI
4+
5+
on: [push]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-16.04
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
- name: Install Debian Packages
14+
run: |
15+
sudo apt update
16+
sudo apt install -y cmake flex libjson-glib-dev libxkbcommon-dev \
17+
libegl1-mesa-dev libxml2-dev libxslt1-dev libyaml-dev llvm-dev \
18+
libclang-dev libglib2.0-dev ninja-build
19+
- name: Setup Python
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: 3.6
23+
- name: Python Package Cache
24+
uses: actions/cache@v1
25+
with:
26+
path: ~/.cache/pip
27+
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/ci.yml') }}
28+
restore-keys: ${{ runner.os }}-pip-
29+
- name: Install Python Packages
30+
run: |
31+
python -m pip install --upgrade pip setuptools wheel
32+
HOTDOC_BUILD_C_EXTENSION=enabled pip install hotdoc meson
33+
- name: Meson - Configure
34+
run: |
35+
mkdir -p _work/meson
36+
meson _work/meson/build --prefix /usr -Dbuild-docs=true
37+
- name: Meson - Build
38+
run: |
39+
ninja -C _work/meson/build
40+
- name: Meson - Install
41+
run: |
42+
DESTDIR="$(pwd)/_work/meson/prefix" ninja -C _work/meson/build install
43+
nm -D _work/meson/build/libwpe-1.0.so | sort -u > _work/meson/symbols
44+
(cd _work/meson/prefix && find lib -type f | sort) > _work/meson/files
45+
- name: Meson - Archive Artifacts
46+
uses: actions/upload-artifact@v1
47+
with:
48+
name: build-meson
49+
path: _work/meson/prefix
50+
- name: CMake - Configure
51+
run: |
52+
mkdir -p _work/cmake/build && cd $_
53+
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DOCS=ON ../../..
54+
- name: CMake - Build
55+
run: |
56+
make -C _work/cmake/build -j$(nproc)
57+
- name: CMake - Install
58+
run: |
59+
DESTDIR="$(pwd)/_work/cmake/prefix" make -C _work/cmake/build install
60+
nm -D _work/cmake/build/libwpe-1.0.so | sort -u > _work/cmake/symbols
61+
(cd _work/cmake/prefix && find lib -type f | sort) > _work/cmake/files
62+
- name: CMake - Archive Artifacts
63+
uses: actions/upload-artifact@v1
64+
with:
65+
name: build-cmake
66+
path: _work/cmake/prefix
67+
- name: Check Installations
68+
run: |
69+
diff -u _work/{cmake,meson}/files
70+
diff -u _work/{cmake,meson}/symbols
71+
diff -Naur _work/{cmake,meson}/prefix/usr/include/

0 commit comments

Comments
 (0)