Added CI control over PR #6
@ -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
|
||||
find_package(ZLIB 1.2.11 EXACT REQUIRED)
|
||||
find_package(ZLIB 1.2.12 REQUIRED)
|
||||
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})
|
||||
#find_package(GLEW REQUIRED) # Enable when GL rendering is ready
|
||||
#include_directories(${GLEW_INCLUDE_DIR})
|
||||
|
156
Jenkinsfile
vendored
156
Jenkinsfile
vendored
@ -1,80 +1,80 @@
|
||||
pipeline {
|
||||
agent any
|
||||
options {
|
||||
skipDefaultCheckout(true)
|
||||
}
|
||||
environment {
|
||||
CI_OUTPUT_NAME = "RSE_Map"
|
||||
CI_VERSION = "1.0.1"
|
||||
CI_BUILD_NUMBER = "$BUILD_NUMBER"
|
||||
}
|
||||
stages {
|
||||
stage('Prepare') {
|
||||
steps {
|
||||
cleanWs()
|
||||
rtConanClient(id: "conan", userHome: "/home/jackcartersmith")
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
parallel(
|
||||
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']]])
|
||||
sh 'git submodule update --init --recursive'
|
||||
dir("build") {
|
||||
rtConanRun(clientId: "conan", command: "install .. --build missing")
|
||||
}
|
||||
cmakeBuild buildDir: 'build', installation: 'latest', steps: [[args: 'all']]
|
||||
}
|
||||
},
|
||||
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']]])
|
||||
sh 'git submodule update --init --recursive'
|
||||
dir("build") {
|
||||
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']]
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
dir("zip_linux") {
|
||||
sh 'cp ../linux/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .'
|
||||
}
|
||||
dir("zip_win") {
|
||||
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'
|
||||
sh 'mv x64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.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'
|
||||
archiveArtifacts(artifacts: '*.zip')
|
||||
fingerprint(targets: '*.zip')
|
||||
}
|
||||
}
|
||||
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'
|
||||
archiveArtifacts(artifacts: '*.gpg')
|
||||
fingerprint(targets: '*.gpg')
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
post {
|
||||
always {
|
||||
cleanWs(cleanWhenNotBuilt: false,
|
||||
deleteDirs: true,
|
||||
disableDeferredWipeout: true,
|
||||
notFailBuild: true)
|
||||
}
|
||||
}
|
||||
*/
|
||||
agent any
|
||||
options {
|
||||
skipDefaultCheckout(true)
|
||||
}
|
||||
environment {
|
||||
CI_OUTPUT_NAME = "RSE_Terrain"
|
||||
CI_VERSION = "1.0.0"
|
||||
CI_BUILD_NUMBER = "$BUILD_NUMBER"
|
||||
}
|
||||
stages {
|
||||
stage('Prepare') {
|
||||
steps {
|
||||
cleanWs()
|
||||
rtConanClient(id: "conan", userHome: "/home/jackcartersmith")
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
parallel(
|
||||
linux: {
|
||||
dir("linux") {
|
||||
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'
|
||||
dir("build") {
|
||||
rtConanRun(clientId: "conan", command: "install .. --build missing")
|
||||
}
|
||||
cmakeBuild buildDir: 'build', installation: 'latest', steps: [[args: 'all']]
|
||||
}
|
||||
},
|
||||
windows: {
|
||||
dir("windows") {
|
||||
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'
|
||||
dir("build") {
|
||||
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']]
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
dir("zip_linux") {
|
||||
sh 'cp ../linux/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .'
|
||||
}
|
||||
dir("zip_win") {
|
||||
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'
|
||||
sh 'mv x64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.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'
|
||||
archiveArtifacts(artifacts: '*.zip')
|
||||
fingerprint(targets: '*.zip')
|
||||
}
|
||||
}
|
||||
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'
|
||||
archiveArtifacts(artifacts: '*.gpg')
|
||||
fingerprint(targets: '*.gpg')
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
post {
|
||||
always {
|
||||
cleanWs(cleanWhenNotBuilt: false,
|
||||
deleteDirs: true,
|
||||
disableDeferredWipeout: 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.**
|
||||
|
||||
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:
|
||||
|
||||
@ -60,12 +61,30 @@ make
|
||||
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):
|
||||
|
||||
```shell
|
||||
mkdir build && cd build
|
||||
cmake -DGNU_HOST=x86_64-w64-mingw32 \
|
||||
-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 .
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
[requires]
|
||||
zlib/1.2.11
|
||||
zlib/1.2.12
|
||||
libpng/1.6.37
|
||||
glew/2.2.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user