build(jenkins): jenkins build scripts for Windows and Ubuntu
This commit is contained in:
		
							
								
								
									
										26
									
								
								scripts/jenkins-build.cmd
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								scripts/jenkins-build.cmd
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| :: Build script | ||||
| ::   - Windows 10 | ||||
| ::   - Visual Studio 2019 | ||||
| ::   - Git | ||||
| :: | ||||
| ::  IMPORTANT!!! | ||||
| ::    Open "x64 Native Command Tool Prompt for VS 2019" as Administrator. | ||||
| :: | ||||
|  | ||||
| CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" | ||||
|  | ||||
| REM current dir - RPC source directory | ||||
| set BASE_DIR=%cd% | ||||
| set VCPKG_DIR=C:\opt\vcpkg-source | ||||
|  | ||||
| REM build RPC | ||||
| cd %BASE_DIR%/rpc | ||||
|  | ||||
| if exist "build" rd /q /s "build" | ||||
|  | ||||
| mkdir build | ||||
| cd build | ||||
| echo %VCPKG_DIR%\vcpkg\scripts\buildsystems\vcpkg.cmake | ||||
| cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=%VCPKG_DIR%\vcpkg\scripts\buildsystems\vcpkg.cmake .. | ||||
| cmake --build . --config Release | ||||
| dir %BASE_DIR%\rpc\build | ||||
							
								
								
									
										19
									
								
								scripts/jenkins-build.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								scripts/jenkins-build.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -x | ||||
|  | ||||
| # Jenkins Build script | ||||
| #   - Ubuntu 18.04 | ||||
| # | ||||
|  | ||||
| export CMAKE_CXX_FLAGS="-isystem /usr/lib/gcc/x86_64-linux-gnu/7/include" | ||||
| cd "$BASE_DIR"/rpc | ||||
|  | ||||
| if [ -d "build" ]; then | ||||
|   rm -rf build | ||||
| fi | ||||
|  | ||||
| mkdir build | ||||
| cd build | ||||
| cmake -DCMAKE_TOOLCHAIN_FILE="$BASE_DIR"/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release .. | ||||
| cmake --build . | ||||
							
								
								
									
										23
									
								
								scripts/jenkins-pre-build.cmd
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										23
									
								
								scripts/jenkins-pre-build.cmd
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| :: Build script | ||||
| ::   - Windows 10 | ||||
| ::   - Visual Studio 2019 | ||||
| ::   - Git | ||||
| :: | ||||
| ::  IMPORTANT!!! | ||||
| ::    Open "x64 Native Command Tool Prompt for VS 2019" as Administrator. | ||||
| :: | ||||
|  | ||||
| CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" | ||||
|  | ||||
| REM current dir - RPC source directory | ||||
| set VCPKG_DIR=C:\opt\vcpkg-source | ||||
|  | ||||
| cd %VCPKG_DIR% | ||||
|  | ||||
| REM build vcpkg | ||||
| git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git | ||||
| cd vcpkg | ||||
| cmd /c bootstrap-vcpkg.bat | ||||
|  | ||||
| REM install CPPRestSDK | ||||
| cmd /c vcpkg install cpprestsdk[websockets]:x64-windows-static | ||||
							
								
								
									
										19
									
								
								scripts/jenkins-pre-build.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								scripts/jenkins-pre-build.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| # Jenkins Pre Build script | ||||
| #   - Ubuntu 18.04 | ||||
| # | ||||
|  | ||||
| sudo apt install git cmake build-essential curl zip unzip tar pkg-config | ||||
|  | ||||
| ## current dir - RPC source directory | ||||
| export BASE_DIR="$PWD" | ||||
|  | ||||
| cd "$BASE_DIR"/rpc | ||||
| ## build vcpkg | ||||
| git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git | ||||
| cd vcpkg | ||||
| ./bootstrap-vcpkg.sh | ||||
|  | ||||
| ## install CPPRestSDK | ||||
| ./vcpkg install cpprestsdk[websockets] | ||||
		Reference in New Issue
	
	Block a user