removed compiler warning
[polylib.git] / Jenkinsfile
blobb12ce97f15d8f1187c0e64c2f06f17122dce55a1
1 pipeline {
2   agent none
3   stages{
4     stage('PolyLib'){
5       //Using a matrix section for extensibility
6       matrix{
7         //The work is done on a slave with the indicated OS
8         agent{ label "${OS}" }
9         axes{
10           axis{
11             //The list of target OS
12             name 'OS'
13             values 'Ubuntu', 'macOS', 'CentOS', 'fedora', 'Debian'
14           }
15         }
16         //Here is the actual work to be done
17         stages{
18           //Install whatever dependency the project may have
19           stage('Tools'){
20             steps{
21               script{
22                 if(env.OS == 'macOS')
23                   sh 'brew install automake libtool'
24                 if(env.OS == 'CentOS')
25                   sh 'sudo yum install gmp-devel -y'
26                 if(env.OS == 'fedora')
27                   sh 'sudo dnf install gmp-devel -y'
28                 if(env.OS == 'Debian')
29                   sh 'sudo apt install autoconf libtool libgmp-dev make -y'
30               }
31             }
32           }
33           //Build the project
34           stage('Build'){
35             steps{
36               sh './autogen.sh && ./configure && make -j'
37             }
38           }
39           //Execute the test suites
40           stage('Test'){
41             steps{
42               sh 'make check -j'
43             }
44           }
45         }
46       }
47     }
48   }