mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-06 12:38:14 +02:00
ci: Factorize common dependencies installation phase
This commit is contained in:
parent
59ea84d061
commit
a58f8ed62b
1 changed files with 15 additions and 11 deletions
|
|
@ -1,8 +1,6 @@
|
|||
image: fedora:rawhide
|
||||
|
||||
variables:
|
||||
PRECOMMIT: pre-commit
|
||||
git
|
||||
DEPENDENCIES: gcc
|
||||
gcovr
|
||||
gtk-doc
|
||||
|
|
@ -27,19 +25,26 @@ workflow:
|
|||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
- if: $CI_PIPELINE_SOURCE == 'push'
|
||||
|
||||
pre_commit:
|
||||
.install-deps:
|
||||
before_script:
|
||||
- dnf update -y
|
||||
- if [ -x /bin/dnf ]; then dnf install -y $PRECOMMIT; else dnf5 install -y $PRECOMMIT; fi
|
||||
- if [ -x /bin/dnf ]; then dnf install -y $DEPENDENCIES $JOB_DEPS; else dnf5 install -y $DEPENDENCIES $JOB_DEPS; fi
|
||||
|
||||
pre_commit:
|
||||
variables:
|
||||
DEPENDENCIES: {}
|
||||
JOB_DEPS: pre-commit
|
||||
git
|
||||
extends:
|
||||
- .install-deps
|
||||
script:
|
||||
- pre-commit run --all-files
|
||||
|
||||
build_stable:
|
||||
before_script:
|
||||
- dnf update -y
|
||||
- if [ -x /bin/dnf ]; then dnf install -y $DEPENDENCIES; else dnf5 install -y $DEPENDENCIES; fi
|
||||
- mkdir tmpdir/
|
||||
extends:
|
||||
- .install-deps
|
||||
script:
|
||||
- mkdir tmpdir/
|
||||
- meson setup
|
||||
--werror
|
||||
--fatal-meson-warnings
|
||||
|
|
@ -71,9 +76,8 @@ build_stable:
|
|||
scan_build:
|
||||
variables:
|
||||
JOB_DEPS: clang-analyzer
|
||||
before_script:
|
||||
- dnf update -y
|
||||
- if [ -x /bin/dnf ]; then dnf install -y $DEPENDENCIES $JOB_DEPS; else dnf5 install -y $DEPENDENCIES $JOB_DEPS; fi
|
||||
extends:
|
||||
- .install-deps
|
||||
script:
|
||||
- meson setup _build
|
||||
- env SCANBUILD=$(which scan-build) ninja -C _build scan-build
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue