Skip to content

Commit

Permalink
Merge pull request #4 from systelab/vs2022-openssl3-gtest1.14
Browse files Browse the repository at this point in the history
Upgrade to Vs2022 openssl3 gtest1.14
  • Loading branch information
Tanaka12 committed Feb 26, 2024
2 parents ec438e7 + 560fcb3 commit 914f44f
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 465 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.2)
project(HttpLibWebServerAdapter)

# Configure environment
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
Expand Down
93 changes: 65 additions & 28 deletions ci/pipelines/Build.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
def channel = "testing"
def version = "0.0.0"
def profile = "vs2022.conanprofile"
def archs = ['x86', 'x86_64']
def configs = ['Debug', 'Release']


library identifier: "cpp-jenkins-pipelines@master", retriever: modernSCM(
[$class: "GitSCMSource",
remote: "https://github.com/systelab/cpp-jenkins-pipelines.git",
credentialsId: "GitHubCredentials"])
remote: "https://github.com/systelab/cpp-jenkins-pipelines.git"])

pipeline
{
Expand All @@ -16,7 +18,15 @@ pipeline

parameters
{
booleanParam( name: 'uploadTestingPkg',
string( name: 'version',
description: 'Version to build (must match the name of the tag that will be checked out), leave blank for checkout of current branch',
defaultValue: '' )

booleanParam( name: 'stable',
description: 'Show if generated library should be uploaded as stable or testing',
defaultValue: false )

booleanParam( name: 'uploadPackage',
description: 'Whether or not to upload testing conan package',
defaultValue: false )
}
Expand All @@ -35,8 +45,19 @@ pipeline
steps
{
deleteDir()
configureConanRemotes()
checkoutSourceCode()
script
{
if (params.version == '')
{
checkoutSourceCode()
}
else
{
checkoutSourceCodeFromTag(version)
version = params.version
}
channel = params.stable ? "stable" : "testing"
}
}
}

Expand All @@ -46,43 +67,55 @@ pipeline
{
script
{
def configurations = ['NewtonDebug', 'NewtonRelease', 'SnowDebug', 'SnowRelease']
for(int i=0; i < configurations.size(); i++)
{
stage('Build ' + configurations[i])
{
def props = readProperties file:"ci/pipelines/${configurations[i]}.properties"
props.each { propKey, propValue -> println "${propKey}: ${propValue}" }

sh "mkdir build-${configurations[i]}"
dir("build-${configurations[i]}")
archs.each
{ arch ->
configs.each
{ config ->
stage("Build ${config}|${arch}")
{
sh "conan install .. -s build_type=${props.conanBuildType} -s compiler.toolset=${props.conanCompilerToolset} -s arch=${props.conanArch} -o gtest=${props.conanGTestVersion} -o openssl=${props.conanOpenSSLVersion}"
sh "cmake .. -G '${props.cmakeVS}' -A ${props.cmakePlatform}"
sh "cmake --build . --config ${props.cmakeConfiguration}"
sh "conan export-pkg ../conanfile.py HttpLibWebServerAdapter/${version}@systelab/${channel} -s build_type=${props.conanBuildType} -s compiler.toolset=${props.conanCompilerToolset} -s arch=${props.conanArch} -o gtest=${props.conanGTestVersion} -o openssl=${props.conanOpenSSLVersion} --force"
sh "conan test ../test_package/conanfile.py HttpLibWebServerAdapter/${version}@systelab/${channel} -s build_type=${props.conanBuildType} -s compiler.toolset=${props.conanCompilerToolset} -s arch=${props.conanArch} -o gtest=${props.conanGTestVersion} -o openssl=${props.conanOpenSSLVersion}"
sh "bin/${props.conanBuildType}/HttpLibWebServerAdapterTest.exe --gtest_output=xml:HttpLibWebServerAdapterTest.xml"
def buildFolder = "build/${config}-${arch}"
bat "conan install . --install-folder ${buildFolder} --profile=${profile} -s arch=${arch} -s build_type=${config}"
bat "conan build . --build-folder ${buildFolder}"
bat "conan export-pkg . HttpLibWebServerAdapter/${version}@systelab/${channel} --build-folder ${buildFolder} --force"

dir("${buildFolder}/bin/${config}/")
{
bat "HttpLibWebServerAdapterTest.exe --gtest_output=xml:HttpLibWebServerAdapterTest.xml"
}

}
}
}
}
}
}
stage('Test Packages')
{
steps
{
script
{
archs.each
{ arch ->
configs.each
{ config ->
def buildFolder = "build/${config}-${arch}"
bat "conan test ./test_package/conanfile.py HttpLibWebServerAdapter/${version}@systelab/${channel} --profile=${profile} -s arch=${arch} -s build_type=${config}"
}
}
}
}
}

stage('Deploy')
{
when
{
expression { return params.uploadTestingPkg }
expression { params.uploadPackage }
}
steps
{
script
{
sh "conan remove HttpLibWebServerAdapter/${version}@systelab/${channel} -r systelab-conan-local --force"
sh "conan upload HttpLibWebServerAdapter/${version}@systelab/${channel} --all -r systelab-conan-local --force"
}
bat "conan upload HttpLibWebServerAdapter/${version}@systelab/${channel} --all -r systelab-conan-local --force"
}
}
}
Expand All @@ -91,7 +124,11 @@ pipeline
{
always
{
junit allowEmptyResults: true, testResults: "build*/HttpLibWebServerAdapterTest.xml"
junit allowEmptyResults: true, testResults: "build/**/HttpLibWebServerAdapterTest.xml"
script
{
currentBuild.description = "${version}/${channel}"
}
}
}
}
11 changes: 0 additions & 11 deletions ci/pipelines/NewtonDebug.properties

This file was deleted.

11 changes: 0 additions & 11 deletions ci/pipelines/NewtonRelease.properties

This file was deleted.

106 changes: 0 additions & 106 deletions ci/pipelines/Release.jenkinsfile

This file was deleted.

11 changes: 0 additions & 11 deletions ci/pipelines/SnowDebug.properties

This file was deleted.

11 changes: 0 additions & 11 deletions ci/pipelines/SnowRelease.properties

This file was deleted.

Empty file removed ci/scripts/build_docs.cfg
Empty file.
Loading

0 comments on commit 914f44f

Please sign in to comment.