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 #274

Merged
merged 13 commits into from
Dec 8, 2023
Merged
79 changes: 28 additions & 51 deletions .github/workflows/conan-package.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,34 @@
---
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:
- '*.xml.*'
- '*.sig'
- 'conanfile.py'
- '.github/workflows/conan-package.yml'
- '.github/workflows/requirements*.txt'
branches:
- main
- master
- 'CURA-*'
- '[0-9].[0-9]*'
tags:
- '[1-9]+.[0-9]+.[0-9]*'
- '[1-9]+.[0-9]+.[0-9]'
workflow_dispatch:
push:
paths:
- '*.xml.*'
- '*.sig'
- 'conanfile.py'
- '.github/workflows/conan-package.yml'
- '.github/workflows/requirements*.txt'
branches:
- main
- master
- 'PP-*'
- 'CURA-*'
- '[0-9].[0-9]*'
tags:
- '[0-9]+.[0-9]+.[0-9]*'
- '[0-9]+.[0-9]+.[0-9]'

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

conan-package-export-linux:
needs: [ conan-recipe-version ]
uses: ultimaker/cura/.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-20.04'
python_version: '3.10.x'
conan_config_branch: 'master'
conan_logging_level: 'info'
conan_export_binaries: true
secrets: inherit

notify-export:
if: ${{ always() }}
needs: [ conan-recipe-version, conan-package-export-linux ]
conan-recipe-version:
uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main
with:
project_name: fdm_materials

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
conan-package-export-linux:
needs: [ conan-recipe-version ]
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 }}
secrets: inherit
15 changes: 5 additions & 10 deletions .github/workflows/process-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
name: process-pull-request

on:
pull_request_target:
types: [opened, reopened, edited, synchronize, review_requested, ready_for_review, assigned]
pull_request_target:
types: [ opened, reopened, edited, review_requested, ready_for_review, assigned ]

jobs:
add_label:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-add-labels@v1
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
with:
labels: 'PR: Community Contribution :crown:'
add_label:
uses: ultimaker/cura-workflows/.github/workflows/process-pull-request.yml@main
secrets: inherit
1 change: 1 addition & 0 deletions conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version: "5.7.0-alpha.0"
7 changes: 5 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from conan import ConanFile
from conan.tools.files import copy
from conan.tools.files import copy, update_conandata
from conan.tools.scm import Version
from conan.errors import ConanInvalidConfiguration

Expand All @@ -22,7 +22,10 @@ class FDM_MaterialsConan(ConanFile):

def set_version(self):
if not self.version:
self.version = "5.6.0-beta.1"
self.version = self.conan_data["version"]

def export(self):
update_conandata(self, {"version": self.version})

def export_sources(self):
copy(self, "*.fdm_material", self.recipe_folder, self.export_sources_folder)
Expand Down
Loading