jjb: Add windows jobs to babeltrace
[lttng-ci.git] / jobs / babeltrace.yaml
index 144099c6b28507245e0026bb687e0a56cc480512..616753cfd7bb0d9621268debb970420c78796beb 100644 (file)
 
     project-type: freestyle
 
-    logrotate:
-        daysToKeep: -1
-        numToKeep: 2
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
-
     wrappers:
-      - workspace-cleanup
-      - timestamps
       - ansicolor
+      - timeout:
+          timeout: 90
+          fail: true
+          type: absolute
+      - timestamps
+      - workspace-cleanup:
+          clean-if:
+            - failure: false
 
     scm:
       - git:
-          url: https://github.com/efficios/babeltrace.git
+          url: git://github.com/{github_user}/{github_name}.git
           browser: githubweb
-          browser-url: https://github.com/efficios/babeltrace.git
+          browser-url: https://github.com/{github_user}/{github_name}
           branches:
             - origin/{version}
+          basedir: src/babeltrace
+          skip-tag: true
+          git-tool: jgit
 
     triggers:
-      - pollscm: "@hourly"
+      - pollscm:
+          cron: "@hourly"
 
     properties:
+      - inject:
+          properties-content: |
+            PROJECT_NAME=babeltrace
+      - build-discarder:
+          num-to-keep: 2
       - github:
-          url: https://github.com/efficios/babeltrace/
-
+          url: https://github.com/{github_user}/{github_name}
 
-## Templates
-- job-template:
-    name: babeltrace_{version}_{buildtype}
-    defaults: babeltrace
 
+## Anchors
+- babeltrace_build_axes_defaults: &babeltrace_build_axes_defaults
+    name: 'babeltrace_build_axes_defaults'
     project-type: matrix
+    node: 'master' # Applies only to matrix flyweight task
     axes:
       - axis:
          type: slave
       - axis:
          type: user-defined
          name: conf
-         values:
-          - std
-          - static
-          - python_bindings
+         values: '{obj:conf}'
       - axis:
          type: user-defined
          name: build
          values: '{obj:build}'
 
+- babeltrace_build_builders_defaults: &babeltrace_build_builders_defaults
+    name: 'babeltrace_build_builders_defaults'
     builders:
       - shell:
-         !include-raw-escape scripts/babeltrace/build.sh
+         !include-raw-escape: scripts/babeltrace/build.sh
 
-    # TODO: Scan for open tasks
+- babeltrace_build_builders_win: &babeltrace_build_builders_win
+    name: 'babeltrace_build_builders_win'
+    builders:
+      - conditional-step:
+          condition-kind: strings-match
+          on-evaluation-failure: run
+          condition-string1: '${{arch}}'
+          condition-string2: 'cygwin'
+          steps:
+            - shell:
+               !include-raw-escape:
+                 - scripts/common/cygwin-shebang
+                 - scripts/common/cygwin-prefix
+                 - scripts/babeltrace/build.sh
+      - conditional-step:
+          condition-kind: strings-match
+          on-evaluation-failure: run
+          condition-string1: '${{arch}}'
+          condition-string2: 'cygwin64'
+          steps:
+            - shell:
+               !include-raw-escape:
+                 - scripts/common/cygwin64-shebang
+                 - scripts/common/cygwin-prefix
+                 - scripts/babeltrace/build.sh
+      - conditional-step:
+          condition-kind: strings-match
+          on-evaluation-failure: run
+          condition-string1: '${{arch}}'
+          condition-string2: 'msys32'
+          steps:
+            - inject:
+               properties-content: 'MSYSTEM=MINGW32'
+            - shell:
+               !include-raw-escape:
+                 - scripts/common/msys32-shebang
+                 - scripts/common/cygwin-prefix
+                 - scripts/babeltrace/build.sh
+      - conditional-step:
+          condition-kind: strings-match
+          on-evaluation-failure: run
+          condition-string1: '${{arch}}'
+          condition-string2: 'msys64'
+          steps:
+            - inject:
+               properties-content: 'MSYSTEM=MINGW64'
+            - shell:
+               !include-raw-escape:
+                 - scripts/common/msys64-shebang
+                 - scripts/common/cygwin-prefix
+                 - scripts/babeltrace/build.sh
+
+
+- babeltrace_build_publishers_defaults: &babeltrace_build_publishers_defaults
+    name: 'babeltrace_build_publishers_defaults'
     publishers:
       - tap:
-          results: 'tap/**/*.tap'
+          results: 'tap/**/*.log'
           failed-tests-mark-build-as-failure: true
+          todo-is-failure: false
       - warnings:
           console-log-parsers:
             - 'GNU Make + GNU C Compiler (gcc)'
           total-thresholds:
-            failed:
+            unstable:
               total-all: 0
               total-high: 0
               total-normal: 0
               total-low: 0
