-
-
Notifications
You must be signed in to change notification settings - Fork 118
157 lines (134 loc) · 3.91 KB
/
build.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
name: CI Build
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
# cancel already running builds of the same branch or pull request
concurrency:
group: ci-${{ github.head_ref }} || concat(${{ github.ref }}
cancel-in-progress: true
env:
CONFIGURE_FLAGS: --enable-compile-warnings=maximum
CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration
JOBS: 2
DEBUG: 1
LIBRARY_DEPS: |
libatk1.0-dev
libcairo2-dev
libdconf-dev
libgirepository1.0-dev
libglib2.0-dev
libgtk-3-dev
libgtk-layer-shell-dev
libice-dev
libmate-desktop-dev
libmate-menu-dev
libmateweather-dev
libpango1.0-dev
libsm-dev
libsoup2.4-dev
libwnck-3-dev
libx11-dev
libxrandr-dev
libgirepository1.0-dev
BUILD_DEPS: |
ccache
autoconf-archive
autopoint
gir1.2-freedesktop
git
gobject-introspection
gtk-doc-tools
lsb-release
make
mate-common
meson
yelp-tools
iso-codes
gobject-introspection
# TODO
SCAN_BUILD_DEPS: |
clang
clang-tools
jobs:
# Build on Debian and compatible
debian-based-build:
name: Build on ${{matrix.container}} with in-process=${{matrix.in-process}}
runs-on: ubuntu-latest
container: ${{matrix.container}}
strategy:
fail-fast: false
matrix:
in-process: [all, none]
container: ['debian:testing', 'ubuntu:rolling']
env:
CC: ccache gcc
CXX: ccache g++
BASE_INSTALL_PATH: ${{github.workspace}}/_install
steps:
- name: Setup environment
run: |
echo "PATH=${BASE_INSTALL_PATH}/bin:${PATH}" >> "$GITHUB_ENV"
echo "PKG_CONFIG_PATH=${BASE_INSTALL_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}" >> "$GITHUB_ENV"
- name: Show environment
run: env | sort
if: ${{ env.DEBUG == '1' }}
- name: Install dependencies
run: |
apt-get update -qq
apt-get install --assume-yes --no-install-recommends \
${BUILD_DEPS} ${LIBRARY_DEPS}
- uses: actions/checkout@v3
with:
path: mate-panel
submodules: true
# TODO: cache mate-desktop build/install?
- name: Checkout mate-desktop
uses: actions/checkout@v3
with:
repository: mate-desktop/mate-desktop
ref: v1.27.1
path: mate-desktop
submodules: true
- name: ccache
uses: hendrikmuhs/[email protected]
- name: Configure mate-desktop
run: |
cd mate-desktop
NOCONFIGURE=1 ./autogen.sh
{ ./configure --prefix="$BASE_INSTALL_PATH" || { cat config.log; exit 1; } ; }
- name: Build mate-desktop
run: make -C mate-desktop -j ${{ env.JOBS }}
- name: Install mate-desktop
run: make -C mate-desktop -j ${{ env.JOBS }} install
- name: Configure
run: |
cd mate-panel
NOCONFIGURE=1 ./autogen.sh
{ ./configure ${CONFIGURE_FLAGS} --with-in-process-applets=${{matrix.in-process}} || { cat config.log; exit 1; } ; }
- name: Build
run: make -C mate-panel -j ${{ env.JOBS }}
- name: Run Tests
run: make -C mate-panel -j ${{ env.JOBS }} check
- name: Run distcheck
run: make -C mate-panel -j ${{ env.JOBS }} distcheck
# Do we need the real build for cppcheck run? I don't think so
cppcheck:
name: Run cppcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
# Install code dependencies so that cppcheck has more info
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install --assume-yes --no-install-recommends \
cppcheck ${LIBRARY_DEPS}
- name: cppcheck
run: cppcheck --enable=warning,style,performance,portability,information,missingInclude -i'gtk-layer-shell-build' .