Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • iMSTK/iMSTK
  • VROrthognathic/iMSTK
  • shreeraj.jadhav/iMSTK
  • armaan.sethi/iMSTK
  • nghiatruong.vn/iMSTK
  • jon-herman/iMSTK
  • NickMilef/iMSTK
  • JackCao003/iMSTK
  • Makedonskiiiiiii/iMSTK
  • rachel.clipp/iMSTK
  • islamsedibrahim/iMSTK
  • stjordanis/iMSTK
  • aaron.bray/iMSTK
  • jiapei100/iMSTK
  • nghia.truong/iMSTK
  • andrew.wilson/iMSTK
  • ryan.krattiger1/iMSTK
  • jbvimort/iMSTK
  • singchun/iMSTK
  • sjh26/iMSTK
  • jcfr/iMSTK
  • chiaradivece/iMSTK
  • ruiliang.gao/iMSTK
  • lydxlx1/iMSTK
  • jsmith3814/iMSTK
  • singh.sukhraj/iMSTK
  • ben.boeckel/imstk
  • Kh4lil/iMSTK
  • renexdev/iMSTK
  • cdeepakroy/iMSTK
  • yehan/iMSTK
  • mfermin/iMSTK-phisycalModels
  • karthikp/iMSTK
  • Nullptr/iMSTK
  • johan-andruejol/iMSTK
  • innokentiy.alaytsev/iMSTK
  • sebastian.ordas/iMSTK
  • connor.bowley/iMSTK
  • 2nafish117/iMSTK
  • sankhesh/iMSTK
  • YJonmo/iMSTK
