diff --git a/.gitea/workflows/Test.yaml b/.gitea/workflows/Test.yaml index a616c9b..2555fd2 100644 --- a/.gitea/workflows/Test.yaml +++ b/.gitea/workflows/Test.yaml @@ -15,6 +15,22 @@ jobs: - name: Check out repository code uses: actions/checkout@v3 + - name: Generating Package + run: | + cd ${{ gitea.workspace }} + echo Installing dependencies. + conan install . --profile:host ./profiles/Windows_x86_64_Release --profile:build ./profiles/Windows_x86_64_Release --build=missing + echo Creating package. + conan create . --profile:host ./profiles/Windows_x86_64_Release --profile:build ./profiles/Windows_x86_64_Release + echo Adding remote. + conan remote add origin https://gitea.eventhorizonstudio.io/api/packages/EventHorizonStudio/conan --force + echo Logging in to remote. + conan remote login origin ${{secrets.CONAN_USERNAME}} --password ${{secrets.CONAN_TOKEN}} + echo Uploading to remote. + conan upload --remote=origin ehs + echo Removing remote. + conan remote remove origin + - name: Generating Documentation run: | doxygen ehs-docs-config.doxyfile diff --git a/conanfile.py b/conanfile.py index 24ff977..d874791 100644 --- a/conanfile.py +++ b/conanfile.py @@ -3,6 +3,8 @@ from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps class helloRecipe(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps" name = "ehs" version = "1.3.0" @@ -14,17 +16,10 @@ class helloRecipe(ConanFile): topics = ("cross-platform", "audio", "file", "sockets") # Binary configuration - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} # Sources are located in the same place as this recipe, copy them to the recipe exports_sources = "CMakeLists.txt", "src/*", "include/*" - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def layout(self): cmake_layout(self) @@ -34,11 +29,6 @@ class helloRecipe(ConanFile): tc = CMakeToolchain(self) tc.generate() - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - def requirements(self): requirements = self.conan_data.get('requirements', []) for requirement in requirements: diff --git a/profiles/Windows_x86_64_Debug b/profiles/Windows_x86_64_Debug index 2d55411..7a9e22e 100644 --- a/profiles/Windows_x86_64_Debug +++ b/profiles/Windows_x86_64_Debug @@ -2,4 +2,5 @@ os=Windows arch=x86_64 compiler=msvc +compiler.version=194 build_type=Debug \ No newline at end of file diff --git a/profiles/Windows_x86_64_Release b/profiles/Windows_x86_64_Release index 0866c92..58ec722 100644 --- a/profiles/Windows_x86_64_Release +++ b/profiles/Windows_x86_64_Release @@ -2,4 +2,5 @@ os=Windows arch=x86_64 compiler=msvc +compiler.version=194 build_type=Release \ No newline at end of file