Skip to content

Commit

Permalink
Update Jenkinsfile to match current instance
Browse files Browse the repository at this point in the history
  • Loading branch information
emneo-dev committed Nov 25, 2023
1 parent 2ca39f7 commit 26c8cc0
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,26 @@ pipeline {
parallel {
stage('GNU/Linux') {
agent {
label "brigadier++-gnu"
label "cubic-gnu"
}
options {
timeout(time: 20, unit: 'MINUTES')
timeout(time: 30, unit: 'MINUTES')
}
stages {
stage ('Build GNU/Linux') {
steps {
sh '''
mkdir -pv build
cd build
CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=1 ..
make -j4
cp libBrigadier++.a libBrigadier++_x86-64_GNULinux_dev.a
'''
cache(defaultBranch: 'master', caches: [arbitraryFileCache(path: 'build', cacheName: 'gnu-master-brigadier-cache')]) {
sh '''
mkdir -pv build
cd build
find . -name CMakeCache.txt -delete
rm -rf _deps
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=1 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
mkdir -pv cache
CCACHE_DIR=$(pwd)/cache make -j6
cp libBrigadier++.a libBrigadier++_x86-64_GNULinux_dev.a
'''
}
}
}
stage ('Test GNU/Linux') {
Expand All @@ -39,7 +44,7 @@ pipeline {
post {
always {
archiveArtifacts (
artifacts: 'build/Testing/**/*.xml, build/libBrigadier++_x86-64_GNULinux_dev.a',
artifacts: 'build/Testing/**/*.xml, libBrigadier++_x86-64_GNULinux_dev.a',
allowEmptyArchive: true,
fingerprint: true
)
Expand All @@ -64,26 +69,31 @@ pipeline {
}
}
}
stage('FreeBSD') {
stage('MUSL/Linux') {
agent {
label "cubic-freebsd"
label "cubic-musl"
}
options {
timeout(time: 1, unit: 'HOURS')
timeout(time: 30, unit: 'MINUTES')
}
stages {
stage ('Build FreeBSD') {
stage ('Build MUSL/Linux') {
steps {
sh '''
mkdir -pv build
cd build
CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=1 ..
make -j4
cp libBrigadier++.a libBrigadier++_x86-64_GNULinux_dev.a
'''
cache(defaultBranch: 'master', caches: [arbitraryFileCache(path: 'build', cacheName: 'musl-master-brigadier-cache')]) {
sh '''
mkdir -pv build
cd build
find . -name CMakeCache.txt -delete
rm -rf _deps
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=1 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
mkdir -pv cache
CCACHE_DIR=$(pwd)/cache make -j6
cp libBrigadier++.a libBrigadier++_x86-64_MUSLLinux_dev.a
'''
}
}
}
stage ('Test FreeBSD') {
stage ('Test MUSL/Linux') {
steps {
sh '''
cd build
Expand All @@ -95,7 +105,7 @@ pipeline {
post {
always {
archiveArtifacts (
artifacts: 'build/Testing/**/*.xml, build/libBrigadier++_x86-64_GNULinux_dev.a',
artifacts: 'build/Testing/**/*.xml, build/libBrigadier++_x86-64_MUSLLinux_dev.a',
allowEmptyArchive: true,
fingerprint: true
)
Expand Down

0 comments on commit 26c8cc0

Please sign in to comment.