From 3f45cfc2b34b3402faf41b15dd9b9cd6a72a440b Mon Sep 17 00:00:00 2001 From: Nicholas Bianco Date: Tue, 18 Jun 2024 15:19:18 -0700 Subject: [PATCH 1/3] Add CMake option to temporarily disable Java tests in CI --- .github/workflows/continuous_integration.yml | 2 +- Bindings/Java/CMakeLists.txt | 2 +- CMakeLists.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index dbf87c5266..a53070395a 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -217,7 +217,7 @@ jobs: # TODO: Can remove /WX when we use that in CMakeLists.txt. # Set the CXXFLAGS environment variable to turn warnings into errors. # Skip timing test section included by default. - cmake -E env CXXFLAGS="/WX -DSKIP_TIMING" cmake $env:GITHUB_WORKSPACE -LAH -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=~/opensim-core-install -DOPENSIM_DEPENDENCIES_DIR=~/opensim_dependencies_install -DOPENSIM_C3D_PARSER=ezc3d -DBUILD_PYTHON_WRAPPING=on -DBUILD_JAVA_WRAPPING=on -DPython3_ROOT_DIR=C:\hostedtoolcache\windows\Python\3.10.11\x64 + cmake -E env CXXFLAGS="/WX -DSKIP_TIMING" cmake $env:GITHUB_WORKSPACE -LAH -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=~/opensim-core-install -DOPENSIM_DEPENDENCIES_DIR=~/opensim_dependencies_install -DOPENSIM_C3D_PARSER=ezc3d -DBUILD_PYTHON_WRAPPING=on -DBUILD_JAVA_WRAPPING=on -DBUILD_JAVA_TESTING=off -DPython3_ROOT_DIR=C:\hostedtoolcache\windows\Python\3.10.11\x64 $env:match = cmake -L . | Select-String -Pattern OPENSIM_QUALIFIED_VERSION $version = $env:match.split('=')[1] echo $version diff --git a/Bindings/Java/CMakeLists.txt b/Bindings/Java/CMakeLists.txt index 02cf73a330..082e4ac5b3 100644 --- a/Bindings/Java/CMakeLists.txt +++ b/Bindings/Java/CMakeLists.txt @@ -136,7 +136,7 @@ install(FILES "${SWIG_JAVA_JAR_BUILD_OUTPUT_PATH}" # Java tests. # ----------- -if(BUILD_TESTING) +if(BUILD_TESTING AND BUILD_JAVA_TESTING) # Now actually add the tests. add_subdirectory(tests) endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index b228f4dbd7..4dd1b83009 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,6 +187,7 @@ option(OPENSIM_BUILD_INDIVIDUAL_APPS ${OPENSIM_BUILD_INDIVIDUAL_APPS_DEFAULT}) mark_as_advanced(OPENSIM_BUILD_INDIVIDUAL_APPS) +option(BUILD_JAVA_TESTING "Build Java tests." ON) # Moco settings. # -------------- From c868c4342954eb03b71e3b02fbd26f98466929b1 Mon Sep 17 00:00:00 2001 From: Nicholas Bianco Date: Tue, 18 Jun 2024 16:16:06 -0700 Subject: [PATCH 2/3] Remove new flag, just disable java wrapping for Windows2022 runner --- .github/workflows/continuous_integration.yml | 2 +- Bindings/Java/CMakeLists.txt | 2 +- CMakeLists.txt | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index a53070395a..a6d104f7da 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -217,7 +217,7 @@ jobs: # TODO: Can remove /WX when we use that in CMakeLists.txt. # Set the CXXFLAGS environment variable to turn warnings into errors. # Skip timing test section included by default. - cmake -E env CXXFLAGS="/WX -DSKIP_TIMING" cmake $env:GITHUB_WORKSPACE -LAH -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=~/opensim-core-install -DOPENSIM_DEPENDENCIES_DIR=~/opensim_dependencies_install -DOPENSIM_C3D_PARSER=ezc3d -DBUILD_PYTHON_WRAPPING=on -DBUILD_JAVA_WRAPPING=on -DBUILD_JAVA_TESTING=off -DPython3_ROOT_DIR=C:\hostedtoolcache\windows\Python\3.10.11\x64 + cmake -E env CXXFLAGS="/WX -DSKIP_TIMING" cmake $env:GITHUB_WORKSPACE -LAH -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=~/opensim-core-install -DOPENSIM_DEPENDENCIES_DIR=~/opensim_dependencies_install -DOPENSIM_C3D_PARSER=ezc3d -DBUILD_PYTHON_WRAPPING=on -DBUILD_JAVA_WRAPPING=off -DPython3_ROOT_DIR=C:\hostedtoolcache\windows\Python\3.10.11\x64 $env:match = cmake -L . | Select-String -Pattern OPENSIM_QUALIFIED_VERSION $version = $env:match.split('=')[1] echo $version diff --git a/Bindings/Java/CMakeLists.txt b/Bindings/Java/CMakeLists.txt index 082e4ac5b3..02cf73a330 100644 --- a/Bindings/Java/CMakeLists.txt +++ b/Bindings/Java/CMakeLists.txt @@ -136,7 +136,7 @@ install(FILES "${SWIG_JAVA_JAR_BUILD_OUTPUT_PATH}" # Java tests. # ----------- -if(BUILD_TESTING AND BUILD_JAVA_TESTING) +if(BUILD_TESTING) # Now actually add the tests. add_subdirectory(tests) endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dd1b83009..b228f4dbd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,7 +187,6 @@ option(OPENSIM_BUILD_INDIVIDUAL_APPS ${OPENSIM_BUILD_INDIVIDUAL_APPS_DEFAULT}) mark_as_advanced(OPENSIM_BUILD_INDIVIDUAL_APPS) -option(BUILD_JAVA_TESTING "Build Java tests." ON) # Moco settings. # -------------- From bee485fc8b502e7061865c9151f66dc2939f016f Mon Sep 17 00:00:00 2001 From: Nicholas Bianco Date: Tue, 18 Jun 2024 17:31:45 -0700 Subject: [PATCH 3/3] Skip Java tests via ctest flag --- .github/workflows/continuous_integration.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index a6d104f7da..f8c222f5d7 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -94,7 +94,7 @@ jobs: - name: Test opensim-core run: | chdir $env:GITHUB_WORKSPACE\\build - ctest --parallel 4 --output-on-failure --build-config Release -E python* + ctest --parallel 4 --output-on-failure --build-config Release - name: Install opensim-core # TODO: This is where we wish to do the installing, but it's done above for now. @@ -217,7 +217,7 @@ jobs: # TODO: Can remove /WX when we use that in CMakeLists.txt. # Set the CXXFLAGS environment variable to turn warnings into errors. # Skip timing test section included by default. - cmake -E env CXXFLAGS="/WX -DSKIP_TIMING" cmake $env:GITHUB_WORKSPACE -LAH -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=~/opensim-core-install -DOPENSIM_DEPENDENCIES_DIR=~/opensim_dependencies_install -DOPENSIM_C3D_PARSER=ezc3d -DBUILD_PYTHON_WRAPPING=on -DBUILD_JAVA_WRAPPING=off -DPython3_ROOT_DIR=C:\hostedtoolcache\windows\Python\3.10.11\x64 + cmake -E env CXXFLAGS="/WX -DSKIP_TIMING" cmake $env:GITHUB_WORKSPACE -LAH -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=~/opensim-core-install -DOPENSIM_DEPENDENCIES_DIR=~/opensim_dependencies_install -DOPENSIM_C3D_PARSER=ezc3d -DBUILD_PYTHON_WRAPPING=on -DBUILD_JAVA_WRAPPING=on -DPython3_ROOT_DIR=C:\hostedtoolcache\windows\Python\3.10.11\x64 $env:match = cmake -L . | Select-String -Pattern OPENSIM_QUALIFIED_VERSION $version = $env:match.split('=')[1] echo $version @@ -235,7 +235,7 @@ jobs: - name: Test opensim-core run: | chdir $env:GITHUB_WORKSPACE\\build - ctest --parallel 4 --output-on-failure --build-config Release -E python* + ctest --parallel 4 --output-on-failure --build-config Release -E Java_* - name: Install opensim-core # TODO: This is where we wish to do the installing, but it's done above for now. @@ -343,7 +343,7 @@ jobs: - name: Test opensim-core run: | chdir $env:GITHUB_WORKSPACE\\build - ctest --parallel 4 --output-on-failure --build-config Release -E python* + ctest --parallel 4 --output-on-failure --build-config Release -E Java_* - name: Install opensim-core # TODO: This is where we wish to do the installing, but it's done above for now.