forked from ardera/flutter-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
174 lines (152 loc) · 5.09 KB
/
cmake.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: CMake
on:
push:
branches: [ master, feature/gh-actions, feature/compositor-ng ]
pull_request:
branches: [ master, feature/gh-actions, feature/compositor-ng ]
workflow_dispatch:
jobs:
pi4:
name: Build and Test on Raspberry Pi 4
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
# - ARM
- ARM64
graphics-backends:
- vulkan-only
- opengl-only
- vulkan-and-opengl
compiler:
- gcc
- clang
build-type:
- Debug
- Release
include:
- graphics-backends: 'vulkan-only'
enable-vulkan: 'on'
enable-opengl: 'off'
- graphics-backends: 'opengl-only'
enable-vulkan: 'off'
enable-opengl: 'on'
- graphics-backends: 'vulkan-and-opengl'
enable-vulkan: 'on'
enable-opengl: 'on'
- enable-opengl: 'on'
opengl-deps: 'libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev'
- enable-vulkan: 'on'
vulkan-deps: 'libvulkan-dev'
- compiler: 'clang'
clang-deps: 'clang'
steps:
# On the self-hosted runners, we assume those are already installed.
# - name: Install dependencies
# run: |
# id
# sudo apt-get install -y \
# git cmake libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev \
# ttf-mscorefonts-installer fontconfig libsystemd-dev libinput-dev libudev-dev \
# libxkbcommon-dev ninja-build libgstreamer-plugins-base1.0-dev \
# ${{ matrix.vulkan-deps }} \
# ${{ matrix.clang-deps }}
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Configure CMake
run: |
cmake \
-B ./build \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_C_COMPILER=${{ matrix.compiler }} \
-DBUILD_GSTREAMER_AUDIO_PLAYER_PLUGIN=On \
-DBUILD_GSTREAMER_VIDEO_PLAYER_PLUGIN=On \
-DENABLE_VULKAN=${{ matrix.enable-vulkan }} \
-DENABLE_OPENGL=${{ matrix.enable-opengl }} \
-DENABLE_TESTS=On \
-GNinja
echo test
- name: Build
run: cmake --build ./build --config ${{ matrix.build-type }}
- name: Test
working-directory: build
run: ctest -C ${{ matrix.build-type }} --output-on-failure
container:
name: Build & Test in Container
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
env:
DEBIAN_FRONTEND: noninteractive
strategy:
matrix:
container:
- 'debian:bullseye'
- 'debian:buster'
graphics-backends:
- vulkan-only
- opengl-only
- vulkan-and-opengl
compiler:
- gcc
- clang
build-type:
- Debug
- Release
include:
- graphics-backends: 'vulkan-only'
enable-vulkan: 'on'
enable-opengl: 'off'
- graphics-backends: 'opengl-only'
enable-vulkan: 'off'
enable-opengl: 'on'
- graphics-backends: 'vulkan-and-opengl'
enable-vulkan: 'on'
enable-opengl: 'on'
- enable-opengl: 'on'
opengl-deps: 'libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev'
- enable-vulkan: 'on'
vulkan-deps: 'libvulkan-dev'
- compiler: 'clang'
clang-deps: 'clang'
steps:
# git needs to be installed before checking out, otherwise the checkout will fallback to the REST API,
# and the submodule download won't work.
- name: Install dependencies
run: |
apt-get update && apt-get install -y \
git cmake libdrm-dev libgbm-dev \
fonts-liberation fontconfig libsystemd-dev libinput-dev libudev-dev \
libxkbcommon-dev ninja-build libgstreamer-plugins-base1.0-dev \
${{ matrix.vulkan-deps }} \
${{ matrix.opengl-deps }} \
${{ matrix.clang-deps }}
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Configure CMake
run: |
cmake \
-B ./build \
-S . \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_C_COMPILER=${{ matrix.compiler }} \
-DBUILD_GSTREAMER_AUDIO_PLAYER_PLUGIN=On \
-DBUILD_GSTREAMER_VIDEO_PLAYER_PLUGIN=On \
-DENABLE_VULKAN=${{ matrix.enable-vulkan }} \
-DENABLE_OPENGL=${{ matrix.enable-opengl }} \
-DENABLE_TESTS=On \
-GNinja
- name: Build
run: cmake --build ./build --config ${{ matrix.build-type }}
- name: Test
working-directory: build
run: ctest -C ${{ matrix.build-type }} --output-on-failure
required:
name: required checks
needs: [pi4, container]
runs-on: ubuntu-latest
steps:
- run: |
echo 'all required checks passed.'