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

5.1 #44

Merged
merged 62 commits into from
Jul 13, 2022
Merged

5.1 #44

Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3249b2c
Set cmake policy for compiler flags MSVC to new
Jun 7, 2022
37cd0a6
Moved headers to a seperate folder
Jun 10, 2022
9c9de23
Add clang tools
Jun 10, 2022
f520a8c
Manage deps with conan
Jun 10, 2022
c22bb1e
Add a conan package workflow
Jun 10, 2022
4e50835
Use export all symbols on Windows
Jun 10, 2022
19d833a
Use the same CMake build modules as Arcus
Jun 10, 2022
8d35016
Map the headers in the conan layout
Jun 10, 2022
bb6a1bd
Don't require system lib threads
Jun 10, 2022
311bbf5
Remove old docker script
Jun 10, 2022
7206c89
Add cmake files to gitignore
jellespijker Jun 10, 2022
651fe77
Also trigger workflow on include
Jun 10, 2022
97c0f1c
trigger workflow on this dev branch
Jun 10, 2022
27dc0d8
Also us the include namespace in the header file
Jun 10, 2022
37856f8
Set the rpaths the old fassion way
Jun 12, 2022
ee79152
Skip rpaths on Mac
Jun 12, 2022
44d07b8
Remove options from cmake that moved to conan
casperlamboo Jun 14, 2022
a5c95a4
Set prefix path for non Windows OS'es
casperlamboo Jun 14, 2022
fd23641
Use reusable workflows
Jun 16, 2022
1714f70
Merge remote-tracking branch 'origin/CURA-9365_fix_building_cura_main…
jellespijker Jun 16, 2022
e29ab57
Remove old requirements.txt
Jun 16, 2022
265c98e
Inherit secrets
Jun 16, 2022
f659b47
Added conan package requirements
Jun 16, 2022
30a722f
Use conandata for requirements
Jun 16, 2022
85b1188
Make sure that linking against the correct Python lib
Jun 17, 2022
421e8be
Use system build tools
Jun 17, 2022
2a25ebd
Use UMBaseConanfile
Jun 18, 2022
e527890
Use cpp_info
Jun 18, 2022
e237074
Use Conan CPython recipe
Jun 18, 2022
0aab03b
Cleanup of recipe
Jun 18, 2022
cdd09d4
CMake generator is now specified in global.conf
Jun 18, 2022
ff82b8f
call the find_package correctly
Jun 18, 2022
a1287b4
Use cpython 3.10.4
Jun 19, 2022
b17cec5
Use the conan sipbuildtool
Jun 20, 2022
61626e2
Add supplemental files for sipbuildtool
Jun 20, 2022
9b91e38
Use cpython without user/channel
Jun 21, 2022
fc4e4c2
set config of deps for windows
Jun 21, 2022
ba0ce1c
Clean local Conan Cache
Jun 21, 2022
9783746
pass boolean
Jun 21, 2022
2c6316b
Uniform versioning
Jun 21, 2022
91b9926
Use umbase 0.1.1 or greater
Jun 22, 2022
dea6a2f
pin umbase to 0.1.1
Jun 22, 2022
c28c9b8
use mpdecimal 2.5.0
Jun 22, 2022
35a42a9
Trigger workflow on changes to conandata
Jun 22, 2022
aa4f2b3
Uniform line ending across OSes
jellespijker Jun 22, 2022
741ef0e
Trigger on change in gitattributes
Jun 22, 2022
8a31da3
Add manual trigger
Jun 23, 2022
70f9e8f
Don't run on PR
Jun 23, 2022
5c7e3a5
Don't notify when binaries aren't supposed to build
Jun 23, 2022
d327f5f
Only build pugixml shared
Jun 25, 2022
9a1b8ee
Use shared CPython
Jun 26, 2022
884dd3d
Use system Python to generate source from sip on windows
Jun 26, 2022
758c660
use lib_paths for full path
Jun 29, 2022
68f9620
Change Conan workflow to use 5.1 and Conan config master
Ghostkeeper Jun 30, 2022
c039ff9
Use sys.executable
Jul 7, 2022
25c0b25
Update README.md
Jul 8, 2022
370ac1a
Use new versioning reusable workflow
Jul 12, 2022
6f08fa5
Also trigger when requirements* from runner change
Jul 12, 2022
e31c1e7
Fix version number matching
casperlamboo Jul 13, 2022
a32d280
Fix version number matching
casperlamboo Jul 13, 2022
91edc29
Delete GitVersion.yml
casperlamboo Jul 13, 2022
59b7fe6
Update branch names
Joeydelarago Jul 13, 2022
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
98 changes: 98 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: Always
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyNamespace: true
SplitEmptyRecord: true
BreakAfterJavaFieldAnnotations: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Allman
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakConstructorInitializersBeforeComma: false
BreakStringLiterals: true
ColumnLimit: 140
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
DerivePointerAlignment: false
PointerAlignment: Left
DisableFormat: false
ExperimentalAutoDetectBinPacking: true
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeCategories:
- Priority: 2
Regex: ^"(llvm|llvm-c|clang|clang-c)/
- Priority: 3
Regex: ^(<|"(gtest|gmock|isl|json)/)
- Priority: 1
Regex: .*
IncludeIsMainRegex: (Test)?$
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: true
JavaScriptQuotes: Double
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBlockIndentWidth: 7
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
ReflowComments: true
SortIncludes: CaseSensitive
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++17
TabWidth: 4
UseTab: Never
14 changes: 14 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
Checks: '*, -llvmlibc-*, -modernize-use-trailing-return-type, -altera-unroll-loops*, -readability-avoid-const-params-in-decls, -fuchsia-default-arguments-calls'
WarningsAsErrors: '-*'
HeaderFilterRegex: ''
FormatStyle: none
CheckOptions:
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.MacroDefinitionCase, value: UPPER_CASE }
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.FunctionCase, value: camelBack }
- { key: readability-identifier-naming.MethodCase, value: camelBack }
- { key: readability-identifier-naming.ParameterCase, value: lower_case }
- { key: readability-identifier-naming.VariableCase, value: lower_case }
- { key: readability-identifier-naming.ClassConstantCase, value: UPPER_CASE }
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[auto]
crlf = false
13 changes: 0 additions & 13 deletions .github/workflows/cicd.yml