+
+- babeltrace_build_publishers_prod: &babeltrace_build_publishers_prod
+    name: 'babeltrace_build_publishers_prod'
+    publishers:
       - archive:
           artifacts: 'build/**'
           allow-empty: false
-          fingerprint: true
+      - ircbot:
+          strategy: new-failure-and-fixed
+          matrix-notifier: only-parent
+          channels:
+            - name: '#lttng'
+
+## Templates
+
+- job-template:
+    name: babeltrace_{version}_{buildtype}
+    defaults: babeltrace
+
+    <<: *babeltrace_build_axes_defaults
+    <<: *babeltrace_build_builders_defaults
+    <<: *babeltrace_build_publishers_defaults
+    <<: *babeltrace_build_publishers_prod
+
+- job-template:
+    name: babeltrace_{version}_winbuild
+    defaults: babeltrace
+
+    <<: *babeltrace_build_axes_defaults
+    <<: *babeltrace_build_builders_win
+    <<: *babeltrace_build_publishers_defaults
+    <<: *babeltrace_build_publishers_prod
+
+- job-template:
+    name: dev_{user}_babeltrace_{version}_{buildtype}
+    defaults: babeltrace
+
+    <<: *babeltrace_build_axes_defaults
+    <<: *babeltrace_build_builders_defaults
+    <<: *babeltrace_build_publishers_defaults
 
 - job-template:
     name: babeltrace_{version}_cppcheck
     defaults: babeltrace
 
     triggers:
-      - pollscm: "@daily"
+      - pollscm:
+          cron: "@daily"
 
     builders:
       - shell: |
           rm -f babeltrace-cppcheck.xml
-          cppcheck --enable=all --xml --xml-version=2 $WORKSPACE 2> babeltrace-cppcheck.xml
+          cppcheck --enable=all --xml --xml-version=2 $WORKSPACE/src/babeltrace 2> babeltrace-cppcheck.xml
 
     publishers:
       - archive:
           artifacts: 'babeltrace-cppcheck.xml'
           allow-empty: false
-          fingerprint: true
       - cppcheck:
           pattern: 'babeltrace-cppcheck.xml'
-      - email:
-          recipients: 'ci-notification@lists.lttng.org'
-          notify-every-unstable-build: true
-          send-to-individuals: false
 
 - job-template:
     name: babeltrace_{version}_scan-build
     node: 'x86-64'
 
     triggers:
-      - pollscm: "@daily"
+      - pollscm:
+          cron: "@daily"
 
     builders:
       - shell:
-          !include-raw-escape scripts/babeltrace/scan-build.sh
+          !include-raw-escape: scripts/common/scan-build.sh
 
     publishers:
       - html-publisher:
           dir: 'scan-build-archive/'
           files: 'index.html'
 
-# TODO: babeltrace_{version}_coverity
-#- job-template:
-#    name: babeltrace_{version}_coverity
-#    defaults: babeltrace
-#    node: 'x86-64'
-#
-#    triggers:
-#      - pollscm: "@daily"
-#
-#    builders:
-#      - shell:
-#          !include-raw-escape scripts/babeltrace/coverity.sh
-#
-#    publishers:
-#      - html-publisher:
-#          name: 'HTML Report'
-#          dir: 'scan-build-archive/'
-#          files: 'index.html'
+- job-template:
+    name: babeltrace_{version}_coverity
+    defaults: babeltrace
+    node: 'x86-64'
+
+    triggers:
+      - pollscm:
+          cron: "@daily"
+
+    wrappers:
+      - workspace-cleanup
+      - timestamps
+      - ansicolor:
+          colormap: xterm
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: babeltrace_coverity_token
+              username: COVERITY_SCAN_PROJECT_NAME
+              password: COVERITY_SCAN_TOKEN
+    builders:
+      - shell:
+          !include-raw-escape: scripts/common/coverity.sh
+
+    publishers:
+      - workspace-cleanup
+      - archive:
+          artifacts: 'analysis-results.tgz,cov-int/**'
+          allow-empty: false
 
 - job-template:
     name: babeltrace_{version}_pylint
     scm: []
 
     triggers:
-      - pollscm: "@daily"
+      - pollscm:
+          cron: "@daily"
 
     builders:
        - copyartifact:
-           project: babeltrace-{version}/arch=x86-64,build=std,conf=python_bindings
+           project: babeltrace_{version}_build/arch=x86-64,build=std,conf=python-bindings
            which-build: last-successful
-           stable: true
+           stable: false
            filter: 'build/**'
-           target: 'dependencies/babeltrace'
+           target: 'deps/babeltrace'
        - shell:
-          !include-raw-escape scripts/babeltrace/pylint.sh
+          !include-raw-escape: scripts/babeltrace/pylint.sh
 
     publishers:
       - archive:
           artifacts: 'pep8.out,pylint.out'
