-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
53 lines (53 loc) · 1.45 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
pipeline {
agent any
stages {
stage('PreSetup') {
steps {
echo 'PreSetup..'
sh 'git submodule update --init --recursive'
}
}
stage('Build') {
steps {
echo 'Building..'
sh script:'''
#!/bin/bash
cmake -S . -B build -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DWarningsAsErrors:BOOL=ON
cd build
cmake --build .
'''
}
}
stage('Test') {
steps {
echo 'Testing..'
sh 'cppcheck src/ --enable=warning,style,performance,portability --inconclusive --error-exitcode=1'
sh 'cppcheck lib/Physics/src --enable=warning,style,performance,portability --inconclusive --error-exitcode=1'
/*sh script:'''
#!/bin/bash
cd ${WORKSPACE}/build/Debug
./BigBalls.exe --test
'''*/
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
post {
success {
sh 'chmod 755 .jenkins/send.sh'
sh '.jenkins/send.sh success $WEBHOOK_URL'
}
failure {
sh 'chmod 755 .jenkins/send.sh'
sh '.jenkins/send.sh failure $WEBHOOK_URL'
}
aborted {
sh 'chmod 755 .jenkins/send.sh'
sh '.jenkins/send.sh failure $WEBHOOK_URL'
}
}
}