Merge pull request 'Added CI control over PR' (#6) from develop into master
All checks were successful
JCS-Prod/RSE-Terrain/pipeline/head This commit looks good
All checks were successful
JCS-Prod/RSE-Terrain/pipeline/head This commit looks good
Reviewed-on: #6
This commit is contained in:
commit
7dc3125504
@ -34,9 +34,9 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_SOURC
|
|||||||
|
|
||||||
|
|
||||||
# Import needed packages and references their include path
|
# Import needed packages and references their include path
|
||||||
find_package(ZLIB 1.2.11 EXACT REQUIRED)
|
find_package(ZLIB 1.2.12 REQUIRED)
|
||||||
include_directories(${ZLIB_INCLUDE_DIR})
|
include_directories(${ZLIB_INCLUDE_DIR})
|
||||||
find_package(PNG 1.6.37 EXACT REQUIRED)
|
find_package(PNG 1.6.37 REQUIRED)
|
||||||
include_directories(${PNG_INCLUDE_DIR})
|
include_directories(${PNG_INCLUDE_DIR})
|
||||||
#find_package(GLEW REQUIRED) # Enable when GL rendering is ready
|
#find_package(GLEW REQUIRED) # Enable when GL rendering is ready
|
||||||
#include_directories(${GLEW_INCLUDE_DIR})
|
#include_directories(${GLEW_INCLUDE_DIR})
|
||||||
|
156
Jenkinsfile
vendored
156
Jenkinsfile
vendored
@ -1,80 +1,80 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
options {
|
options {
|
||||||
skipDefaultCheckout(true)
|
skipDefaultCheckout(true)
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
CI_OUTPUT_NAME = "RSE_Map"
|
CI_OUTPUT_NAME = "RSE_Terrain"
|
||||||
CI_VERSION = "1.0.1"
|
CI_VERSION = "1.0.0"
|
||||||
CI_BUILD_NUMBER = "$BUILD_NUMBER"
|
CI_BUILD_NUMBER = "$BUILD_NUMBER"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Prepare') {
|
stage('Prepare') {
|
||||||
steps {
|
steps {
|
||||||
cleanWs()
|
cleanWs()
|
||||||
rtConanClient(id: "conan", userHome: "/home/jackcartersmith")
|
rtConanClient(id: "conan", userHome: "/home/jackcartersmith")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
parallel(
|
parallel(
|
||||||
linux: {
|
linux: {
|
||||||
dir("linux") {
|
dir("linux") {
|
||||||
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Map'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Map.git']]])
|
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Terrain'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Terrain.git']]])
|
||||||
sh 'git submodule update --init --recursive'
|
sh 'git submodule update --init --recursive'
|
||||||
dir("build") {
|
dir("build") {
|
||||||
rtConanRun(clientId: "conan", command: "install .. --build missing")
|
rtConanRun(clientId: "conan", command: "install .. --build missing")
|
||||||
}
|
}
|
||||||
cmakeBuild buildDir: 'build', installation: 'latest', steps: [[args: 'all']]
|
cmakeBuild buildDir: 'build', installation: 'latest', steps: [[args: 'all']]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
windows: {
|
windows: {
|
||||||
dir("windows") {
|
dir("windows") {
|
||||||
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Map'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Map.git']]])
|
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Terrain'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Terrain.git']]])
|
||||||
sh 'git submodule update --init --recursive'
|
sh 'git submodule update --init --recursive'
|
||||||
dir("build") {
|
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']]
|
cmakeBuild buildDir: 'build', cmakeArgs: '-DGNU_HOST=x86_64-w64-mingw32 -DCMAKE_TOOLCHAIN_FILE=../mingw_cross_toolchain.cmake', installation: 'latest', steps: [[args: 'all']]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
steps {
|
steps {
|
||||||
dir("zip_linux") {
|
dir("zip_linux") {
|
||||||
sh 'cp ../linux/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .'
|
sh 'cp ../linux/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .'
|
||||||
}
|
}
|
||||||
dir("zip_win") {
|
dir("zip_win") {
|
||||||
sh 'cp ../windows/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* ../windows/build/*.dll .'
|
sh 'cp ../windows/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* ../windows/build/*.dll .'
|
||||||
}
|
}
|
||||||
zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'x64.zip'
|
zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'x64.zip'
|
||||||
sh 'mv x64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip'
|
sh 'mv x64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip'
|
||||||
zip archive: false, dir: 'zip_win', exclude: '', glob: '', zipFile: 'mingw64.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')
|
archiveArtifacts(artifacts: '*.zip')
|
||||||
fingerprint(targets: '*.zip')
|
fingerprint(targets: '*.zip')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Sign') {
|
stage('Sign') {
|
||||||
steps {
|
steps {
|
||||||
sh 'ls -l'
|
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}_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}_mingw64.zip.gpg ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip'
|
||||||
archiveArtifacts(artifacts: '*.gpg')
|
archiveArtifacts(artifacts: '*.gpg')
|
||||||
fingerprint(targets: '*.gpg')
|
fingerprint(targets: '*.gpg')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
cleanWs(cleanWhenNotBuilt: false,
|
cleanWs(cleanWhenNotBuilt: false,
|
||||||
deleteDirs: true,
|
deleteDirs: true,
|
||||||
disableDeferredWipeout: true,
|
disableDeferredWipeout: true,
|
||||||
notFailBuild: true)
|
notFailBuild: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
21
README.md
21
README.md
@ -50,7 +50,8 @@ Due to issue with copyrights, I can't provide samples... You need to extract HOB
|
|||||||
|
|
||||||
:mega: **MSVC compatibility is in progress. Not working for now but you can try to fix error by yourself.**
|
:mega: **MSVC compatibility is in progress. Not working for now but you can try to fix error by yourself.**
|
||||||
|
|
||||||
You can compile on both Windows (MinGW) or native Linux system thanks to CMake.
|
You can compile on both Windows (MinGW) or native Linux system thanks to CMake, you only need to adjust your dependencies on Windows or use Conan packages manager (https://conan.io).
|
||||||
|
zlib-dev (zlib1g-dev) and libpng16-dev distrib packages can be used on debian/ubuntu.
|
||||||
|
|
||||||
To compile, just clone (**don't forget git submodules**) and launch cmake:
|
To compile, just clone (**don't forget git submodules**) and launch cmake:
|
||||||
|
|
||||||
@ -60,12 +61,30 @@ make
|
|||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
On Windows system, I can suggest you to use Conan support to help you with dependencies:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
conan install .. --build=missing
|
||||||
|
cmake .. -G "MinGW Makefiles"
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to do it manually without Conan support, you will probably need to specify the dependency flags for CMake. Ex:
|
||||||
|
|
||||||
|
`cmake.exe -D"ZLIB_INCLUDE_DIR=zlib/1.2.11/include" -D"ZLIB_LIBRARY=zlib/1.2.11/lib/libzlib.dll.a" -D"PNG_PNG_INCLUDE_DIR=libpng/1.6.37/include" -D"PNG_LIBRARY=libpng/1.6.37/lib/libpng.dll.a" . -G "MinGW Makefiles"`
|
||||||
|
|
||||||
We can also use cross-compilation (after installing `mingw64` and `cmake` packages on your distrib):
|
We can also use cross-compilation (after installing `mingw64` and `cmake` packages on your distrib):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -DGNU_HOST=x86_64-w64-mingw32 \
|
cmake -DGNU_HOST=x86_64-w64-mingw32 \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=../mingw_cross_toolchain.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=../mingw_cross_toolchain.cmake \
|
||||||
|
-D"ZLIB_INCLUDE_DIR=zlib/1.2.11/include" \
|
||||||
|
-D"ZLIB_LIBRARY=zlib/1.2.11/lib/libzlib.dll.a" \
|
||||||
|
-D"PNG_PNG_INCLUDE_DIR=libpng/1.6.37/include" \
|
||||||
|
-D"PNG_LIBRARY=libpng/1.6.37/lib/libpng.dll.a" \
|
||||||
..
|
..
|
||||||
cmake --build .
|
cmake --build .
|
||||||
```
|
```
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[requires]
|
[requires]
|
||||||
zlib/1.2.11
|
zlib/1.2.12
|
||||||
libpng/1.6.37
|
libpng/1.6.37
|
||||||
glew/2.2.0
|
glew/2.2.0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user