Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURA-10831 #14

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 9 additions & 51 deletions .github/workflows/conan-package.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
---
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:
paths:
- '**/*.proto'
@@ -18,73 +11,38 @@ on:

jobs:
conan-recipe-version:
uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main
uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main
with:
project_name: curaengine_grpc_definitions

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@main
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

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@main
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

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@main
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')) }}
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@main
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
1 change: 0 additions & 1 deletion .github/workflows/requirements-conan-package.txt

This file was deleted.

Empty file.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "curaengine_grpc_definitions"
version = "0.2.0-alpha"
version = "0.2.0-alpha.0"
authors = ["Casper <casper.lamboo@ultimaker.com>"]
description = "CuraEngine gRPC definitions"
repository = "https://github.com/Ultimaker/curaengine_grpc_definitions"
1 change: 1 addition & 0 deletions conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version: 0.2.0-alpha.0
13 changes: 10 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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",