-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathci_test_example.py
36 lines (27 loc) · 1.2 KB
/
ci_test_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import platform
import os
from test.examples_tools import run
print("An introduction to the Dear ImGui library")
run("conan install . -c tools.system.package_manager:mode=install "
"-c tools.system.package_manager:sudo=True --build=missing")
# with presets
if platform.system() == "Windows":
run("cmake --preset conan-default")
run("cmake --build --preset conan-release")
else:
run("cmake --preset conan-release")
run("cmake --build --preset conan-release")
assert os.path.exists(os.path.join("build", "Release", "simple-shader.fs"))
if platform.system() == "Windows":
run("rd /s /q build")
else:
run("rm -rf build")
run("conan install . -c tools.system.package_manager:mode=install "
"-c tools.system.package_manager:sudo=True")
# calling CMake directly
if platform.system() == "Windows":
run("cmake . -G \"Visual Studio 17 2022\" -DCMAKE_TOOLCHAIN_FILE=./build/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW")
run("cmake --build . --config Release")
else:
run("cmake . -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release")
run("cmake --build .")