97
97
make-prepend : " " ,
98
98
make-target : " "
99
99
}
100
+ - {
101
+ name : " DEB Package" ,
102
+ os : " ubuntu-22.04" ,
103
+ build-type : " Release" ,
104
+ dep-build-type : " Release" ,
105
+ cc : " gcc" ,
106
+ options : " " ,
107
+ packages : " cmake debhelper valgrind python3-pip" ,
108
+ snaps : " " ,
109
+ make-prepend : " " ,
110
+ make-target : " "
111
+ }
100
112
101
113
steps :
102
114
- uses : actions/checkout@main
115
+ with :
116
+ fetch-depth : 100
103
117
104
118
- name : Deps-packages
105
119
shell : bash
@@ -109,6 +123,10 @@ jobs:
109
123
if ${{ matrix.config.snaps != '' }}
110
124
then sudo snap install ${{ matrix.config.snaps }}
111
125
fi
126
+ if ${{ matrix.config.name == 'DEB Package' }}; then
127
+ pip install apkg
128
+ apkg system-setup
129
+ fi
112
130
113
131
- name : Deps-uncrustify
114
132
shell : bash
@@ -128,33 +146,48 @@ jobs:
128
146
run : |
129
147
git clone -b ${{ needs.git-branch.outputs.branch-name }} https://github.com/CESNET/libyang.git
130
148
cd libyang
131
- mkdir build
132
- cd build
133
- CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.dep-build-type }} -DENABLE_TESTS=OFF ..
134
- make -j2
135
- sudo make install
149
+ if ${{ matrix.config.name == 'DEB Package' }}; then
150
+ apkg build
151
+ apkg install
152
+ else
153
+ mkdir build
154
+ cd build
155
+ CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.dep-build-type }} -DENABLE_TESTS=OFF ..
156
+ make -j2
157
+ sudo make install
158
+ fi
136
159
137
160
- name : Deps-sysrepo
138
161
shell : bash
139
162
run : |
140
163
git clone -b ${{ needs.git-branch.outputs.branch-name }} https://github.com/sysrepo/sysrepo.git
141
164
cd sysrepo
142
- mkdir build
143
- cd build
144
- CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} -DSYSREPO_SUPERUSER_UID=`id -u` -DENABLE_TESTS=OFF ..
145
- make -j2
146
- sudo make install
165
+ if ${{ matrix.config.name == 'DEB Package' }}; then
166
+ apkg build
167
+ apkg install
168
+ else
169
+ mkdir build
170
+ cd build
171
+ CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} -DSYSREPO_SUPERUSER_UID=`id -u` -DENABLE_TESTS=OFF ..
172
+ make -j2
173
+ sudo make install
174
+ fi
147
175
148
176
- name : Deps-libnetconf2
149
177
shell : bash
150
178
run : |
151
179
git clone -b ${{ needs.git-branch.outputs.branch-name }} https://github.com/CESNET/libnetconf2.git
152
180
cd libnetconf2
153
- mkdir build
154
- cd build
155
- CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} -DENABLE_TESTS=OFF ..
156
- make -j2
157
- sudo make install
181
+ if ${{ matrix.config.name == 'DEB Package' }}; then
182
+ apkg build
183
+ apkg install
184
+ else
185
+ mkdir build
186
+ cd build
187
+ CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} -DENABLE_TESTS=OFF ..
188
+ make -j2
189
+ sudo make install
190
+ fi
158
191
159
192
- name : Deps-update-ld-cache
160
193
shell : bash
@@ -167,6 +200,7 @@ jobs:
167
200
mkdir build
168
201
cd build
169
202
CC=${{ matrix.config.cc }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} ${{ matrix.config.options }} ..
203
+ if : ${{ matrix.config.name != 'DEB Package' }}
170
204
171
205
- name : Build
172
206
shell : bash
@@ -175,8 +209,10 @@ jobs:
175
209
export LC_ALL=C.UTF-8
176
210
export PATH=/snap/bin:${{ github.workspace }}/coverity-tools/bin:$PATH
177
211
${{ matrix.config.make-prepend }} make ${{ matrix.config.make-target }}
212
+ if : ${{ matrix.config.name != 'DEB Package' }}
178
213
179
214
- name : Test
180
215
shell : bash
181
216
working-directory : ${{ github.workspace }}/build
182
217
run : ctest --output-on-failure -j4
218
+ if : ${{ matrix.config.name != 'DEB Package' }}
0 commit comments