From 28ed678f8a6b7575d5bc874aca956660af386c67 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 8 Jan 2025 11:02:16 +0100 Subject: [PATCH] add more tests --- tests/test_v1_yaml/version_jolt.yaml | 73 ++++++++++++++++++++ tests/test_v1_yaml/version_jolt_correct.yaml | 73 ++++++++++++++++++++ tests/test_version_migrator.py | 1 + 3 files changed, 147 insertions(+) create mode 100644 tests/test_v1_yaml/version_jolt.yaml create mode 100644 tests/test_v1_yaml/version_jolt_correct.yaml diff --git a/tests/test_v1_yaml/version_jolt.yaml b/tests/test_v1_yaml/version_jolt.yaml new file mode 100644 index 000000000..896bc8048 --- /dev/null +++ b/tests/test_v1_yaml/version_jolt.yaml @@ -0,0 +1,73 @@ +context: + version: "5.1.0" + sha: 10fcc863ae2b9d48c2f22d8b0204034820e57a55f858b7c388ac9579d8cf4095 + +package: + name: jolt-physics + version: ${{ version }} + +source: + url: https://github.com/jrouwe/JoltPhysics/archive/refs/tags/v${{ version }}.zip + sha256: ${{ sha }} + patches: + - patches/001-use-gnuinstalldirs.patch + +build: + number: 0 + script: + - if: win + then: | + cmake -GNinja ^ + %CMAKE_ARGS% ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DBUILD_SHARED_LIBS=ON ^ + -DCMAKE_BUILD_TYPE=Distribution ^ + -DCROSS_PLATFORM_DETERMINISTIC=ON ^ + -DTARGET_VIEWER=OFF ^ + -DTARGET_SAMPLES=OFF ^ + -DTARGET_HELLO_WORLD=OFF ^ + -DTARGET_UNIT_TESTS=OFF ^ + -DTARGET_PERFORMANCE_TEST=OFF ^ + -S %SRC_DIR%\Build + cmake --build . --target install + else: | + cmake -GNinja \ + $CMAKE_ARGS \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Distribution \ + -DCROSS_PLATFORM_DETERMINISTIC=ON \ + -DTARGET_VIEWER=OFF \ + -DTARGET_SAMPLES=OFF \ + -DTARGET_HELLO_WORLD=OFF \ + -DTARGET_UNIT_TESTS=OFF \ + -DTARGET_PERFORMANCE_TEST=OFF \ + -S $SRC_DIR/Build + cmake --build . --target install + +requirements: + build: + - ${{ compiler("cxx") }} + - ${{ stdlib("c") }} + - cmake + - ninja + +tests: + - package_contents: + include: + - Jolt/Jolt.h + lib: + - Jolt + +about: + homepage: https://github.com/jrouwe/JoltPhysics + license: MIT + license_file: LICENSE + summary: A multi core friendly rigid body physics and collision detection library. + description: A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West. + documentation: https://jrouwe.github.io/JoltPhysics/ + repository: https://github.com/jrouwe/JoltPhysics + +extra: + recipe-maintainers: + - baszalmstra diff --git a/tests/test_v1_yaml/version_jolt_correct.yaml b/tests/test_v1_yaml/version_jolt_correct.yaml new file mode 100644 index 000000000..a0f69cc07 --- /dev/null +++ b/tests/test_v1_yaml/version_jolt_correct.yaml @@ -0,0 +1,73 @@ +context: + version: "5.2.0" + sha: 6953a6293f1ccfe3790cb0d778c71e3736031c441e0f434fd2baa8d307ebfef3 + +package: + name: jolt-physics + version: ${{ version }} + +source: + url: https://github.com/jrouwe/JoltPhysics/archive/refs/tags/v${{ version }}.zip + sha256: ${{ sha }} + patches: + - patches/001-use-gnuinstalldirs.patch + +build: + number: 0 + script: + - if: win + then: | + cmake -GNinja ^ + %CMAKE_ARGS% ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DBUILD_SHARED_LIBS=ON ^ + -DCMAKE_BUILD_TYPE=Distribution ^ + -DCROSS_PLATFORM_DETERMINISTIC=ON ^ + -DTARGET_VIEWER=OFF ^ + -DTARGET_SAMPLES=OFF ^ + -DTARGET_HELLO_WORLD=OFF ^ + -DTARGET_UNIT_TESTS=OFF ^ + -DTARGET_PERFORMANCE_TEST=OFF ^ + -S %SRC_DIR%\Build + cmake --build . --target install + else: | + cmake -GNinja \ + $CMAKE_ARGS \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Distribution \ + -DCROSS_PLATFORM_DETERMINISTIC=ON \ + -DTARGET_VIEWER=OFF \ + -DTARGET_SAMPLES=OFF \ + -DTARGET_HELLO_WORLD=OFF \ + -DTARGET_UNIT_TESTS=OFF \ + -DTARGET_PERFORMANCE_TEST=OFF \ + -S $SRC_DIR/Build + cmake --build . --target install + +requirements: + build: + - ${{ compiler("cxx") }} + - ${{ stdlib("c") }} + - cmake + - ninja + +tests: + - package_contents: + include: + - Jolt/Jolt.h + lib: + - Jolt + +about: + homepage: https://github.com/jrouwe/JoltPhysics + license: MIT + license_file: LICENSE + summary: A multi core friendly rigid body physics and collision detection library. + description: A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West. + documentation: https://jrouwe.github.io/JoltPhysics/ + repository: https://github.com/jrouwe/JoltPhysics + +extra: + recipe-maintainers: + - baszalmstra diff --git a/tests/test_version_migrator.py b/tests/test_version_migrator.py index 62333fb32..2e6ba8cb4 100644 --- a/tests/test_version_migrator.py +++ b/tests/test_version_migrator.py @@ -119,6 +119,7 @@ def test_version_up(case, new_ver, tmpdir, caplog): "case,new_ver", [ ("pypi_url", "0.7.1"), + ("jolt", "5.2.0"), ], ) @flaky