-          fingerprint: true
       - violations:
           pep8:
             pattern: pep8.out
           notify-every-unstable-build: true
           send-to-individuals: false
 
+# Use - in version number since yaml anchor do not support dot
+- babeltrace_version_glib-2-22-5_anchor: &babeltrace_version_glib-2-22-5_anchor
+    name: 'babeltrace_version_glib_anchor'
+    defaults: babeltrace
+    node: 'x86-64'
+
+    builders:
+      - inject:
+          properties-content: |
+            LD_LIBRARY_PATH=$WORKSPACE/glib-2.22.5/BUILD_RESULT/lib
+            PKG_CONFIG_PATH=$WORKSPACE/glib-2.22.5/BUILD_RESULT/lib/pkgconfig
+            arch=x86-64
+            conf=std
+            build=std
+      - shell: |
+          wget http://ftp.gnome.org/pub/gnome/sources/glib/2.22/glib-2.22.5.tar.gz
+          tar xvf glib-2.22.5.tar.gz
+          cd glib-2.22.5
+          mkdir BUILD_RESULT
+          ./configure --prefix=$WORKSPACE/glib-2.22.5/BUILD_RESULT
+          make -j `nproc`
+          make install
+
+      - shell:
+         !include-raw-escape: scripts/babeltrace/build.sh
+
+- job-template:
+    name: babeltrace_{version}_glib-2.22.5
+    triggers:
+      - pollscm:
+          cron: "@daily"
+    <<: *babeltrace_version_glib-2-22-5_anchor
+
+- job-template:
+    name: dev_{user}_babeltrace_{version}_glib-2.22.5
+    <<: *babeltrace_version_glib-2-22-5_anchor
+
 
 ## Project
 - project:
     name: babeltrace
+    github_user: efficios
+    github_name: babeltrace
     version:
-      !include jobs/inc/babeltrace-versions.yaml.inc
+      - stable-1.3
+      - stable-1.4
+      - stable-1.5
+      - master
     jobs:
       - 'babeltrace_{version}_{buildtype}':
           buildtype: build
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
+          conf: !!python/tuple [std, static, python-bindings]
+      - 'babeltrace_{version}_{buildtype}':
+          buildtype: clangbuild
+          arch: !!python/tuple [x86-32, x86-64]
+          build: !!python/tuple [clang]
+          conf: !!python/tuple [std, static]
       - 'babeltrace_{version}_{buildtype}':
           buildtype: portbuild
-          arch: !!python/tuple [armhf, powerpc]
+          arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
+          conf: !!python/tuple [std, static, python-bindings]
+      - 'babeltrace_{version}_{buildtype}':
+          buildtype: solarisbuild
+          arch: !!python/tuple [solaris10, solaris11]
+          build: !!python/tuple [std]
+          conf: !!python/tuple [std, static]
+      - 'babeltrace_{version}_{buildtype}':
+          buildtype: macosxbuild
+          arch: !!python/tuple [macosx]
+          build: !!python/tuple [std]
+          conf: !!python/tuple [std]
+          version:
+            - stable-1.4
+            - stable-1.5
+            - master
+      - 'babeltrace_{version}_winbuild':
+          arch: !!python/tuple [cygwin, cygwin64]
+          build: !!python/tuple [std]
+          conf: !!python/tuple [std]
+          version:
+            - stable-1.5
       - 'babeltrace_{version}_cppcheck'
       - 'babeltrace_{version}_scan-build'
       - 'babeltrace_{version}_pylint'
+      - 'babeltrace_{version}_coverity':
+          version: master
+      - 'babeltrace_{version}_glib-2.22.5':
+          version: master
+      - 'dev_{user}_babeltrace_{version}_glib-2.22.5':
+          user: jgalar
+          github_user: jgalar
+          github_name: babeltrace
+          version:
+            - master-staging
+      - 'dev_{user}_babeltrace_{version}_{buildtype}':
+          user: jgalar
+          github_user: jgalar
+          github_name: babeltrace
+          buildtype: build
+          version:
+            - master-staging
+            - stable-1.3-staging
+            - stable-1.4-staging
+            - stable-1.5-staging
+          arch: !!python/tuple [x86-32, x86-64]
+          build: !!python/tuple [std, oot, dist]
+          conf: !!python/tuple [std, static, python-bindings]
+      - 'dev_{user}_babeltrace_{version}_{buildtype}':
+          user: jgalar
+          github_user: jgalar
+          github_name: babeltrace
+          buildtype: macosxbuild
+          version:
+            - master-staging
+            - stable-1.4-staging
+            - stable-1.5-staging
+          arch: !!python/tuple [macosx]
+          build: !!python/tuple [std]
+          conf: !!python/tuple [std]
 
This page took 0.026582 seconds and 4 git commands to generate.