This file was deleted.

134 changes: 134 additions & 0 deletions .github/workflows/conan-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
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:
inputs:
create_binaries_windows:
required: true
default: false
description: 'create binaries Windows'
create_binaries_linux:
required: true
default: false
description: 'create binaries Linux'
create_binaries_macos:
required: true
default: false
description: 'create binaries Macos'

push:
paths:
- 'src/**'
- 'include/**'
- 'python/**'
- 'test_package/**'
- 'tests/**'
- 'cmake/**'
- 'conanfile.py'
- 'CMakeLists.txt'
- '.github/workflows/conan-package.yml'
- '.github/workflows/requirements*'
- 'GitVersion.yml'
- 'conandata.yml'
- '.gitattributes'
branches:
- main
- 'CURA-*'
- '[1-9]+.[0-9]+'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- '[1-9]+.[0-9]+'
- '[0-9]+.[0-9]+'

casperlamboo marked this conversation as resolved.
Show resolved Hide resolved
tags:
- '[1-9]+.[0-9]+.[0-9]+'
casperlamboo marked this conversation as resolved.
Show resolved Hide resolved


jobs:
conan-recipe-version:
uses: ultimaker/cura/.github/workflows/[email protected]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@5.1
uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main

Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
with:
project_name: savitar

conan-package-export:
needs: [ conan-recipe-version ]
uses: ultimaker/cura/.github/workflows/[email protected]
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
recipe_id_pr: ${{ needs.conan-recipe-version.outputs.recipe_id_pr }}
runs_on: 'ubuntu-20.04'
python_version: '3.10.4'
conan_config_branch: 'master'
conan_logging_level: 'info'
secrets: inherit

conan-package-create-macos:
# FIXME: For release branches: maybe rename the branch to release/**
if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == '5.1')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_macos) }}
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
needs: [ conan-recipe-version, conan-package-export ]

uses: ultimaker/cura/.github/workflows/[email protected]
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
runs_on: 'macos-10.15'
python_version: '3.10.4'
conan_config_branch: 'master'
conan_logging_level: 'info'
secrets: inherit

conan-package-create-windows:
# FIXME: For release branches: maybe rename the branch to release/**
if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == '5.1')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_windows) }}
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
needs: [ conan-recipe-version, conan-package-export ]

uses: ultimaker/cura/.github/workflows/[email protected]
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
runs_on: 'windows-2022'
python_version: '3.10.4'
conan_config_branch: 'master'
conan_logging_level: 'info'
secrets: inherit

conan-package-create-linux:
# FIXME: For release branches: maybe rename the branch to release/**
if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == '5.1')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux) }}
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
needs: [ conan-recipe-version, conan-package-export ]

uses: ultimaker/cura/.github/workflows/[email protected]
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
runs_on: 'ubuntu-20.04'
python_version: '3.10.4'
conan_config_branch: 'master'
conan_logging_level: 'info'
secrets: inherit

notify-export:
if: ${{ always() }}
needs: [ conan-package-export ]

uses: ultimaker/cura/.github/workflows/[email protected]
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
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

notify-create:
# FIXME: For release branches: maybe rename the branch to release/**
if: ${{ always() && ((github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == '5.1')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux)) }}
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
needs: [ conan-package-create-macos, conan-package-create-windows, conan-package-create-linux ]

uses: ultimaker/cura/.github/workflows/[email protected]
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
with:
success: ${{ contains(join(needs.*.result, ','), 'success') }}
success_title: "New binaries created in ${{ github.repository }}"
success_body: "Created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
failure_title: "Failed to create binaries in ${{ github.repository }}"
failure_body: "Failed to created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
secrets: inherit
3 changes: 3 additions & 0 deletions .github/workflows/requirements-conan-package.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
conan
sip==6.5.1
gitpython
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ build

# Generated headers
/src/SavitarExport.h

cmake-build-*

CMakeUserPresets.json

/conanbuildinfo.txt
/graph_info.json
/conan.lock
/conaninfo.txt
Loading