From a6e3e20bcea83d5758a5bfd6a6bf4988812eb086 Mon Sep 17 00:00:00 2001 From: JackCarterSmith Date: Sat, 13 Aug 2022 13:56:20 +0200 Subject: [PATCH] CI integration reviewed --- .gitignore | 3 +- CMakeLists.txt | 3 +- Jenkinsfile | 24 ++++++------ LICENSE-glew.txt | 73 +++++++++++++++++++++++++++++++++++++ RSPModelLib/src/config.h | 6 --- RSPModelLib/src/config.h.in | 6 --- 6 files changed, 89 insertions(+), 26 deletions(-) create mode 100644 LICENSE-glew.txt delete mode 100644 RSPModelLib/src/config.h delete mode 100644 RSPModelLib/src/config.h.in diff --git a/.gitignore b/.gitignore index cd6b464..f31e982 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,8 @@ # Precompiled Headers *.gch *.pch -config.h +RSPModelLib/src/config.h +RSEModel/src/config.h # Libraries *.lib diff --git a/CMakeLists.txt b/CMakeLists.txt index 4133d60..7429aab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,10 +20,11 @@ if(DEFINED ENV{CI}) # Jenkins CI integration mode project(rse-model VERSION $ENV{CI_VERSION}.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C) set(RSE_MODEL_NAME $ENV{CI_OUTPUT_NAME}) else() # Standalone project mode, should not be used for release. - project(rse-model VERSION 1.0.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C) + project(rse-model VERSION 2.0.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C) set(RSE_MODEL_NAME RSEModel) endif() set(RSP_MODEL_LIB_NAME RSPModel${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") # Compilation option option(RSPMODEL_SHARED "Build shared lib" ON) diff --git a/Jenkinsfile b/Jenkinsfile index 55c6b33..eec6465 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,15 +4,15 @@ pipeline { skipDefaultCheckout(true) } environment { - CI_OUTPUT_NAME = "RSE_Model" - CI_VERSION = "1.0.1" + CI_OUTPUT_NAME = "RSEModel" + CI_VERSION = "2.0.0" CI_BUILD_NUMBER = "$BUILD_NUMBER" } stages { stage('Prepare') { steps { cleanWs() - rtConanClient(id: "conan", userHome: "/home/jackcartersmith") + rtConanClient(id: "conan") } } stage('Build') { @@ -23,7 +23,7 @@ pipeline { checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Model'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Model.git']]]) sh 'git submodule update --init --recursive' dir("build") { - rtConanRun(clientId: "conan", command: "install .. --build missing") + rtConanRun(clientId: "conan", command: "install .. --build=missing") } cmakeBuild buildDir: 'build', installation: 'latest', steps: [[args: 'all']] } @@ -33,7 +33,7 @@ pipeline { checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Model'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Model.git']]]) sh 'git submodule update --init --recursive' dir("build") { - rtConanRun(clientId: "conan", command: "install .. --profile windows --build missing") + rtConanRun(clientId: "conan", command: "install .. --profile=windows --build=missing") } cmakeBuild buildDir: 'build', cmakeArgs: '-DGNU_HOST=x86_64-w64-mingw32 -DCMAKE_TOOLCHAIN_FILE=../mingw_cross_toolchain.cmake', installation: 'latest', steps: [[args: 'all']] } @@ -44,15 +44,15 @@ pipeline { stage('Deploy') { steps { dir("zip_linux") { - sh 'cp ../linux/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .' + sh 'cp -R ../linux/build/bin ../linux/build/lib ../linux/include .' } dir("zip_win") { - sh 'cp ../windows/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* ../windows/build/*.dll .' + sh 'cp -R ../windows/build/bin ../windows/build/lib ../windows/include .' } - zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'x64.zip' - sh 'mv x64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip' + zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'linux_x64.zip' + sh 'mv linux_x64.zip ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip' zip archive: false, dir: 'zip_win', exclude: '', glob: '', zipFile: 'mingw64.zip' - sh 'mv mingw64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip' + sh 'mv mingw64.zip ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip' archiveArtifacts(artifacts: '*.zip') fingerprint(targets: '*.zip') } @@ -60,8 +60,8 @@ pipeline { stage('Sign') { steps { sh 'ls -l' - sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip.gpg ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip' - sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip.gpg ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip' + sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip.gpg ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_x64.zip' + sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip.gpg ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip' archiveArtifacts(artifacts: '*.gpg') fingerprint(targets: '*.gpg') } diff --git a/LICENSE-glew.txt b/LICENSE-glew.txt new file mode 100644 index 0000000..f707804 --- /dev/null +++ b/LICENSE-glew.txt @@ -0,0 +1,73 @@ +The OpenGL Extension Wrangler Library +Copyright (C) 2002-2007, Milan Ikits +Copyright (C) 2002-2007, Marcelo E. Magallon +Copyright (C) 2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + + +Mesa 3-D graphics library +Version: 7.0 + +Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Copyright (c) 2007 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. diff --git a/RSPModelLib/src/config.h b/RSPModelLib/src/config.h deleted file mode 100644 index 2a1d023..0000000 --- a/RSPModelLib/src/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef CONFIG_H_ -#define CONFIG_H_ - -#define PRG_VERSION "1.0.0" - -#endif /* CONFIG_H_ */ diff --git a/RSPModelLib/src/config.h.in b/RSPModelLib/src/config.h.in deleted file mode 100644 index 3f2e0c4..0000000 --- a/RSPModelLib/src/config.h.in +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef CONFIG_H_ -#define CONFIG_H_ - -#define PRG_VERSION "@PROJECT_VERSION@" - -#endif /* CONFIG_H_ */