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

Merged
merged 102 commits into from
Jul 13, 2022
Merged

5.1 #144

Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
8208edf
Merge branch 'release/5.0.0' into CURA-9177_fix_CI_CT
jellespijker Apr 26, 2022
7ed2512
Use the same conan-package workflow as CuraEngine
Apr 26, 2022
e232f55
Use the same clang-tidy-review workflow as CuraEngine
Apr 26, 2022
4ada655
Merge remote-tracking branch 'origin/master' into CURA-9177_fix_CI_CT
jellespijker Apr 26, 2022
4faea2e
Disable testing
Apr 26, 2022
d3a788f
Update README.md
Apr 26, 2022
67de916
Add explination how to consume Arcus downstream
Apr 26, 2022
45a9bf9
Add clang-tidy and clang-format configs
Apr 26, 2022
b981e9f
Run clang-tidy on PR changes to C++ sources
Apr 26, 2022
09078c3
Use Arcus specific cache
Apr 26, 2022
412bba1
Wrong variable naming scheme
Apr 26, 2022
9efd8da
Apply review comment
jellespijker Apr 26, 2022
018d00e
Merge remote-tracking branch 'origin/CURA-9177_fix_CI_CT' into CURA-9…
jellespijker Apr 26, 2022
e45dec2
Fixed variable name
Apr 26, 2022
1372ba3
Removed web-based slicer comment
Apr 27, 2022
a87159d
Use CMP0091 new cmake policy
May 10, 2022
12168cd
Specify the python_version to build against
May 10, 2022
d3ec808
Use custom layout
May 10, 2022
f066126
Don't commit conan artifacts
May 10, 2022
58cfe7c
Update build steps in readme
May 10, 2022
2144b87
Do not set the language
May 18, 2022
f3d4cfc
Fixed python_version always set to 3.10.4
May 27, 2022
991872f
Create latest when pushed to this branch
May 27, 2022
9f9585d
Allow setting the Python_ROOT_DIR with a env variable
Jun 3, 2022
f9416f6
Use CMP0091 new policy for test_package
Jun 7, 2022
e5ce76d
Disable LTO by default
Jun 7, 2022
ee3dd49
Fix uneccesarry distinction between local_cache and dev env
Jun 7, 2022
7f87bf2
Export symbols for Windows of Arcus
Jun 7, 2022
d44f547
Also build shared on Windows
Jun 7, 2022
0aae5e6
Use same generator folder as curaengine
Jun 7, 2022
4fd2ab1
Remove reference to current (.) dir
Jun 7, 2022
1c6afd3
Also pack the shared dll and dynlib
Jun 7, 2022
66ff186
Split job in workflow in semver - export - install
Jun 8, 2022
b617545
Also create the latest allias for this dev branch
Jun 10, 2022
a459a74
Remove clang-tidy workflow
Jun 10, 2022
61dd1ce
Make sure the correct system_lib is defined for python
Jun 10, 2022
072271d
test the package components Arcus and pyArcus
Jun 10, 2022
da34d3c
Add GitVersion configuration
Jun 10, 2022
1343241
trigger workflow for this dev branch
Jun 10, 2022
218ad15
fix typo in cmake script
Jun 10, 2022
df7ed07
Remove unused headers variable
Jun 12, 2022
069ef0a
Use rpaths on mac and linux
Jun 12, 2022
8cea929
use loader_path rpath on Mac
Jun 12, 2022
47e72c9
Build python module static on Windows
Jun 12, 2022
0d68b4e
Use the custom rpath function again
Jun 12, 2022
71013ab
Use site-packages relative rpath
Jun 12, 2022
6b29870
Revert "Build python module static on Windows"
jellespijker Jun 12, 2022
debf718
skip_rpath in the conanfile
Jun 12, 2022
9a5949c
Add prefix path for test command for non-windows OS'es
casperlamboo Jun 14, 2022
9dd02d4
Clean up cmake files
casperlamboo Jun 14, 2022
993086c
Use reusable workflows
Jun 16, 2022
5957c89
Add conan-packages pip requirements
Jun 16, 2022
972239d
Remove old requirements.txt
Jun 16, 2022
3d76646
inherit secrets
Jun 16, 2022
31ac5be
Use uniform GitVersion
Jun 16, 2022
bf4b0c3
Use conandata for requirements
Jun 16, 2022
41c0745
Remove build requires
Jun 17, 2022
9e2cc91
Also remove build tools from test_packages
Jun 17, 2022
d9001a7
Make sure that link happens to the correct Python lib
Jun 17, 2022
3fc2845
Use UMBaseConanfile
Jun 18, 2022
59aa831
use cpp_info
Jun 18, 2022
429b05e
Use the CPython Conan recipe
Jun 18, 2022
6f78639
Clean up of recipe
Jun 18, 2022
9a94ffe
Use cpython 3.10.4
Jun 19, 2022
f0dbd39
Add sip and cpython as a build requirement
Jun 19, 2022
de59580
Don't use cpython during building only install sip
Jun 20, 2022
1e41dca
Use Conan SIP generator
Jun 20, 2022
107864a
Remove redundant build_requirement method
Jun 20, 2022
c133e47
Remove Find Sip CMake build module
Jun 20, 2022
de67752
Use cpython without user/channel
Jun 21, 2022
74c3bc8
Clean the conan cache
Jun 21, 2022
b217ff3
Uniform versioning
jellespijker Jun 21, 2022
8eb252f
No start and end line characters
Jun 21, 2022
4924298
not regex but glob for the release
Jun 21, 2022
00fdc82
Remove release branch trigger
Jun 21, 2022
1db9a12
use umbase 0.1.1 or higher
Jun 22, 2022
c9314e4
use alpha for dev branches
Jun 22, 2022
7a44cff
use alpha for dev branches
Jun 22, 2022
7673a48
pin umbase to 0.1.1
Jun 22, 2022
6cfc19e
use mpdecimal 2.5.0
Jun 22, 2022
2c511aa
Trigger workflow on changes to conandata
Jun 22, 2022
f0f003b
Uniform line ending across OSes
Jun 22, 2022
58231dd
trigger on change in gitattribute
Jun 22, 2022
4582da5
Added manual dispatch to workflow
Jun 23, 2022
6a4f966
Only create alias on pr
Jun 23, 2022
0578a26
Don't run on PR
Jun 23, 2022
75d2854
Don't send notification if binaries shouldn't be created
Jun 23, 2022
982001c
Only build protobuf shared
Jun 25, 2022
dfe25ba
CPython should be compiled
Jun 26, 2022
c36198c
Use system Python for sipbuildtool on Windows
Jun 26, 2022
ae24a26
Use lib_paths for full path
Jun 29, 2022
a96ad0d
Change Conan workflow to use 5.1 and Conan config master
Ghostkeeper Jun 30, 2022
7e05b7d
use sys.executable
Jul 7, 2022
d17a4cd
Removed 5.1.0-alpha entry from conandata
Jul 8, 2022
2a31d2b
Update the README
Jul 8, 2022
c69c40e
Use workflow from Cura branch CURA-9365
Jul 8, 2022
47897a3
Added 5.1.0-alpha
Jul 8, 2022
32843ee
Use new versioning reusable workflow
Jul 12, 2022
355d746
Also trigger when requirements runner change
Jul 12, 2022
af0f3cd
Delete GitVersion.yml
casperlamboo Jul 13, 2022
c8add8a
Apply suggestions from code review
Joeydelarago Jul 13, 2022
88d9647
Update branch name
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
249 changes: 129 additions & 120 deletions .github/workflows/conan-package.yml
Original file line number Diff line number Diff line change
@@ -1,124 +1,133 @@
---
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:
push:
paths:
- 'python/**'
- 'src/**'
- 'cmake/**'
- 'conanfile.py'
- 'CMakeLists.txt'
- '.github/workflows/conan-package.yml'
branches:
- main
- master
- dev
- 'CURA-*'
- 'release/**'
- '!15.*'
- '![1-4].[0-9]+'
tags:
- '![1-4].[0-9]+*'
- '!Arachne*'
- '!ancient*'
- '!jedi*'
pull_request:
branches:
- main
- master
- dev
- 'release/**'
env:
CONAN_USER: ${{ secrets.CONAN_USER }}
CONAN_PASS: ${{ secrets.CONAN_PASS }}
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/**'
- 'python/**'
- 'test_package/**'
- 'pyarcus_include/**'
- 'cmake/**'
- 'acrus_include/**'
- 'conanfile.py'
- 'CMakeLists.txt'
- '.github/workflows/conan-package.yml'
- '.github/workflows/requirements*'
- 'GitVersion.yml'
- 'conandata.yml'
- '.gitattributes'
branches:
- main
- 'CURA-*'
- '[1-9]+.[0-9]+'
tags:
- '[1-9]+.[0-9]+.[0-9]+'

jobs:
get-semver:
runs-on: ubuntu-20.04
outputs:
semver_full: ${{ steps.git-tool.outputs.fullSemVer }}
semver_majorminorpatch: ${{ steps.git-tool.outputs.MajorMinorPatch }}
user: ${{ steps.get-conan-broadcast-data.outputs.user }}
channel: ${{ steps.get-conan-broadcast-data.outputs.channel }}
steps:
- name: Checkout Arcus
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- id: git-tool
name: GitTools
uses: gittools/actions/gitversion/[email protected]
- id: get-conan-broadcast-data
name: Get Conan broadcast data
run: |
echo ${{ github.repository_owner }} | awk '{print "::set-output name=user::"tolower($0)}'

if [ "${{ github.ref_name == 'master' || github.ref_name == 'main' }}" = "true" ]; then
echo ${{ github.repository_owner }} | awk '{print "::set-output name=user::"tolower($0)}'
echo '::set-output name=channel::stable'
elif [ "${{ startsWith(github.ref_name, 'release/') || steps.git-tool.outputs.fullSemVer == steps.git-tool.outputs.MajorMinorPatch }}" = "true" ]; then
echo '::set-output name=user::_'
echo '::set-output name=channel::_'
elif [ "${{ github.ref_name == 'dev' || github.event_name == 'pull_request' }}" = "true" ]; then
echo ${{ github.repository_owner }} | awk '{print "::set-output name=user::"tolower($0)}'
echo '::set-output name=channel::testing'
else
echo ${{ github.repository_owner }} | awk '{print "::set-output name=user::"tolower($0)}'
echo ${{ github.ref_name }} | awk '{print "::set-output name=channel::"substr(tolower($0),0,9)}'
fi
conan-package:
runs-on: ${{ matrix.os }}
needs: get-semver
strategy:
fail-fast: true
matrix:
os: [ macos-10.15, windows-2022, ubuntu-20.04 ]
steps:
- name: Checkout Arcus
uses: actions/checkout@v3
- name: Setup Python and pip
uses: actions/setup-python@v3
with:
python-version: '3.10.4'
architecture: 'x64'
cache: 'pip'
- name: Prepare Conan and sip-build (Bash)
if: ${{ runner.os != 'Windows' }}
run: |
pip install --require-hashes -r requirements.txt
conan config install https://github.com/Ultimaker/conan-config.git -a "-b CURA-9177_Fix_CI_CD" -tf $HOME/.conan
conan profile new default --detect
conan user -p $CONAN_PASS -r ultimaker $CONAN_USER
- name: Prepare Conan and sip-build (Powershell)
if: ${{ runner.os == 'Windows' }}
run: |
pip install --require-hashes -r requirements.txt
conan config install https://github.com/Ultimaker/conan-config.git -a "-b CURA-9177_Fix_CI_CD" -tf C:\Users\runneradmin\.conan
conan profile new default --detect
conan user -p $env:CONAN_PASS -r ultimaker $env:CONAN_USER
- name: Cache Conan local repository packages (Bash)
uses: actions/cache@v3
if: ${{ runner.os != 'Windows' }}
with:
path: |
$HOME/.conan/data
key: ${{ runner.os }}-conan
- name: Cache Conan local repository packages (Powershell)
uses: actions/cache@v3
if: ${{ runner.os == 'Windows' }}
with:
path: |
C:\Users\runneradmin\.conan\data
C:\.conan
key: ${{ runner.os }}-conan
- name: Create the Packages
run: conan create . arcus/${{ needs.get-semver.outputs.semver_full }}@${{ needs.get-semver.outputs.user }}/${{ needs.get-semver.outputs.channel }} -pr:b cura_build.jinja -pr:h cura_release.jinja --build=missing --update
- name: Create the latest alias
if: ${{ github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' ) || github.ref_name == 'dev' || needs.get-semver.outputs.semver_full == needs.get-semver.outputs.semver_majorminorpatch }}
run: conan alias arcus/latest@${{ needs.get-semver.outputs.user }}/${{ needs.get-semver.outputs.channel }} arcus/${{ needs.get-semver.outputs.semver_full }}@${{ needs.get-semver.outputs.user }}/${{ needs.get-semver.outputs.channel }}
- name: Upload the Package(s)
run: conan upload "*" -r ultimaker --all -c
conan-recipe-version:
uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@CURA-9365
Joeydelarago marked this conversation as resolved.
Show resolved Hide resolved
with:
project_name: arcus

conan-package-export:
needs: [ 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-export.yml@5.1
uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main

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
gitpython
sip==6.5.1
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ nbproject/*
/conanbuildinfo.txt
/conaninfo.txt
/graph_info.json
/conan.lock
/CMakeUserPresets.json
/conanbuildinfo.txt
/conaninfo.txt
/graph_info.json
Loading