41 results
Show changes
Commits on Source (3497)
Showing
with 496 additions and 11 deletions
.git* export-ignore
# Exclude from source archives files specific to Git work tree.
* export-ignore
config* eol=lf whitespace=indent-with-non-tab
git-* eol=lf whitespace=indent-with-non-tab
tips eol=lf whitespace=indent-with-non-tab
setup-* eol=lf whitespace=indent-with-non-tab
win32
*.pyc
*.swp
Docs/source/_build/
Docs/source/.vscode/settings.json
include:
# Metadata shared my many jobs
- local: .gitlab/rules.yml
- local: .gitlab/artifacts.yml
- local: .gitlab/documentation.yml
# OS builds.
- local: .gitlab/os-linux.yml
- local: .gitlab/os-windows.yml
stages:
- build
- test
- deploy
################################################################################
# Job declarations
#
# Each job must pull in each of the following keys:
#
# - a "base image"
# - a build script
# - tags for the jobs
# - rules for when to run the job
#
# Additionally, jobs may also contain:
#
# - artifacts
# - needs for required jobs
################################################################################
pages:
extends:
- .doc_build
- .run_on_mirror_default_branch
# Linux
## Build and test
fedora36:build:
extends:
- .fedora36
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_manually
fedora36:test:
extends:
- .fedora36
- .cmake_test_linux
- .cmake_test_artifacts
- .linux_test_tags
- .run_dependent
needs:
- fedora36:build
# Windows
## Build and test
windows-vs2022-ninja:build:
extends:
- .windows_vs2022_ninja
- .cmake_build_windows
- .cmake_build_artifacts
- .windows_builder_tags
- .run_manually
windows-vs2022-ninja:test:
extends:
- .windows_vs2022_ninja
- .cmake_test_windows
- .cmake_test_artifacts
- .windows_builder_tags
- .run_dependent
needs:
- windows-vs2022-ninja:build
# This script takes input example directory and generates markup files containing them in the output directory
import sys
import os
if len(sys.argv) < 3:
raise Exception("Too few program arguments, usage: " + sys.argv[0] + " <input example directory> <output markup directory>")
if len(sys.argv) > 3:
raise Exception("Too many program arguments.")
rootPath = sys.argv[1]
outputPath = sys.argv[2]
if not os.path.isdir(rootPath):
raise Exception("Provided input path <" + rootPath + "> does not exists or is not a directory!")
if not os.path.isdir(outputPath):
raise Exception("Provided output path <" + outputPath + "> does not exists or is not a directory!")
print("Generating Example Markup!")
print("Input Directory: ", rootPath)
print("Output Directory: ", outputPath)
def generateExampleMarkup(dirPath):
#print("Leaf Directory: ", dirPath)
exampleName = os.path.basename(dirPath)
#print("Example Name: ", exampleName)
# Check for an example descriptor file, we only generated markup docs for
# files with this md
descPath = dirPath + "/desc.md"
#print("Descriptor Path: ", descPath)
if os.path.exists(descPath):
print("Generating markup for: ", descPath)
# Create a markup file for our documentation by copying it
fileIn = open(descPath, "rt") # Read
fileOut = open(outputPath + "/" + exampleName + ".md", "wt") # Write
# Replace all inserts
for line in fileIn:
loc = line.find("[cpp_insert]:")
if loc != -1:
# Remove spaces and >
line = line[loc + 13:].replace("<", "").replace(">", "").lstrip()
#print ("line:", line)
# Read in and insert the file
fileOut.write("**" + line + "**\n")
fileOut.write("```cpp\n")
exampleFileIn = open(dirPath + "/" + line, mode="r")
fileOut.write(exampleFileIn.read())
fileOut.write("\n```\n")
else:
fileOut.write(line)
return
# For every subdirectory (include childs of childs)
for x in os.walk(rootPath):
#print("Checking: ", x[0])
# Check if the directory has any child directories
if len(x[1]) == 0:
#print("is leaf")
generateExampleMarkup(x[0])
\ No newline at end of file
# This script takes input mkdocs.yml file and generates a navigation
# This exists because auto sorted subdirectories are not possible so one
# either has to manually write the nav or have mkdoc generate the whole
# thing alphabetically sorted
import sys
import os
if len(sys.argv) < 4:
raise Exception("Too few program arguments, usage: " + sys.argv[0] + " <input docs directory> <input yml file> <output yml file>")
if len(sys.argv) > 4:
raise Exception("Too many program arguments.")
inputDocDir = sys.argv[1]
inputYmlFile = sys.argv[2]
outputYmlFile = sys.argv[3]
# Check inputs
if not os.path.isdir(inputDocDir):
raise Exception("Provided input directory <" + inputDocDir + "> does not exists or is not a directory!")
if not os.path.exists(inputYmlFile):
raise Exception("Provided input yml file <" + inputYmlFile + "> does not exists!")
print("Generating Yml!")
print("inputDocDir: ", inputDocDir)
print("inputYmlFile: ", inputYmlFile)
print("outputYmlFile: ", outputYmlFile)
isSameFile = (inputYmlFile == outputYmlFile)
if isSameFile:
outputYmlFile = outputYmlFile.replace(".yml", "") + "_output.yml"
# Read the input file and write to out
fileOut = open(outputYmlFile, "wt") # Write
fileIn = open(inputYmlFile, mode="rt")
# Find the line that contains the about the examples page
for line in fileIn:
loc = line.find("About the Examples")
if loc == -1:
fileOut.write(line)
else:
fileOut.write(line)
# For every file (which should be an example md file) in the examples directory
exampleDirPath = inputDocDir + "/Examples/"
for x in os.walk(exampleDirPath):
for filename in x[2]:
print("filename: ", filename)
fileNameNoExt = filename.replace(".md", "")
fileOut.write(" - " + fileNameNoExt + ": 'Examples/" + filename + "'\n")
break
if isSameFile:
os.rename(outputYmlFile, inputYmlFile)
\ No newline at end of file
# Lists of paths for artifacts of various stages.
.cmake_build_artifacts:
artifacts:
expire_in: 1d
when: always
reports:
annotations:
- build/annotations.json
paths:
# The artifacts of the build.
- build/install/
# CTest files.
- build/CTestCustom*.cmake
- build/CTestTestfile.cmake
- build/**/CTestTestfile.cmake
- build/imstkCTestAddInnerbuild.cmake
- build/Testing/
# Files used in the test suite.
- build/**/*_include.cmake
- build/Innerbuild/uncrustify.list
- build/Innerbuild/Source/*/Testing/*Tests
- build/Innerbuild/Source/*/Testing/*Tests.exe
- build/Innerbuild/Source/*/VisualTesting/*Tests
- build/Innerbuild/Source/*/VisualTesting/*Tests.exe
- build/Innerbuild/Testing/iMSTKExternalProjectTemplate/iMSTKProject
# Build tree SDK
- build/Innerbuild/iMSTK*.cmake
- build/Innerbuild/Source/*/*.lib
- build/Innerbuild/Source/*/*.a
# CDash files.
- build/DartConfiguration.tcl
- build/cdash-build-id
.cmake_test_artifacts:
artifacts:
expire_in: 1d
when: always
reports:
annotations:
- build/annotations.json
junit:
- build/junit.xml
.cdash-token
{
"latest-master": [
{ "group": "master", "site": "gitlab-ci", "buildname": "iMSTK-windows_vs2022_ninja" },
{ "group": "master", "site": "gitlab-ci", "buildname": "iMSTK-fedora36" }
]
}
$erroractionpreference = "stop"
$version = "3.23.1"
$sha256sum = "9B509CC4EB7191DC128CFA3F2170036F9CBC7D9D5F93FF7FAFC5B2D77B3B40DC"
$filename = "cmake-$version-windows-x86_64"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
exit 1
}
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
Move-Item -Path "$outdir\$filename" -Destination "$outdir\cmake"
#!/bin/sh
set -e
readonly version="3.23.1"
case "$( uname -s )" in
Linux)
shatool="sha256sum"
sha256sum="f3c654b2e226b9d43369e0bd8487c51618d4dbe5a1af929dd32af7e6ca432d60"
platform="linux-x86_64"
;;
Darwin)
shatool="shasum -a 256"
sha256sum="f794ed92ccb4e9b6619a77328f313497d7decf8fb7e047ba35a348b838e0e1e2"
platform="macos-universal"
;;
*)
echo "Unrecognized platform $( uname -s )"
exit 1
;;
esac
readonly shatool
readonly sha256sum
readonly platform
readonly filename="cmake-$version-$platform"
readonly tarball="$filename.tar.gz"
cd .gitlab
echo "$sha256sum $tarball" > cmake.sha256sum
curl -OL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball"
$shatool --check cmake.sha256sum
tar xf "$tarball"
mv "$filename" cmake
if [ "$( uname -s )" = "Darwin" ]; then
ln -s CMake.app/Contents/bin cmake/bin
fi
set(CTEST_USE_LAUNCHERS "ON" CACHE STRING "")
# Something in iMSTK is not letting `CTEST_BUILD_CONFIGURATION` work. Just set
# it to something here instead.
set(build_type "Release")
if (NOT "$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
set(build_type "$ENV{CMAKE_BUILD_TYPE}")
endif ()
set(CMAKE_BUILD_TYPE "${build_type}" CACHE STRING "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_sccache.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
set(CMAKE_C_COMPILER_LAUNCHER "sccache" CACHE STRING "")
set(CMAKE_CXX_COMPILER_LAUNCHER "sccache" CACHE STRING "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
set(iMSTK_USE_VRPN ON CACHE BOOL "")
\ No newline at end of file
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows.cmake")
function (ctest_annotation_report file)
set(label "")
if (EXISTS "${file}")
file(READ "${file}" json)
else ()
set(json "{\"CDash\": []}")
endif ()
foreach (arg IN LISTS ARGN)
if (NOT label)
set(label "${arg}")
continue ()
endif ()
set(item "{\"external_link\":{\"label\":\"${label}\",\"url\":\"${arg}\"}}")
set(label "")
string(JSON length LENGTH "${json}" "CDash")
string(JSON json SET "${json}" "CDash" "${length}" "${item}")
endforeach ()
file(WRITE "${file}" "${json}")
endfunction ()
if (NOT DEFINED build_id)
include("${CTEST_BINARY_DIRECTORY}/cdash-build-id" OPTIONAL)
endif ()
function (store_build_id build_id)
file(WRITE "${CTEST_BINARY_DIRECTORY}/cdash-build-id"
"set(build_id \"${build_id}\")\n")
endfunction ()
cmake_minimum_required(VERSION 3.8)
include("${CMAKE_CURRENT_LIST_DIR}/gitlab_ci.cmake")
# Read the files from the build directory.
ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
# Pick up from where the configure left off.
ctest_start(APPEND)
if (CTEST_CMAKE_GENERATOR STREQUAL "Unix Makefiles")
include(ProcessorCount)
ProcessorCount(nproc)
set(CTEST_BUILD_FLAGS "-j${nproc}")
endif ()
ctest_build(
NUMBER_WARNINGS num_warnings
RETURN_VALUE build_result)
ctest_submit(PARTS Build)
include("${CMAKE_CURRENT_LIST_DIR}/ctest_annotation.cmake")
if (DEFINED build_id)
ctest_annotation_report("${CTEST_BINARY_DIRECTORY}/annotations.json"
"Build Errors (${num_errors})" "https://open.cdash.org/viewBuildError.php?buildid=${build_id}"
"Build Warnings (${num_warnings})" "https://open.cdash.org/viewBuildError.php?type=1&buildid=${build_id}"
)
endif ()
if (build_result)
message(FATAL_ERROR
"Failed to build")
endif ()
if ("$ENV{CTEST_NO_WARNINGS_ALLOWED}" AND num_warnings GREATER 0)
message(FATAL_ERROR
"Found ${num_warnings} warnings (treating as fatal).")
endif ()
cmake_minimum_required(VERSION 3.8)
include("${CMAKE_CURRENT_LIST_DIR}/gitlab_ci.cmake")
set(cmake_args
-C "${CMAKE_CURRENT_LIST_DIR}/configure_$ENV{CMAKE_CONFIGURATION}.cmake")
# Create an entry in CDash.
ctest_start(Experimental TRACK "${ctest_track}")
# Gather update information.
find_package(Git)
set(CTEST_UPDATE_VERSION_ONLY ON)
set(CTEST_UPDATE_COMMAND "${GIT_EXECUTABLE}")
ctest_update()
# Configure the project.
ctest_configure(
OPTIONS "${cmake_args}"
RETURN_VALUE configure_result)
# Read the files from the build directory.
ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
# We can now submit because we've configured. This is a cmb-superbuild-ism.
ctest_submit(PARTS Update)
ctest_submit(
PARTS Configure
BUILD_ID build_id)
include("${CMAKE_CURRENT_LIST_DIR}/ctest_annotation.cmake")
if (DEFINED build_id)
ctest_annotation_report("${CTEST_BINARY_DIRECTORY}/annotations.json"
"Build Summary" "https://open.cdash.org/build/${build_id}"
"Update" "https://open.cdash.org/build/${build_id}/update"
"Configure" "https://open.cdash.org/build/${build_id}/configure"
)
store_build_id("${build_id}")
endif ()
if (configure_result)
message(FATAL_ERROR
"Failed to configure")
endif ()
set(test_exclusions)
string(REPLACE ";" "|" test_exclusions "${test_exclusions}")
if (test_exclusions)
set(test_exclusions "(${test_exclusions})")
endif ()
cmake_minimum_required(VERSION 3.8)
include("${CMAKE_CURRENT_LIST_DIR}/gitlab_ci.cmake")
# Read the files from the build directory.
ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
# Pick up from where the configure left off.
ctest_start(APPEND)
include(ProcessorCount)
ProcessorCount(nproc)
include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake")
ctest_test(
PARALLEL_LEVEL "${nproc}"
RETURN_VALUE test_result
EXCLUDE "${test_exclusions}"
OUTPUT_JUNIT "${CTEST_BINARY_DIRECTORY}/junit.xml")
file(GLOB packages
"${CTEST_BINARY_DIRECTORY}/PluginTests/*/build/plugin/build/*.tar.gz")
if (NOT packages STREQUAL "")
ctest_upload(FILES ${packages})
endif()
ctest_submit(PARTS Test)
include("${CMAKE_CURRENT_LIST_DIR}/ctest_annotation.cmake")
if (DEFINED build_id)
ctest_annotation_report("${CTEST_BINARY_DIRECTORY}/annotations.json"
"Build Summary" "https://open.cdash.org/build/${build_id}"
"All Tests" "https://open.cdash.org/viewTest.php?buildid=${build_id}"
"Test Failures" "https://open.cdash.org/viewTest.php?onlyfailed&buildid=${build_id}"
"Tests Not Run" "https://open.cdash.org/viewTest.php?onlynotrun&buildid=${build_id}"
"Test Passes" "https://open.cdash.org/viewTest.php?onlypassed&buildid=${build_id}"
)
endif ()
if (test_result)
message(FATAL_ERROR
"Failed to test")
endif ()