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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
|
name: Continuous Integration
on: [push, pull_request]
jobs:
get_fedora_releases:
name: Get Fedora Releases
runs-on: ubuntu-latest
steps:
- name: Query Fedora
id: releases
uses: sgallagher/get-fedora-releases-action@v1
outputs:
stable: ${{ steps.releases.outputs.stable }}
development: ${{ steps.releases.outputs.development }}
unit_tests_fedora_stable:
name: Unit Tests (Stable Fedora)
needs: get_fedora_releases
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix:
release: ${{ fromJson(needs.get_fedora_releases.outputs.stable) }}
container:
image: quay.io/fedora/fedora:${{ matrix.release }}-x86_64
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: $GITHUB_WORKSPACE/.ci/fedora/get_fedora_deps.sh
- name: Set up the build directory
run: meson setup --buildtype=debugoptimized ci $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci
- name: Run CI tests
run: meson test -C ci --suite ci --print-errorlogs -t 5
- name: Set up the valgrind build directory
run:
meson setup --buildtype=debugoptimized -Dverbose_tests=false
-Drpmio=disabled
ci_valgrind $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci_valgrind
- name: Run valgrind tests
run:
meson test -C ci_valgrind --suite ci_valgrind --print-errorlogs -t 10
--wrap=$GITHUB_WORKSPACE/contrib/valgrind/valgrind_wrapper.sh
- name: Run clang static analysis tests
run: |
meson setup --buildtype=debug -Dskip_introspection=true -Dwith_py3=false ci_scanbuild
ninja -C ci_scanbuild scan-build; if [ $? -ne 0 ]; then elinks -dump ci_scanbuild/meson-logs/scanbuild/*/index.html; fi
rpm_tests:
name: Installed RPM Tests (Stable Fedora)
needs: get_fedora_releases
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix:
arch:
- x86_64
release: ${{ fromJson(needs.get_fedora_releases.outputs.stable) }}
container:
image: quay.io/fedora/fedora:${{ matrix.release }}-x86_64
steps:
- name: Install git
run: dnf -y install git-core
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: $GITHUB_WORKSPACE/.ci/fedora/get_fedora_deps.sh
- name: Set up the RPM output directory
run: mkdir -p $GITHUB_WORKSPACE/rpmbuild/RPMS
- name: Build the RPM repository
working-directory: ${{github.workspace}}/rpmbuild/RPMS
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
packit --debug build locally ../..
createrepo_c x86_64
- name: Install the packages
working-directory: ${{github.workspace}}/rpmbuild/RPMS
run:
$GITHUB_WORKSPACE/.ci/retry-command.sh
dnf -y install --nogpgcheck
--allowerasing
--repofrompath libmodulemd-ci,x86_64
x86_64/python3-libmodulemd*.rpm
x86_64/libmodulemd-devel*.rpm
- name: Set up the build directory
run:
meson --buildtype=release -Dtest_installed_lib=true
installed_lib_tests $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C installed_lib_tests
- name: Run tests on the installed RPMs
run:
meson test --suite ci
-C installed_lib_tests
--print-errorlogs
-t 5
unit_tests_fedora_devel:
name: Unit Tests (Devel Fedora)
needs: get_fedora_releases
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
release: ${{ fromJson(needs.get_fedora_releases.outputs.development) }}
container:
image: quay.io/fedora/fedora:${{ matrix.release }}-x86_64
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: $GITHUB_WORKSPACE/.ci/fedora/get_fedora_deps.sh
- name: Set up the build directory
run: meson setup --buildtype=debugoptimized ci $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci
- name: Run CI tests
run: meson test -C ci --suite ci --print-errorlogs -t 5
- name: Set up the valgrind build directory
run:
meson setup --buildtype=debugoptimized -Dverbose_tests=false
ci_valgrind $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci_valgrind
- name: Run valgrind tests
run:
meson test -C ci_valgrind --suite ci_valgrind --print-errorlogs -t 10
--wrap=$GITHUB_WORKSPACE/contrib/valgrind/valgrind_wrapper.sh
- name: Run clang static analysis tests
run: |
meson setup --buildtype=debug -Dskip_introspection=true -Dwith_py3=false ci_scanbuild
ninja -C ci_scanbuild scan-build; if [ $? -ne 0 ]; then elinks -dump ci_scanbuild/meson-logs/scanbuild/*/index.html; fi
rpm_tests_devel:
name: Installed RPM Tests (Devel Fedora)
needs: get_fedora_releases
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
arch:
- x86_64
release: ${{ fromJson(needs.get_fedora_releases.outputs.development) }}
container:
image: quay.io/fedora/fedora:${{ matrix.release }}-x86_64
steps:
- name: Install git
run: dnf -y install git-core
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: $GITHUB_WORKSPACE/.ci/fedora/get_fedora_deps.sh
- name: Set up the RPM output directory
run: mkdir -p $GITHUB_WORKSPACE/rpmbuild/RPMS
- name: Build the RPM repository
working-directory: ${{github.workspace}}/rpmbuild/RPMS
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
packit --debug build locally ../..
createrepo_c x86_64
- name: Install the packages
working-directory: ${{github.workspace}}/rpmbuild/RPMS
run:
$GITHUB_WORKSPACE/.ci/retry-command.sh
dnf -y install --nogpgcheck
--allowerasing
--repofrompath libmodulemd-ci,x86_64
x86_64/python3-libmodulemd*.rpm
x86_64/libmodulemd-devel*.rpm
- name: Set up the build directory
run:
meson --buildtype=release -Dtest_installed_lib=true
installed_lib_tests $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C installed_lib_tests
- name: Run tests on the installed RPMs
run:
meson test --suite ci
-C installed_lib_tests
--print-errorlogs
-t 5
archlinux:
name: Arch Linux
runs-on: ubuntu-latest
continue-on-error: true
container:
image: docker.io/library/archlinux:base
steps:
- name: Install the standard pacman config
run: cp /etc/pacman.conf.pacnew /etc/pacman.conf
- name: Install dependencies
run: pacman -Syu --needed --noconfirm base-devel file git glib2 glib2-docs gobject-introspection gtk-doc jq libyaml meson python-gobject python-six valgrind
- name: Checkout code
uses: actions/checkout@v3
- name: Set up the build directory
run:
meson setup --buildtype=debugoptimized -Drpmio=disabled
ci $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci
- name: Run CI tests
run: meson test -C ci --suite ci --print-errorlogs -t 5
- name: Set up the valgrind build directory
run:
meson setup --buildtype=debugoptimized -Dverbose_tests=false
-Drpmio=disabled
ci_valgrind $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci_valgrind
- name: Run valgrind tests
# Run profile scripts to set debuginfo environment variable,
# <https://bugs.archlinux.org/task/74755>
shell: bash --login -eo pipefail {0}
run:
meson test -C ci_valgrind --suite ci_valgrind --print-errorlogs -t 10
--wrap=$GITHUB_WORKSPACE/contrib/valgrind/valgrind_wrapper.sh
mageia_8:
name: Mageia 8
runs-on: ubuntu-latest
continue-on-error: true
container:
image: docker.io/library/mageia:8
steps:
- name: Install dependencies
run:
dnf -y --setopt=install_weak_deps=False --setopt=tsflags='' install
clang
clang-analyzer
createrepo_c
curl
elinks
gcc
gcc-c++
git-core
glib2-devel
/usr/share/gtk-doc/html/glib/index.html
gobject-introspection-devel
gtk-doc
jq
libyaml-devel
meson
ninja-build
openssl
pkgconf
popt-devel
python3-six
python3-autopep8
python3-devel
python3-gitpython
python3-gobject3
python3-pycodestyle
python3-rpm-macros
rpm-mageia-setup-build
rpm-build
rpm-devel
rpmdevtools
ruby
"rubygem(json)"
rubygems
sudo
valgrind
wget
- name: Checkout code
uses: actions/checkout@v3
- name: Set up the build directory
run: meson setup --buildtype=debugoptimized ci $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci
- name: Run CI tests
run: meson test -C ci --suite ci --print-errorlogs -t 5
- name: Set up the valgrind build directory
run:
meson setup --buildtype=debugoptimized -Dverbose_tests=false
ci_valgrind $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci_valgrind
- name: Run valgrind tests
run:
meson test -C ci_valgrind --suite ci_valgrind --print-errorlogs -t 10
--wrap=$GITHUB_WORKSPACE/contrib/valgrind/valgrind_wrapper.sh
opensuse_tw:
name: openSUSE Tumbleweed
runs-on: ubuntu-latest
continue-on-error: true
container:
image: registry.opensuse.org/opensuse/tumbleweed
steps:
- name: Enable docs in container
run:
sed -i /etc/zypp/zypp.conf
-e "s/rpm.install.excludedocs = yes/rpm.install.excludedocs = no/"
- name: Install dependencies
run:
zypper install --no-confirm --no-recommends --capability
clang
clang-tools
createrepo_c
elinks
gcc
gcc-c++
git-core
glib2-devel
glib2-doc
gobject-introspection-devel
gtk-doc
jq
libyaml-devel
meson
ninja
pkgconf
python3-autopep8
python3-devel
python3-GitPython
python3-gobject
python3-pycodestyle
python-rpm-macros
rpm-build
rpm-devel
rpmdevtools
sudo
valgrind
- name: Checkout code
uses: actions/checkout@v3
- name: Set up the build directory
run: meson setup --buildtype=debugoptimized ci $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci
- name: Run CI tests
run: meson test -C ci --suite ci --print-errorlogs -t 5
- name: Set up the valgrind build directory
run:
meson setup --buildtype=debugoptimized -Dverbose_tests=false
ci_valgrind $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci_valgrind
- name: Run valgrind tests
run:
meson test -C ci_valgrind --suite ci_valgrind --print-errorlogs -t 10
--wrap=$GITHUB_WORKSPACE/contrib/valgrind/valgrind_wrapper.sh
mandriva:
name: OpenMandriva Cooker
runs-on: ubuntu-latest
continue-on-error: true
container:
image: docker.io/openmandriva/cooker
outputs:
meson_version: ${{ steps.scanbuild.outputs.available }}
steps:
- name: Install Dependencies
run:
dnf -y --setopt=install_weak_deps=False --setopt=tsflags='' install
clang
clang-analyzer
cmake
jq
meson
ninja
rpmdevtools
sudo
valgrind
wget
task-devel
'pkgconfig(zlib)'
'pkgconfig(gobject-introspection-1.0)'
'python3dist(autopep8)'
'python3dist(pygobject)'
'pkgconfig(yaml-0.1)'
'pkgconfig(rpm)'
magic-devel
git-core
elinks
- name: Checkout code
uses: actions/checkout@v3
- name: Set up the build directory
env:
CC: clang
CXX: clang++
run:
meson setup --buildtype=debugoptimized -Dwith_docs=false
ci $GITHUB_WORKSPACE
- name: Compile the code
run: ninja -C ci
- name: Run CI tests
run: meson test -C ci --suite ci --print-errorlogs -t 5
- name: Run clang static analysis tests
run: |
meson setup --buildtype=debug -Dwith_docs=false -Dskip_introspection=true -Dwith_py3=false ci_scanbuild
ninja -C ci_scanbuild scan-build; if [ $? -ne 0 ]; then elinks -dump ci_scanbuild/meson-logs/scanbuild/*/index.html; fi
|