Skip to content
Snippets Groups Projects
Commit 82fd27d6 authored by Zakharov's avatar Zakharov
Browse files

Added Jenkins example and doc section

parent a4f803bd
No related branches found
No related tags found
No related merge requests found
...@@ -6,3 +6,7 @@ Source: ...@@ -6,3 +6,7 @@ Source:
Files: doc/* Files: doc/*
Copyright: 2020 Intel Corporation Copyright: 2020 Intel Corporation
License: CC-BY-4.0 License: CC-BY-4.0
Files: img/*
Copyright: 2021 Intel Corporation
License: CC-BY-4.0
// SPDX-FileCopyrightText: 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
def SAMPLES_REPO = "https://github.com/oneapi-src/oneAPI-samples.git"
def SAMPLES_TAG = "2021.3.0"
pipeline {
agent { docker { image 'intel/oneapi-hpckit' } }
stages {
stage('checkout samples') {
steps {
dir("oneAPI-samples") {
checkout scm: [$class: 'GitSCM',
userRemoteConfigs: [[url: "${SAMPLES_REPO}"]],
branches: [[name: "${SAMPLES_TAG}"]]],
poll: false
}
}
}
stage ('build') {
parallel {
stage('build DPC++') {
steps {
dir ("oneAPI-samples/DirectProgramming/DPC++/DenseLinearAlgebra/vector-add") {
sh "make all && make run"
}
}
}
stage('build C++') {
steps {
dir ("oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/Intrinsics") {
sh "make && make run && make clean && make CC='icx -msse3' && make run"
}
}
}
stage('build Fortran') {
steps {
dir ("oneAPI-samples/DirectProgramming/Fortran/CombinationalLogic/openmp-primes") {
sh "make && make run && make clean && make FC=ifx && make run"
}
}
}
}
}
}
}
...@@ -23,7 +23,7 @@ Install methods Intel installer, apt, dnf, docker container, CI cache ...@@ -23,7 +23,7 @@ Install methods Intel installer, apt, dnf, docker container, CI cache
=============== =========================================== =============== ===========================================
The config files are intended to be samples that demonstrate a wide The config files are intended to be samples that demonstrate a wide
variety of use cases. For you own use, select the parts that you variety of use cases. For your own use, select the parts that you
need. You may also want to customize the set of compilers and need. You may also want to customize the set of compilers and
libraries that are installed. See `component listings`_ for the libraries that are installed. See `component listings`_ for the
component names to use in the scripts. component names to use in the scripts.
...@@ -56,6 +56,7 @@ Circle |c| |c| |c| |c| |c| |x| ...@@ -56,6 +56,7 @@ Circle |c| |c| |c| |c| |c| |x|
AppVeyor |c| |x| |x| |c| |c| |c| AppVeyor |c| |x| |x| |c| |c| |c|
GitLab |c| |c| |x| |c| |c| |x| GitLab |c| |c| |x| |c| |c| |x|
Azure |c| |c| |c| |c| |c| |c| Azure |c| |c| |c| |c| |c| |c|
Jenkins |x| |x| |c| |x| |x| |x|
======== ========= ========= ============ ===== ======= =========== ======== ========= ========= ============ ===== ======= ===========
...@@ -66,6 +67,36 @@ Some of the oneAPI components are large and can take a few minutes to ...@@ -66,6 +67,36 @@ Some of the oneAPI components are large and can take a few minutes to
download install. To accelerate install, we demonstrate the use of download install. To accelerate install, we demonstrate the use of
caching. caching.
Using oneAPI in Jenkins pipelines
=================================
There are multiple ways to add oneAPI tools to a Jenkins pipeline:
#. setup the tools on Jenkins agent directly, or create custom
container with the tools you need
* refer to `Intel® oneAPI Toolkits Installation Guides`_ for
details
* explore installation scripts in this repo for examples
#. use optimized containers from `Intel oneContainer Portal`_
The Jenkinsfile in this repo demonstrates building DPC++, C++ and
Fortran samples in intel/oneapi-hpckit container in Jenkins.
To give it a try:
#. Follow `Jenkins Install Guide`_ to setup Jenkins, or use your
existing setup.
#. Install Docker and Docker Pipeline plugins.
#. Create new pipeline for this repository using
New Item -> Pipeline.
#. Build the pipeline.
#. The result will look like this in Blue Ocean.
|Jenkins Pipeline Example|
See also See also
======== ========
...@@ -102,6 +133,9 @@ See `security guidelines`_. ...@@ -102,6 +133,9 @@ See `security guidelines`_.
.. _contributing: CONTRIBUTING.rst .. _contributing: CONTRIBUTING.rst
.. _`security guidelines`: https://www.intel.com/content/www/us/en/security-center/default.html .. _`security guidelines`: https://www.intel.com/content/www/us/en/security-center/default.html
.. _`Enabling Performance Profiling in GitLab* CI`: https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/performance-profiling-in-gitlab-ci.html .. _`Enabling Performance Profiling in GitLab* CI`: https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/performance-profiling-in-gitlab-ci.html
.. _`Intel® oneAPI Toolkits Installation Guides`: https://software.intel.com/content/www/us/en/develop/articles/installation-guide-for-intel-oneapi-toolkits.html
.. _`Jenkins Install Guide`: https://www.jenkins.io/doc/book/installing/
.. _`Intel oneContainer Portal`: https://software.intel.com/content/www/us/en/develop/tools/containers/get-started.html
.. _`.github/workflows/build_all.yml`: .github/workflows/build_all.yml .. _`.github/workflows/build_all.yml`: .github/workflows/build_all.yml
.. _`.circleci/config.yml`: .circleci/config.yml .. _`.circleci/config.yml`: .circleci/config.yml
...@@ -127,6 +161,8 @@ See `security guidelines`_. ...@@ -127,6 +161,8 @@ See `security guidelines`_.
.. |ListComponentsStatus| image:: https://github.com/oneapi-src/oneapi-ci/workflows/list_components/badge.svg .. |ListComponentsStatus| image:: https://github.com/oneapi-src/oneapi-ci/workflows/list_components/badge.svg
:target: https://github.com/oneapi-src/oneapi-ci/actions?query=workflow%3Alist_components :target: https://github.com/oneapi-src/oneapi-ci/actions?query=workflow%3Alist_components
:alt: Build status :alt: Build status
.. |Jenkins Pipeline Example| image:: img/jenkins_pipeline_example.png
:alt: Jenkins Pipeline Example
.. |r| unicode:: U+000AE .. |r| unicode:: U+000AE
.. |c| unicode:: U+2714 .. |c| unicode:: U+2714
......
img/jenkins_pipeline_example.png

18 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment