diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index 7c257fa..81f0f1a 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -1,11 +1,5 @@ ---- name: conan-package -# Exports the recipe, sources and binaries for Mac, Windows and Linux and upload these to the server such that these can -# be used downstream. -# -# It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches - on: workflow_dispatch: push: @@ -17,74 +11,44 @@ on: - '.github/workflows/requirements*.txt' jobs: + # FIXME: Change to `main` instead of `CURA-10831` once merged conan-recipe-version: - uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main + uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@CURA-10831 with: project_name: curaengine_grpc_definitions + # FIXME: Change to `main` instead of `CURA-10831` once merged conan-package-export: needs: [ conan-recipe-version ] - uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main + uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-export.yml@CURA-10831 with: recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} - runs_on: 'ubuntu-22.04' - python_version: '3.11.x' - conan_logging_level: 'info' secrets: inherit + # FIXME: Change to `main` instead of `CURA-10831` once merged conan-package-create-macos: - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main + if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} + uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-macos.yml@CURA-10831 with: - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - build_id: 3 - runs_on: 'macos-11' - python_version: '3.11.x' - conan_logging_level: 'info' secrets: inherit + # FIXME: Change to `main` instead of `CURA-10831` once merged conan-package-create-windows: - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main + if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} + uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-windows.yml@CURA-10831 with: - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - build_id: 4 - runs_on: 'windows-2022' - python_version: '3.11.x' - conan_config_branch: '' - conan_logging_level: 'info' secrets: inherit - conan-package-create-linux-modern: - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} + # FIXME: Change to `main` instead of `CURA-10831` once merged + conan-package-create-linux: needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main + if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} + uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-linux.yml@CURA-10831 with: - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - build_id: 2 - runs_on: 'ubuntu-22.04' - python_version: '3.11.x' - conan_logging_level: 'info' - secrets: inherit - - notify-export: - if: ${{ always() && (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} - needs: [ conan-recipe-version, conan-package-create-macos, conan-package-create-windows, conan-package-create-linux-modern ] - - uses: ultimaker/cura/.github/workflows/notify.yml@main - with: - success: ${{ contains(join(needs.*.result, ','), 'success') }} - success_title: "New Conan recipe exported in ${{ github.repository }}" - success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" - failure_title: "Failed to export Conan Export in ${{ github.repository }}" - failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" secrets: inherit diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt deleted file mode 100644 index 42669ee..0000000 --- a/.github/workflows/requirements-conan-package.txt +++ /dev/null @@ -1 +0,0 @@ -conan>=1.60.2,<2.0.0 diff --git a/.github/workflows/requirements-runner.txt b/.github/workflows/requirements-runner.txt new file mode 100644 index 0000000..e69de29 diff --git a/Cargo.toml b/Cargo.toml index fbec2ad..6fc5c7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curaengine_grpc_definitions" -version = "0.2.0-alpha" +version = "0.2.0-alpha.0" authors = ["Casper "] description = "CuraEngine gRPC definitions" repository = "https://github.com/Ultimaker/curaengine_grpc_definitions" diff --git a/conandata.yml b/conandata.yml new file mode 100644 index 0000000..42852a8 --- /dev/null +++ b/conandata.yml @@ -0,0 +1 @@ +version: 0.2.0-alpha.0 \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index 0668486..d636e5c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -8,11 +8,11 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import copy +from conan.tools.files import copy, update_conandata from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc from conan.tools.scm import Version -required_conan_version = ">=1.56.0" +required_conan_version = ">=1.58.0 <2.0.0" class CuraEngine_gRPC_DefinitionsConan(ConanFile): @@ -35,6 +35,10 @@ class CuraEngine_gRPC_DefinitionsConan(ConanFile): "fPIC": True, } + def set_version(self): + if not self.version: + self.version = self.conan_data["version"] + @property def _min_cppstd(self): return 20 @@ -49,6 +53,9 @@ def _compilers_minimum_version(self): "visual_studio": "17", } + def export(self): + update_conandata(self, {"version": self.version}) + def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) copy(self, "*.proto", self.recipe_folder, self.export_sources_folder) @@ -92,7 +99,7 @@ def requirements(self): self.requires("boost/1.82.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1", transitive_headers = True) - self.requires("openssl/1.1.1l") + self.requires("openssl/3.2.0") def validate(self): # validate the minimum cpp standard supported. For C++ projects only diff --git a/setup.py b/setup.py index e064c8e..15372c8 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ def generate_proto_sources(self): setup( name = "CuraEngineGRPC", - version = "0.2.0-alpha", + version = "0.2.0-alpha.0", description = "A gRPC package using proto files with type hints", author = "UltiMaker", author_email = "cura@ultimaker.com",