-
Notifications
You must be signed in to change notification settings - Fork 62
117 lines (115 loc) · 3.55 KB
/
ci-native.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
name: "Build - Native"
on:
push:
branches:
- master
- 'cog-*'
pull_request:
branches:
- master
- 'cog-*'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/WPEBackend-fdo
~/libwpe
key: native-${{ runner.os }}-${{ hashFiles('.github/workflows/ci-native.yml') }}
restore-keys: native-${{ runner.os }}-
- name: Install Debian Packages
run: |
sudo apt update
sudo apt install -y ninja-build gobject-introspection \
libwpewebkit-1.0-dev libgles2-mesa-dev \
libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-soup-2.4 \
libwayland-bin libwayland-dev wayland-protocols libepoxy-dev \
libdrm-dev libinput-dev libudev-dev libgbm-dev \
libxkbcommon-x11-dev libx11-xcb-dev libxcb-cursor-dev \
libportal-dev gi-docgen meson
- name: Fetch libwpe
run: |
if [[ -d ~/libwpe/.git ]] ; then
echo 'Updating libwpe clone...'
cd ~/libwpe/
git reset --hard
git clean -qxdff
git checkout -f master
git pull -q
else
echo 'Cloning libwpe afresh...'
rm -rf ~/libwpe/
git clone -q https://github.com/WebPlatformForEmbedded/libwpe ~/libwpe/
fi
- name: Fetch WPEBackend-fdo
run: |
if [[ -d ~/WPEBackend-fdo/.git ]] ; then
echo 'Updating WPEBackend-fdo clone...'
cd ~/WPEBackend-fdo/
git reset --hard
git clean -qxdff
git checkout -f master
git pull -q
else
echo 'Cloning WPEBackend-fdo afresh...'
rm -rf ~/WPEBackend-fdo/
git clone -q https://github.com/Igalia/WPEBackend-fdo ~/WPEBackend-fdo
fi
- name: Build and Install libwpe
env:
TERM: dumb
run: |
meson --prefix ~/prefix --libdir ~/prefix/lib \
~/libwpe-build ~/libwpe
ninja -C ~/libwpe-build install
- name: Build and Install WPEBackend-fdo
env:
TERM: dumb
run: |
export PKG_CONFIG_PATH=${HOME}/prefix/lib/pkgconfig/
meson --prefix ~/prefix --libdir ~/prefix/lib \
~/WPEBackend-fdo-build ~/WPEBackend-fdo
ninja -C ~/WPEBackend-fdo-build install
- name: Configure
run: |
export PKG_CONFIG_PATH=${HOME}/prefix/lib/pkgconfig/
meson --prefix ~/prefix --libdir ~/prefix/lib \
~/build "${GITHUB_WORKSPACE}" \
-Dplatforms=drm,headless,wayland,x11 \
-Dprograms=true \
-Ddocumentation=true \
-Dmanpages=true \
-Dwpe_api=1.0
- name: Build
env:
TERM: dumb
run:
ninja -C ~/build/
- name: Archive Documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: ~/build/docs/html
if-no-files-found: error
publish:
if: ${{ github.ref == 'refs/heads/master' }}
needs: build
runs-on: ubuntu-20.04
steps:
- name: Fetch Documentation
uses: actions/download-artifact@v3
with:
name: docs
path: html
- name: Deploy Documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: html