Skip to content

Commit

Permalink
fixes, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
carstene1ns committed Dec 3, 2023
1 parent 9f52d0e commit 277b235
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions liblcf/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ pipeline {
dir('lcf') {
git url: 'https://github.com/EasyRPG/liblcf.git'
}
sh """
rm -rf build-${PLATFORM}
"""
sh "rm -rf build-${PLATFORM}"
}
}
stage('Build') {
Expand All @@ -54,9 +52,7 @@ pipeline {
stage('Install') {
steps {
echo "Install for ${PLATFORM}"
sh """
cmake --install build-${PLATFORM} --prefix ${PLATFORM.toLowerCase()}
"""
sh "cmake --install build-${PLATFORM} --prefix ${PLATFORM.toLowerCase()}"
}
}
}
Expand All @@ -69,17 +65,15 @@ pipeline {
expression { params.PLATFORM_FILTER == 'Linux' }
} }
environment {
EASYRPG_BUILDSCRIPTS="${WORKSPACE}/../toolchain-linux"
EASYRPG_BUILDSCRIPTS="${WORKSPACE}/../toolchain-linux-static"
}
stages {
stage('Prepare') {
steps {
dir('lcf') {
git url: 'https://github.com/EasyRPG/liblcf.git'
}
sh """
rm -rf build-linux
"""
sh "rm -rf build-linux"
}
}
stage('Build') {
Expand All @@ -96,17 +90,13 @@ pipeline {
stage('Test') {
steps {
echo "Test for Linux"
sh """
cmake --build build-linux --target check
"""
sh "cmake --build build-linux --target check"
}
}
stage('Install') {
steps {
echo "Install for Linux"
sh """
cmake --install build-linux --prefix linux
"""
sh "cmake --install build-linux --prefix linux"
}
}
}
Expand Down Expand Up @@ -136,18 +126,16 @@ pipeline {
dir('lcf') {
git url: 'https://github.com/EasyRPG/liblcf.git'
}
bat """
if exist "build-${BITS}" rd /S /Q build-${BITS}
if ${BITS}==32 (SET arg=amd64_x86) else (SET arg=x64)
call %VCVARSALL2017% %arg%
"""
bat "if exist 'build-${BITS}' rd /S /Q 'build-${BITS}'"
}
}
stage('Build') {
steps {
echo "Build for Windows ${BITS} bit - ${CONFIG}"
bat label: 'cmake', script: """
if ${BITS}==32 (SET arg=amd64_x86) else (SET arg=x64)
call %VCVARSALL2017% %arg%
if ${CONFIG}==debug (SET type=Debug) else (SET type=RelWithDebInfo)
if ${BITS}==32 (SET triplet=x86-windows-static) else (SET triplet=x64-windows-static)
cmake . -GNinja -B${CONFIG} -DCMAKE_BUILD_TYPE=%type% ^
Expand All @@ -161,17 +149,13 @@ pipeline {
stage('Test') {
steps {
echo "Test for Windows ${BITS} bit - ${CONFIG}"
bat """
cmake --build ${CONFIG} --target check
"""
bat "cmake --build ${CONFIG} --target check"
}
}
stage('Install') {
steps {
echo "Install for Windows ${BITS} bit - ${CONFIG}"
bat """
cmake --build ${CONFIG} --target install
"""
bat "cmake --build ${CONFIG} --target install"
}
}
}
Expand Down

0 comments on commit 277b235

Please sign in to comment.