|
@@ -28,8 +28,6 @@ try {
|
|
|
New-Item -Force -ItemType directory -Path "C:\Tools\vcpkg\installed\x86-windows-static"
|
|
|
}
|
|
|
|
|
|
- $make_cmd = "& $env:MAKE"
|
|
|
-
|
|
|
# Collect files for .zip packing
|
|
|
New-Item -ItemType directory -Path pack
|
|
|
Copy-Item LICENSE pack
|
|
@@ -37,12 +35,13 @@ try {
|
|
|
Copy-Item README.md pack
|
|
|
|
|
|
Write-Host -ForegroundColor Green "`n###################################################################"
|
|
|
- Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME #####`n"
|
|
|
+ Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME with amalgamation #####`n"
|
|
|
New-Item -ItemType directory -Path "build"
|
|
|
cd build
|
|
|
- & cmake $vcpkg_toolchain $vcpkg_triplet -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX `
|
|
|
- -DUA_ENABLE_ENCRYPTION:BOOL=$build_encryption -G"$env:GENERATOR" ..
|
|
|
- Invoke-Expression $make_cmd
|
|
|
+ & cmake $vcpkg_toolchain $vcpkg_triplet -DUA_BUILD_EXAMPLES:BOOL=OFF -DUA_ENABLE_AMALGAMATION:BOOL=ON `
|
|
|
+ -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX `
|
|
|
+ -DUA_ENABLE_ENCRYPTION:BOOL=$build_encryption -DCMAKE_BUILD_TYPE=RelWithDebInfo -G"$env:GENERATOR" ..
|
|
|
+ & cmake --build . --config RelWithDebInfo
|
|
|
if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
|
|
|
Write-Host -ForegroundColor Red "`n`n*** Make failed. Exiting ... ***"
|
|
|
exit $LASTEXITCODE
|
|
@@ -54,8 +53,10 @@ try {
|
|
|
Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME with full NS0 #####`n"
|
|
|
New-Item -ItemType directory -Path "build"
|
|
|
cd build
|
|
|
- & cmake -DUA_ENABLE_SUBSCRIPTIONS_EVENTS:BOOL=ON -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_NAMESPACE_ZERO:STRING=FULL -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX -G"$env:GENERATOR" ..
|
|
|
- Invoke-Expression $make_cmd
|
|
|
+ & cmake -DUA_ENABLE_SUBSCRIPTIONS_EVENTS:BOOL=ON -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_NAMESPACE_ZERO:STRING=FULL `
|
|
|
+ -DUA_ENABLE_PUBSUB:BOOL=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL:BOOL=ON -DUA_ENABLE_PUBSUB_DELTAFRAMES:BOOL=ON `
|
|
|
+ -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX -DCMAKE_BUILD_TYPE=RelWithDebInfo -G"$env:GENERATOR" ..
|
|
|
+ & cmake --build . --config RelWithDebInfo
|
|
|
if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
|
|
|
Write-Host -ForegroundColor Red "`n`n*** Make failed. Exiting ... ***"
|
|
|
exit $LASTEXITCODE
|
|
@@ -64,71 +65,49 @@ try {
|
|
|
Remove-Item -Path build -Recurse -Force
|
|
|
|
|
|
Write-Host -ForegroundColor Green "`n###################################################################"
|
|
|
- Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME with PubSub #####`n"
|
|
|
+ Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME without amalgamation #####`n"
|
|
|
New-Item -ItemType directory -Path "build"
|
|
|
cd build
|
|
|
- & cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_PUBSUB:BOOL=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL:BOOL=ON `
|
|
|
- -DUA_ENABLE_PUBSUB_DELTAFRAMES:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX -G"$env:GENERATOR" ..
|
|
|
- Invoke-Expression $make_cmd
|
|
|
- if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
|
|
|
- Write-Host -ForegroundColor Red "`n`n*** Make failed. Exiting ... ***"
|
|
|
+ & cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=OFF `
|
|
|
+ -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
|
|
+ -G"$env:GENERATOR" `
|
|
|
+ -DCMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER-$env:CC_SHORTNAME-static" ..
|
|
|
+ & cmake --build . --target install --config RelWithDebInfo
|
|
|
+ if ($LASTEXITCODE -and $LASTEXITCODE -ne 0)
|
|
|
+ {
|
|
|
+ Write-Host -ForegroundColor Red "`n`n*** Make install failed. Exiting ... ***"
|
|
|
exit $LASTEXITCODE
|
|
|
}
|
|
|
cd ..
|
|
|
- Remove-Item -Path build -Recurse -Force
|
|
|
-
|
|
|
- Write-Host -ForegroundColor Green "`n###################################################################"
|
|
|
- Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME with amalgamation #####`n"
|
|
|
- New-Item -ItemType directory -Path "build"
|
|
|
- cd build
|
|
|
- & cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON `
|
|
|
- -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX -DBUILD_SHARED_LIBS:BOOL=OFF -G"$env:GENERATOR" ..
|
|
|
- Invoke-Expression $make_cmd
|
|
|
- if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
|
|
|
- Write-Host -ForegroundColor Red "`n`n*** Make failed. Exiting ... ***"
|
|
|
+ & 7z a -tzip open62541-$env:CC_SHORTNAME-static.zip "$env:APPVEYOR_BUILD_FOLDER\pack\*" "$env:APPVEYOR_BUILD_FOLDER-$env:CC_SHORTNAME-static\*"
|
|
|
+ if ($LASTEXITCODE -and $LASTEXITCODE -ne 0)
|
|
|
+ {
|
|
|
+ Write-Host -ForegroundColor Red "`n`n*** Zipping failed. Exiting ... ***"
|
|
|
exit $LASTEXITCODE
|
|
|
}
|
|
|
- cd ..
|
|
|
- New-Item -ItemType directory -Path pack_tmp
|
|
|
- Move-Item -Path "build\open62541.c" -Destination pack_tmp\
|
|
|
- Move-Item -Path "build\open62541.h" -Destination pack_tmp\
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_EXAMPLES\server_ctt.exe" -Destination pack_tmp\
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_EXAMPLES\client.exe" -Destination pack_tmp\
|
|
|
- if ($env:CC_SHORTNAME -eq "mingw" -or $env:CC_SHORTNAME -eq "clang-mingw") {
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_LIB\libopen62541.a" -Destination pack_tmp\
|
|
|
- } else {
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_LIB\open62541.lib" -Destination pack_tmp\
|
|
|
- }
|
|
|
- & 7z a -tzip open62541-$env:CC_SHORTNAME-static.zip "$env:APPVEYOR_BUILD_FOLDER\pack\*" "$env:APPVEYOR_BUILD_FOLDER\pack_tmp\*"
|
|
|
- Remove-Item -Path pack_tmp -Recurse -Force
|
|
|
Remove-Item -Path build -Recurse -Force
|
|
|
|
|
|
Write-Host -ForegroundColor Green "`n###################################################################"
|
|
|
- Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME with amalgamation and .dll #####`n"
|
|
|
+ Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME (.dll) #####`n"
|
|
|
New-Item -ItemType directory -Path "build"
|
|
|
cd build
|
|
|
- & cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON `
|
|
|
- -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX -DBUILD_SHARED_LIBS:BOOL=ON -G"$env:GENERATOR" ..
|
|
|
- Invoke-Expression $make_cmd
|
|
|
- if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
|
|
|
- Write-Host -ForegroundColor Red "`n`n*** Make failed. Exiting ... ***"
|
|
|
+ & cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=OFF `
|
|
|
+ -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
|
|
+ -G"$env:GENERATOR" `
|
|
|
+ -DCMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER-$env:CC_SHORTNAME-dynamic" ..
|
|
|
+ & cmake --build . --target install --config RelWithDebInfo
|
|
|
+ if ($LASTEXITCODE -and $LASTEXITCODE -ne 0)
|
|
|
+ {
|
|
|
+ Write-Host -ForegroundColor Red "`n`n*** Make install failed. Exiting ... ***"
|
|
|
exit $LASTEXITCODE
|
|
|
}
|
|
|
cd ..
|
|
|
- New-Item -ItemType directory -Path pack_tmp
|
|
|
- Move-Item -Path "build\open62541.c" -Destination pack_tmp\
|
|
|
- Move-Item -Path "build\open62541.h" -Destination pack_tmp\
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_EXAMPLES\server_ctt.exe" -Destination pack_tmp\
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_EXAMPLES\client.exe" -Destination pack_tmp\
|
|
|
- if ($env:CC_SHORTNAME -eq "mingw" -or $env:CC_SHORTNAME -eq "clang-mingw") {
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_LIB\libopen62541.dll" -Destination pack_tmp\
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_LIB\libopen62541.dll.a" -Destination pack_tmp\
|
|
|
- } else {
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_LIB\open62541.dll" -Destination pack_tmp\
|
|
|
- Move-Item -Path "build\$env:OUT_DIR_LIB\open62541.pdb" -Destination pack_tmp\
|
|
|
+ & 7z a -tzip open62541-$env:CC_SHORTNAME-dynamic.zip "$env:APPVEYOR_BUILD_FOLDER\pack\*" "$env:APPVEYOR_BUILD_FOLDER-$env:CC_SHORTNAME-static\*"
|
|
|
+ if ($LASTEXITCODE -and $LASTEXITCODE -ne 0)
|
|
|
+ {
|
|
|
+ Write-Host -ForegroundColor Red "`n`n*** Zipping failed. Exiting ... ***"
|
|
|
+ exit $LASTEXITCODE
|
|
|
}
|
|
|
- & 7z a -tzip open62541-$env:CC_SHORTNAME-dynamic.zip "$env:APPVEYOR_BUILD_FOLDER\pack\*" "$env:APPVEYOR_BUILD_FOLDER\pack_tmp\*"
|
|
|
- Remove-Item -Path pack_tmp -Recurse -Force
|
|
|
Remove-Item -Path build -Recurse -Force
|
|
|
|
|
|
# Only execute unit tests on vs2017 to save compilation time
|
|
@@ -137,11 +116,12 @@ try {
|
|
|
Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME with unit tests #####`n"
|
|
|
New-Item -ItemType directory -Path "build"
|
|
|
cd build
|
|
|
- & cmake $vcpkg_toolchain $vcpkg_triplet -DCMAKE_BUILD_TYPE=Debug -DUA_BUILD_EXAMPLES=OFF -DUA_ENABLE_DISCOVERY=ON `
|
|
|
- -DUA_ENABLE_DISCOVERY_MULTICAST=ON -DUA_ENABLE_ENCRYPTION:BOOL=$build_encryption -DUA_BUILD_UNIT_TESTS=ON `
|
|
|
- -DUA_ENABLE_PUBSUB:BOOL=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL:BOOL=ON -DUA_ENABLE_PUBSUB_DELTAFRAMES:BOOL=ON `
|
|
|
- -DUA_ENABLE_UNIT_TESTS_MEMCHECK=ON -DCHECK_PREFIX=c:\check -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX -G"$env:CC_NAME" ..
|
|
|
- Invoke-Expression $make_cmd
|
|
|
+ & cmake $vcpkg_toolchain $vcpkg_triplet -DUA_BUILD_EXAMPLES=OFF -DUA_ENABLE_DISCOVERY=ON `
|
|
|
+ -DUA_ENABLE_DISCOVERY_MULTICAST=ON -DUA_ENABLE_ENCRYPTION:BOOL=$build_encryption -DUA_BUILD_UNIT_TESTS=ON `
|
|
|
+ -DUA_ENABLE_PUBSUB:BOOL=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL:BOOL=ON -DUA_ENABLE_PUBSUB_DELTAFRAMES:BOOL=ON `
|
|
|
+ -DUA_ENABLE_UNIT_TESTS_MEMCHECK=ON -DCHECK_PREFIX=c:\check -DUA_COMPILE_AS_CXX:BOOL=$env:FORCE_CXX `
|
|
|
+ -DCMAKE_BUILD_TYPE=Debug -G"$env:CC_NAME" ..
|
|
|
+ & cmake --build . --config Debug
|
|
|
if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
|
|
|
Write-Host -ForegroundColor Red "`n`n*** Make failed. Exiting ... ***"
|
|
|
exit $LASTEXITCODE
|