From e8673265b26dc95eadc88309f5e05ddafd3380db Mon Sep 17 00:00:00 2001 From: sguionni Date: Mon, 20 Nov 2023 19:49:55 +0100 Subject: [PATCH 1/8] Fix multi config generators --- conanfile.py | 2 +- lib/python_binding/conanfile.py | 6 ++---- lib/ui/conanfile.py | 5 ++--- lib/ui/test/conanfile.py | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/conanfile.py b/conanfile.py index 5902c16c7..b22496d4d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -34,7 +34,7 @@ def generate(self): tc.cache_variables["PATH_PYTHON_MODULE"] = path_python_module tc.generate() - copy(self, "*.dll", self.dependencies["vtx_ui"].cpp_info.bindir, self.build_folder) + copy(self, "*.dll", self.dependencies["vtx_ui"].cpp_info.bindir, os.path.join(self.build_folder, self.cpp.build.libdirs[0])) def layout(self): cmake_layout(self) diff --git a/lib/python_binding/conanfile.py b/lib/python_binding/conanfile.py index ddc373416..1e13630cd 100644 --- a/lib/python_binding/conanfile.py +++ b/lib/python_binding/conanfile.py @@ -30,10 +30,8 @@ def config_options(self): def layout(self): cmake_layout(self) - generator = self.conf.get("tools.cmake.cmaketoolchain:generator") - bt = str(self.settings.build_type) if self.settings.os == "Windows" and generator != "Ninja" else "." - self.cpp.build.components["vtx_python_binding"].libdirs = [bt] - self.cpp.build.components["pytx"].libdirs = [bt] + self.cpp.build.components["vtx_python_binding"].libdirs = self.cpp.build.libdirs + self.cpp.build.components["pytx"].libdirs = self.cpp.build.libdirs def build(self): cmake = CMake(self) diff --git a/lib/ui/conanfile.py b/lib/ui/conanfile.py index be82350cd..d029242c8 100644 --- a/lib/ui/conanfile.py +++ b/lib/ui/conanfile.py @@ -1,5 +1,4 @@ import os -import glob from conan import ConanFile from conan.tools.cmake import CMake, cmake_layout from conan.tools.files import copy @@ -34,8 +33,8 @@ def layout(self): def generate(self): copy(self, "*.cmake", self.source_folder, self.build_folder) - copy(self, "*.dll", self.dependencies["qt"].cpp_info.bindir, self.build_folder) - copy(self, "*.dll", os.path.join(self.dependencies["qt"].package_folder, "res/archdatadir/plugins"), self.build_folder) + copy(self, "*.dll", self.dependencies["qt"].cpp_info.bindir, os.path.join(self.build_folder, self.cpp.build.libdirs[0])) + copy(self, "*.dll", os.path.join(self.dependencies["qt"].package_folder, "res/archdatadir/plugins"), os.path.join(self.build_folder, self.cpp.build.libdirs[0])) def build(self): cmake = CMake(self) diff --git a/lib/ui/test/conanfile.py b/lib/ui/test/conanfile.py index b41759c20..0ab026feb 100644 --- a/lib/ui/test/conanfile.py +++ b/lib/ui/test/conanfile.py @@ -27,7 +27,7 @@ def layout(self): cmake_layout(self) def generate(self): - copy(self, "*.dll", self.dependencies["vtx_ui"].cpp_info.bindir, self.build_folder) + copy(self, "*.dll", self.dependencies["vtx_ui"].cpp_info.bindir, os.path.join(self.build_folder, self.cpp.build.libdirs[0])) def build(self): cmake = CMake(self) From 69b4bab96ec4c1c2eb556898d3731b54fdec607b Mon Sep 17 00:00:00 2001 From: sguionni Date: Tue, 21 Nov 2023 01:19:24 +0100 Subject: [PATCH 2/8] Update imgui --- .github/workflows/cmake_python_binding.yml | 4 +--- lib/renderer/bench/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake_python_binding.yml b/.github/workflows/cmake_python_binding.yml index 906128484..7648496d6 100644 --- a/.github/workflows/cmake_python_binding.yml +++ b/.github/workflows/cmake_python_binding.yml @@ -41,6 +41,4 @@ jobs: - name: Test working-directory: ${{env.CMAKELISTS_DIR}} - run: | - conan export ../io - conan create test --build=missing --settings=compiler.cppstd=20 \ No newline at end of file + run: conan create test --build=missing --settings=compiler.cppstd=20 \ No newline at end of file diff --git a/lib/renderer/bench/conanfile.py b/lib/renderer/bench/conanfile.py index f4b2d6a1c..fe1ec1a45 100644 --- a/lib/renderer/bench/conanfile.py +++ b/lib/renderer/bench/conanfile.py @@ -20,7 +20,7 @@ def requirements(self): self.requires("vtx_core/1.0") self.requires("vtx_io/1.0") self.requires("sdl/2.28.3") - self.requires("imgui/1.89.9") + self.requires("imgui/1.90") def generate(self): tc = CMakeToolchain(self) From 231c8354828a7290d889243a1cb6bbceb5f2390c Mon Sep 17 00:00:00 2001 From: sguionni Date: Tue, 21 Nov 2023 13:04:44 +0100 Subject: [PATCH 3/8] README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c151b109b..6d730d779 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,7 @@ Please [take a look there](https://chemfiles.org/chemfiles/latest/formats.html). - Install Visual Studio, or Visual Code, or just MSVC compiler if you don't want to use any IDE - Install [Conan 2](https://conan.io/downloads) +- Install [Python 3.9](https://www.python.org/downloads/) ### Create Conan profile From 4053614637d040eacfd7a891c6186e6ad737df56 Mon Sep 17 00:00:00 2001 From: sguionni Date: Tue, 21 Nov 2023 23:47:32 +0100 Subject: [PATCH 4/8] CI --- .github/workflows/cmake_renderer.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cmake_renderer.yml b/.github/workflows/cmake_renderer.yml index 7b1b92571..68ab099b6 100644 --- a/.github/workflows/cmake_renderer.yml +++ b/.github/workflows/cmake_renderer.yml @@ -43,19 +43,13 @@ jobs: conan export ../core conan export ../io/chemfiles conan export ../io - conan create bench --build=missing --settings=compiler.cppstd=20 -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True + conan create bench --build=missing --settings=compiler.cppstd=20 -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True --format=json > output.json -# - name: Install -# if: runner.os == 'Windows' -# working-directory: ${{env.CMAKELISTS_DIR}}/${{env.CMAKE_BUILD_DIR}} -# run: cmake --install . --config ${{env.BUILD_TYPE}} --prefix ${{env.CMAKELISTS_DIR}}/${{env.CMAKE_INSTALL_DIR}} -# - name: Install -# if: runner.os == 'Linux' || runner.os == 'macOS' -# working-directory: ${{env.CMAKELISTS_DIR}}/${{env.CMAKE_BUILD_DIR}} -# run: sudo cmake --install . --config ${{env.BUILD_TYPE}} --prefix ${{env.CMAKELISTS_DIR}}/${{env.CMAKE_INSTALL_DIR}} + - name: Read package path from output.json + run: echo "::set-output name=package_path::$(jq -r '.graph.node.1.package_folder' output.json)" + shell: bash # - uses: actions/upload-artifact@v3 # with: # name: VTXRendererBench_${{runner.os}} -# path: ${{env.CMAKELISTS_DIR}}/${{env.CMAKE_INSTALL_DIR}}/VTXRendererBench - +# path: ${{env.CMAKELISTS_DIR}}/${{env.CMAKE_INSTALL_DIR}}/VTXRendererBench \ No newline at end of file From d49c331f3c5a153cf25ad70909af4d26c1172df2 Mon Sep 17 00:00:00 2001 From: sguionni Date: Wed, 22 Nov 2023 00:02:39 +0100 Subject: [PATCH 5/8] CI --- .github/workflows/cmake_renderer.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake_renderer.yml b/.github/workflows/cmake_renderer.yml index 68ab099b6..dee5b1b0b 100644 --- a/.github/workflows/cmake_renderer.yml +++ b/.github/workflows/cmake_renderer.yml @@ -46,10 +46,13 @@ jobs: conan create bench --build=missing --settings=compiler.cppstd=20 -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True --format=json > output.json - name: Read package path from output.json - run: echo "::set-output name=package_path::$(jq -r '.graph.node.1.package_folder' output.json)" + id: read_package_path + run: echo "PACKAGE_PATH=$(jq -r '.graph.nodes["1"].package_folder' output.json)" >> "$GITHUB_OUTPUT" shell: bash -# - uses: actions/upload-artifact@v3 -# with: -# name: VTXRendererBench_${{runner.os}} -# path: ${{env.CMAKELISTS_DIR}}/${{env.CMAKE_INSTALL_DIR}}/VTXRendererBench \ No newline at end of file + - uses: actions/upload-artifact@v3 + env: + PACKAGE_PATH: ${{ steps.read_package_path.outputs.PACKAGE_PATH }} + with: + name: VTXRendererBench_${{runner.os}} + path: $PACKAGE_PATH \ No newline at end of file From c575f1805283cb06888978f8e15d451f3606251c Mon Sep 17 00:00:00 2001 From: sguionni Date: Wed, 22 Nov 2023 00:07:20 +0100 Subject: [PATCH 6/8] CI --- .github/workflows/cmake_renderer.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake_renderer.yml b/.github/workflows/cmake_renderer.yml index dee5b1b0b..5e3acd6d7 100644 --- a/.github/workflows/cmake_renderer.yml +++ b/.github/workflows/cmake_renderer.yml @@ -47,6 +47,7 @@ jobs: - name: Read package path from output.json id: read_package_path + working-directory: ${{env.CMAKELISTS_DIR}} run: echo "PACKAGE_PATH=$(jq -r '.graph.nodes["1"].package_folder' output.json)" >> "$GITHUB_OUTPUT" shell: bash From 1454b9c75bdcecc7a13321edf9a5c12fe4ab8656 Mon Sep 17 00:00:00 2001 From: sguionni Date: Wed, 22 Nov 2023 00:16:24 +0100 Subject: [PATCH 7/8] CI --- .github/workflows/cmake_renderer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake_renderer.yml b/.github/workflows/cmake_renderer.yml index 5e3acd6d7..eb456766d 100644 --- a/.github/workflows/cmake_renderer.yml +++ b/.github/workflows/cmake_renderer.yml @@ -56,4 +56,4 @@ jobs: PACKAGE_PATH: ${{ steps.read_package_path.outputs.PACKAGE_PATH }} with: name: VTXRendererBench_${{runner.os}} - path: $PACKAGE_PATH \ No newline at end of file + path: "$PACKAGE_PATH" \ No newline at end of file From bd36a24b9c3a9f563daea9433ca622e5ddd22491 Mon Sep 17 00:00:00 2001 From: sguionni Date: Wed, 22 Nov 2023 00:32:11 +0100 Subject: [PATCH 8/8] CI --- .github/workflows/cmake_renderer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake_renderer.yml b/.github/workflows/cmake_renderer.yml index eb456766d..e6064b0a2 100644 --- a/.github/workflows/cmake_renderer.yml +++ b/.github/workflows/cmake_renderer.yml @@ -56,4 +56,4 @@ jobs: PACKAGE_PATH: ${{ steps.read_package_path.outputs.PACKAGE_PATH }} with: name: VTXRendererBench_${{runner.os}} - path: "$PACKAGE_PATH" \ No newline at end of file + path: ${{env.PACKAGE_PATH}} \ No newline at end of file