From d954b6a8fb45d2f0c89a0178cddb01d9a2897d94 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 4 Jul 2022 14:05:11 -0400 Subject: [PATCH] jjb: liburcu: cleanup yaml job definition Replace duplications with yaml anchors, replace deprecated Warnings plugin with Warnings-NG, cleanup unused portions of build scripts. Change-Id: Id874fb8e36b9e7de57f878b12841639624f54dda Signed-off-by: Michael Jeanson --- jobs/liburcu.yaml | 316 +++++++++++++++++++-------------------- scripts/liburcu/build.sh | 70 +-------- 2 files changed, 163 insertions(+), 223 deletions(-) diff --git a/jobs/liburcu.yaml b/jobs/liburcu.yaml index 61587e6..38f11c5 100644 --- a/jobs/liburcu.yaml +++ b/jobs/liburcu.yaml @@ -28,15 +28,14 @@ project-type: freestyle wrappers: - - ansicolor - - timeout: + - ansicolor: &liburcu_wrapper_ansicolor_defaults + colormap: xterm + - timeout: &liburcu_wrapper_timeout_defaults timeout: 90 fail: true type: absolute - timestamps - - workspace-cleanup: - clean-if: - - failure: false + - workspace-cleanup scm: - git: @@ -63,39 +62,37 @@ ## Anchors -- liburcu_build_axes_defaults: &liburcu_build_axes_defaults - name: 'liburcu_build_axes_defaults' +- liburcu_matrix_axes_defaults: &liburcu_matrix_axes_defaults + name: 'liburcu_matrix_axes_defaults' project-type: matrix node: 'master' # Applies only to matrix flyweight task + execution-strategy: + touchstone: + expr: '{touchstone}' + result: unstable axes: - axis: type: slave name: arch - values: '{obj:arch}' + values: '{obj:archs}' - axis: type: user-defined name: conf - values: '{obj:conf}' + values: '{obj:confs}' - axis: type: user-defined name: build - values: '{obj:build}' - -- liburcu_build_builders_defaults: &liburcu_build_builders_defaults - name: 'liburcu_build_builders_defaults' - builders: - - shell: - !include-raw-escape: - - scripts/common/print.sh - - scripts/liburcu/build.sh + values: '{obj:builds}' -- liburcu_build_builders_win: &liburcu_build_builders_win - name: 'liburcu_build_builders_win' +- liburcu_builders_defaults: &liburcu_builders_defaults + name: 'liburcu_builders_defaults' builders: + !j2-yaml: | + {% if buildtype == 'winbuild' %} - conditional-step: condition-kind: strings-match on-evaluation-failure: run - condition-string1: '${{arch}}' + condition-string1: {{ '${{arch}}' }} condition-string2: 'cygwin64' steps: - shell: @@ -104,28 +101,76 @@ - scripts/common/cygpath-prefix - scripts/common/print.sh - scripts/liburcu/build.sh + {% else %} + - shell: + !include-raw-escape: + - scripts/common/print.sh + - scripts/liburcu/build.sh + {% endif %} -- liburcu_build_publishers_defaults: &liburcu_build_publishers_defaults - name: 'liburcu_build_publishers_defaults' +- liburcu_publishers_defaults: &liburcu_publishers_defaults + name: 'liburcu_publishers_defaults' publishers: - - tap: + - tap: &liburcu_publisher_tap_defaults results: 'tap/**/*.log' fail-if-no-results: true failed-tests-mark-build-as-failure: true todo-is-failure: false - - warnings: - console-log-parsers: - - 'GNU Make + GNU C Compiler (gcc)' - total-thresholds: - unstable: - total-all: 0 - total-high: 0 - total-normal: 0 - total-low: 0 - - archive: + - raw: &liburcu_publisher_warnings-ng_defaults + xml: | + + + + + + + + + false + + + + + + + + false + + + + + + false + true + false + 0 + 0 + + LOW + + + true + true + false + true + false + + + 1 + TOTAL + WARNING + + + AGGREGATION_TOOLS + + + - archive: &liburcu_publisher_archive_defaults artifacts: 'build/**,tap/**' allow-empty: false - - email-ext: + - workspace-cleanup: &liburcu_publisher_workspace_cleanup_defaults + clean-if: + - failure: false + - email-ext: &liburcu_publisher_email_ext_defaults recipients: '{obj:email_to}' reply-to: ci-notification@lists.lttng.org always: false @@ -149,37 +194,13 @@ - recipients ## Templates -- job-template: - name: liburcu_{version}_{buildtype} - defaults: liburcu - - <<: *liburcu_build_axes_defaults - <<: *liburcu_build_builders_defaults - <<: *liburcu_build_publishers_defaults - - job-template: name: '{job_prefix}liburcu_{version}_{buildtype}' defaults: liburcu - <<: *liburcu_build_axes_defaults - <<: *liburcu_build_builders_defaults - <<: *liburcu_build_publishers_defaults - -- job-template: - name: liburcu_{version}_winbuild - defaults: liburcu - - <<: *liburcu_build_axes_defaults - <<: *liburcu_build_builders_win - <<: *liburcu_build_publishers_defaults - -- job-template: - name: '{job_prefix}liburcu_{version}_winbuild' - defaults: liburcu - - <<: *liburcu_build_axes_defaults - <<: *liburcu_build_builders_win - <<: *liburcu_build_publishers_defaults + <<: *liburcu_matrix_axes_defaults + <<: *liburcu_builders_defaults + <<: *liburcu_publishers_defaults - job-template: name: liburcu_{version}_cppcheck @@ -200,28 +221,8 @@ allow-empty: false - cppcheck: pattern: 'cppcheck-result.xml' - - email-ext: - recipients: '{obj:email_to}' - reply-to: ci-notification@lists.lttng.org - always: false - unstable: false - first-failure: true - first-unstable: false - not-built: false - aborted: false - regression: false - failure: false - second-failure: false - improvement: false - still-failing: false - success: false - fixed: false - fixed-unhealthy: true - still-unstable: true - pre-build: false - matrix-trigger: only-parent - send-to: - - recipients + - workspace-cleanup: *liburcu_publisher_workspace_cleanup_defaults + - email-ext: *liburcu_publisher_email_ext_defaults - job-template: name: dev_gerrit_liburcu_{buildtype} @@ -250,24 +251,13 @@ - branch-compare-type: 'ANT' branch-pattern: '**' - <<: *liburcu_build_axes_defaults - <<: *liburcu_build_builders_defaults + <<: *liburcu_matrix_axes_defaults + <<: *liburcu_builders_defaults publishers: - - tap: - results: 'tap/**/*.log' - fail-if-no-results: true - failed-tests-mark-build-as-failure: true - todo-is-failure: false - - warnings: - console-log-parsers: - - 'GNU Make + GNU C Compiler (gcc)' - total-thresholds: - unstable: - total-all: 0 - total-high: 0 - total-normal: 0 - total-low: 0 + - tap: *liburcu_publisher_tap_defaults + - raw: *liburcu_publisher_warnings-ng_defaults + - workspace-cleanup: *liburcu_publisher_workspace_cleanup_defaults - job-template: name: liburcu_{version}_scan-build @@ -287,6 +277,7 @@ name: 'HTML Report' dir: 'scan-build-archive/' files: 'index.html' + - workspace-cleanup: *liburcu_publisher_workspace_cleanup_defaults - job-template: name: liburcu_{version}_coverity @@ -298,15 +289,10 @@ cron: "@daily" wrappers: - - ansicolor - - timeout: - timeout: 60 - fail: true - type: absolute + - ansicolor: *liburcu_wrapper_ansicolor_defaults + - timeout: *liburcu_wrapper_timeout_defaults - timestamps - - workspace-cleanup: - clean-if: - - failure: false + - workspace-cleanup - credentials-binding: - username-password-separated: credential-id: liburcu_coverity_token @@ -318,10 +304,10 @@ !include-raw-escape: scripts/common/coverity.sh publishers: - - workspace-cleanup - archive: artifacts: 'analysis-results.tgz,cov-int/**' allow-empty: false + - workspace-cleanup: *liburcu_publisher_workspace_cleanup_defaults ## Views @@ -334,6 +320,7 @@ ## Projects - project: name: liburcu + job_prefix: '' github_user: urcu github_name: userspace-rcu email_to: 'ci-notification@lists.lttng.org, cc:mathieu.desnoyers@efficios.com' @@ -342,44 +329,48 @@ - stable-0.13 - master jobs: - - 'liburcu_{version}_{buildtype}': + - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: build - arch: !!python/tuple [amd64] - build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, static, tls_fallback, debug-rcu] - - 'liburcu_{version}_{buildtype}': + archs: !!python/tuple [amd64] + builds: !!python/tuple [std, oot, dist] + confs: !!python/tuple [std, static, tls_fallback, debug-rcu] + touchstone: '(build == "std") && (conf == "std")' + - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: portbuild - arch: !!python/tuple [armhf, arm64, powerpc, ppc64el, i386] - build: !!python/tuple [std] - conf: !!python/tuple [std, static, tls_fallback, debug-rcu] - - 'liburcu_{version}_{buildtype}': + archs: !!python/tuple [armhf, arm64, powerpc, ppc64el, i386] + builds: !!python/tuple [std] + confs: !!python/tuple [std, static, tls_fallback, debug-rcu] + touchstone: '(build == "std") && (conf == "std") && (arch == "i386")' + - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: slesbuild - arch: !!python/tuple [sles12sp5] - build: !!python/tuple [std] - conf: !!python/tuple [std] - - 'liburcu_{version}_{buildtype}': + archs: !!python/tuple [sles12sp5] + builds: !!python/tuple [std] + confs: !!python/tuple [std] + touchstone: '(build == "std")' + - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: elbuild - arch: !!python/tuple [el8] - build: !!python/tuple [std] - conf: !!python/tuple [std] - - 'liburcu_{version}_{buildtype}': + archs: !!python/tuple [el8] + builds: !!python/tuple [std] + confs: !!python/tuple [std] + touchstone: '(build == "std")' + - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: macosbuild - arch: !!python/tuple [macos-amd64, macos-arm64] - build: !!python/tuple [std] - conf: !!python/tuple [std] - - 'liburcu_{version}_winbuild': - arch: !!python/tuple [cygwin64] - build: !!python/tuple [std] - conf: !!python/tuple [std] - - 'liburcu_{version}_{buildtype}': + archs: !!python/tuple [macos-amd64, macos-arm64] + builds: !!python/tuple [std] + confs: !!python/tuple [std] + touchstone: '(build == "std")' + - '{job_prefix}liburcu_{version}_{buildtype}': + buildtype: winbuild + archs: !!python/tuple [cygwin64] + builds: !!python/tuple [std] + confs: !!python/tuple [std] + touchstone: '(build == "std")' + - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: freebsdbuild - arch: !!python/tuple [freebsd] - build: !!python/tuple [std] - conf: !!python/tuple [std] - version: - - stable-0.12 - - stable-0.13 - - master + archs: !!python/tuple [freebsd] + builds: !!python/tuple [std] + confs: !!python/tuple [std] + touchstone: '(build == "std")' - 'liburcu_{version}_cppcheck' - 'liburcu_{version}_scan-build' - 'liburcu_{version}_coverity': @@ -399,24 +390,28 @@ jobs: - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: build - arch: !!python/tuple [amd64] - build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, static, tls_fallback, debug-rcu] + archs: !!python/tuple [amd64] + builds: !!python/tuple [std, oot, dist] + confs: !!python/tuple [std, static, tls_fallback, debug-rcu] + touchstone: '(build == "std") && (conf == "std")' - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: portbuild - arch: !!python/tuple [armhf, arm64, powerpc, ppc64el, i386] - build: !!python/tuple [std] - conf: !!python/tuple [std, static, tls_fallback, debug-rcu] + archs: !!python/tuple [armhf, arm64, powerpc, ppc64el, i386] + builds: !!python/tuple [std] + confs: !!python/tuple [std, static, tls_fallback, debug-rcu] + touchstone: '(build == "std") && (conf == "std") && (arch == "i386")' - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: slesbuild - arch: !!python/tuple [sles12sp5] - build: !!python/tuple [std] - conf: !!python/tuple [std] + archs: !!python/tuple [sles12sp5] + builds: !!python/tuple [std] + confs: !!python/tuple [std] + touchstone: '(build == "std")' - '{job_prefix}liburcu_{version}_{buildtype}': buildtype: elbuild - arch: !!python/tuple [el8] - build: !!python/tuple [std] - conf: !!python/tuple [std] + archs: !!python/tuple [el8] + builds: !!python/tuple [std] + confs: !!python/tuple [std] + touchstone: '(build == "std")' - project: @@ -426,15 +421,16 @@ jobs: - 'dev_gerrit_liburcu_{buildtype}': buildtype: build - arch: !!python/tuple [amd64] - build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, static, tls_fallback, debug-rcu] - buildtype: build + archs: !!python/tuple [amd64] + builds: !!python/tuple [std, oot, dist] + confs: !!python/tuple [std, static, tls_fallback, debug-rcu] + touchstone: '(build == "std")' - 'dev_gerrit_liburcu_{buildtype}': buildtype: portbuild - arch: !!python/tuple [armhf, arm64, powerpc, ppc64el, i386] - build: !!python/tuple [std] - conf: !!python/tuple [std] + archs: !!python/tuple [armhf, arm64, powerpc, ppc64el, i386] + builds: !!python/tuple [std] + confs: !!python/tuple [std] + touchstone: '(build == "std")' - project: diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index 1fd0e95..e5a57e0 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -109,49 +109,17 @@ gcc) export CC=gcc export CXX=g++ ;; -gcc-4.8) - export CC=gcc-4.8 - export CXX=g++-4.8 - ;; -gcc-5) - export CC=gcc-5 - export CXX=g++-5 - ;; -gcc-6) - export CC=gcc-6 - export CXX=g++-6 - ;; -gcc-7) - export CC=gcc-7 - export CXX=g++-7 - ;; -gcc-8) - export CC=gcc-8 - export CXX=g++-8 +gcc-*) + export CC=gcc-${cc#gcc-} + export CXX=g++-${cc#gcc-} ;; clang) export CC=clang export CXX=clang++ ;; -clang-3.9) - export CC=clang-3.9 - export CXX=clang++-3.9 - ;; -clang-4.0) - export CC=clang-4.0 - export CXX=clang++-4.0 - ;; -clang-5.0) - export CC=clang-5.0 - export CXX=clang++-5.0 - ;; -clang-6.0) - export CC=clang-6.0 - export CXX=clang++-6.0 - ;; -clang-7) - export CC=clang-7 - export CXX=clang++-7 +clang-*) + export CC=clang-${cc#clang-} + export CXX=clang++-${cc#clang-} ;; *) if [ "x$cc" != "x" ]; then @@ -167,30 +135,6 @@ fi # Set platform variables case "$arch" in -sol10-i386) - export MAKE=gmake - export TAR=gtar - export NPROC=gnproc - export PATH="/opt/csw/bin:/usr/ccs/bin:$PATH" - export CPPFLAGS="-I/opt/csw/include" - export LDFLAGS="-L/opt/csw/lib -R/opt/csw/lib" - export PKG_CONFIG_PATH="/opt/csw/lib/pkgconfig" - export PYTHON="python3" - export PYTHON_CONFIG="python3-config" - ;; - -sol11-i386) - export MAKE=gmake - export TAR=gtar - export NPROC=nproc - export PATH="/opt/csw/bin:$PATH:/usr/perl5/bin" - export LD_ALTEXEC=/usr/bin/gld - export LD=/usr/bin/gld - export PYTHON="python3" - export PYTHON_CONFIG="python3-config" - export PKG_CONFIG_PATH="/usr/lib/pkgconfig" - ;; - macos*) export MAKE=make export TAR=tar @@ -202,7 +146,7 @@ macos*) export PYTHON_CONFIG="python3.9-config" ;; -freebsd) +freebsd*) export MAKE=gmake export TAR=tar export NPROC="getconf _NPROCESSORS_ONLN" -- 2.34.1