-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Jenkinsfile for Continuous Integration configuration
- Loading branch information
Emilien Bauer
committed
Feb 13, 2020
1 parent
bfc06c3
commit b93009f
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
pipeline { | ||
agent none | ||
stages{ | ||
stage('OpenScop'){ | ||
matrix{ | ||
agent{ label "${OS}" } | ||
axes{ | ||
axis{ | ||
name 'OS' | ||
values 'Ubuntu', 'macOS', 'CentOS', 'fedora', 'Debian' | ||
} | ||
axis{ | ||
name 'BuildSystem' | ||
values 'GNU Autotools'//, 'CMake' | ||
} | ||
} | ||
stages{ | ||
stage('Tools'){ | ||
steps{ | ||
script{ | ||
if(env.OS == 'macOS') | ||
sh 'brew install automake libtool' | ||
if(env.OS == 'CentOS') | ||
sh 'sudo yum install gmp-devel -y' | ||
if(env.OS == 'fedora') | ||
sh 'sudo dnf install gmp-devel -y' | ||
if(env.OS == 'Debian') | ||
sh 'sudo apt install autoconf libtool libgmp-dev make -y' | ||
} | ||
} | ||
} | ||
stage('Build'){ | ||
steps{ | ||
script{ | ||
if(env.BuildSystem == 'GNU Autotools') | ||
sh './autogen.sh && ./configure && make -j' | ||
if(env.BuildSystem == 'CMake') | ||
sh 'mkdir build && cd build && cmake .. && cmake --build' | ||
} | ||
} | ||
} | ||
stage('Test'){ | ||
steps{ | ||
script { | ||
if(env.BuildSystem == 'GNU Autotools') | ||
sh 'make check -j' | ||
if(env.BuildSystem == 'CMake') | ||
sh 'cd build && cmake --build . --target check' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |