Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dbb4cc6415 | |||
| e25cd6c71b | |||
| 1fb7ed43cf | |||
| ebca0c9836 | |||
| 476b4d5f97 | |||
| 3450cf9860 | |||
| 0dc75267fe | |||
| f7dccfaa90 | |||
| 76542ae729 | |||
| 55698377f9 | |||
| f21cbce8cd | |||
| 9152703516 | |||
| c264c76d8f | |||
| d8f5560cac | |||
| 442e411cf0 | |||
| 55080952a8 | |||
| f185504b4e | |||
| 2bc3daedcc | |||
| 2cef63f8a3 | |||
| 81a7d937bd | |||
| 64f3424cab | |||
| 64cb745ddc | |||
| 228876f8f2 | |||
| 8ece48c70b |
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"phabricator.uri" : "http://pha.geofinder.eu/"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/test
|
||||
machine: true
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
command: docker pull condaforge/linux-anvil
|
||||
- run:
|
||||
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions.
|
||||
command: ./package/conda/run_docker_build.sh
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_test:
|
||||
jobs:
|
||||
- build
|
||||
@@ -1,98 +0,0 @@
|
||||
# --- Based on Qt Coding Style ---
|
||||
BasedOnStyle: LLVM
|
||||
|
||||
# --- Bracket and Indentation Behavior ---
|
||||
IndentWidth: 4
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
TabWidth: 4
|
||||
ColumnLimit: 100
|
||||
UseTab: Never
|
||||
AccessModifierOffset: -4
|
||||
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
BinPackParameters: false
|
||||
BinPackArguments: false
|
||||
BreakBeforeBraces: Custom
|
||||
BreakTemplateDeclarations: Yes
|
||||
BreakBeforeBinaryOperators: All
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterStruct: true
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: true
|
||||
|
||||
# --- Special: Lambdas and Short Things ---
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLambdasOnASingleLine: Inline
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
|
||||
# --- Spaces ---
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceAfterCStyleCast: false
|
||||
Cpp11BracedListStyle: true
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeInheritanceColon: false
|
||||
|
||||
# --- Alignment & Formatting Tweaks ---
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignOperands: DontAlign
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
PointerAlignment: Left
|
||||
ReferenceAlignment: Left
|
||||
|
||||
# --- Comment Style ---
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
|
||||
# --- Namespace handling ---
|
||||
NamespaceIndentation: None
|
||||
|
||||
# --- Others ---
|
||||
SortIncludes: Never
|
||||
IncludeBlocks: Preserve
|
||||
MaxEmptyLinesToKeep: 2
|
||||
IndentCaseLabels: true
|
||||
InsertBraces: true
|
||||
AlignEscapedNewlines: DontAlign
|
||||
PPIndentWidth: 1
|
||||
IndentPPDirectives: AfterHash
|
||||
ReflowComments: true
|
||||
|
||||
# --- Penalties (Fine-tuning when to break lines) ---
|
||||
PenaltyBreakAssignment: 80
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
PenaltyBreakComment: 60
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakOpenParenthesis: 5
|
||||
PenaltyExcessCharacter: 10
|
||||
PenaltyReturnTypeOnItsOwnLine: 600
|
||||
@@ -1,489 +0,0 @@
|
||||
---
|
||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,
|
||||
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,google-explicit-constructor,
|
||||
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard,-readability-identifier-length,
|
||||
-readability-redundant-access-specifiers,-readability-qualified-auto,-readability-implicit-bool-conversion,
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-owning-memory,-cppcoreguidelines-avoid-do-while,
|
||||
-readability-convert-member-functions-to-static,-bugprone-easily-swappable-parameters,
|
||||
-cppcoreguidelines-pro-type-static-cast-downcast'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
FormatStyle: file
|
||||
User: florians
|
||||
CheckOptions:
|
||||
- key: readability-suspicious-call-argument.PrefixSimilarAbove
|
||||
value: '30'
|
||||
- key: cppcoreguidelines-no-malloc.Reallocations
|
||||
value: '::realloc'
|
||||
- key: cppcoreguidelines-owning-memory.LegacyResourceConsumers
|
||||
value: '::free;::realloc;::freopen;::fclose'
|
||||
- key: bugprone-reserved-identifier.Invert
|
||||
value: 'false'
|
||||
- key: bugprone-narrowing-conversions.PedanticMode
|
||||
value: 'false'
|
||||
- key: bugprone-unused-return-value.CheckedFunctions
|
||||
value: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty;::std::back_inserter;::std::distance;::std::find;::std::find_if;::std::inserter;::std::lower_bound;::std::make_pair;::std::map::count;::std::map::find;::std::map::lower_bound;::std::multimap::equal_range;::std::multimap::upper_bound;::std::set::count;::std::set::find;::std::setfill;::std::setprecision;::std::setw;::std::upper_bound;::std::vector::at;::bsearch;::ferror;::feof;::isalnum;::isalpha;::isblank;::iscntrl;::isdigit;::isgraph;::islower;::isprint;::ispunct;::isspace;::isupper;::iswalnum;::iswprint;::iswspace;::isxdigit;::memchr;::memcmp;::strcmp;::strcoll;::strncmp;::strpbrk;::strrchr;::strspn;::strstr;::wcscmp;::access;::bind;::connect;::difftime;::dlsym;::fnmatch;::getaddrinfo;::getopt;::htonl;::htons;::iconv_open;::inet_addr;::isascii;::isatty;::mmap;::newlocale;::openat;::pathconf;::pthread_equal;::pthread_getspecific;::pthread_mutex_trylock;::readdir;::readlink;::recvmsg;::regexec;::scandir;::semget;::setjmp;::shm_open;::shmget;::sigismember;::strcasecmp;::strsignal;::ttyname'
|
||||
- key: modernize-use-auto.MinTypeNameLength
|
||||
value: '5'
|
||||
- key: cppcoreguidelines-macro-usage.CheckCapsOnly
|
||||
value: 'false'
|
||||
- key: readability-inconsistent-declaration-parameter-name.Strict
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.DiceDissimilarBelow
|
||||
value: '60'
|
||||
- key: bugprone-assert-side-effect.IgnoredFunctions
|
||||
value: __builtin_expect
|
||||
- key: readability-suspicious-call-argument.Equality
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.QualifiersMix
|
||||
value: 'false'
|
||||
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.CommentNullPtrs
|
||||
value: '0'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-init-variables.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-nodiscard.ReplacementString
|
||||
value: '[[nodiscard]]'
|
||||
- key: modernize-loop-convert.MakeReverseRangeHeader
|
||||
value: ''
|
||||
- key: readability-suspicious-call-argument.SuffixSimilarAbove
|
||||
value: '30'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerNarrowingConversion
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.IgnoredParameterNames
|
||||
value: '"";iterator;Iterator;begin;Begin;end;End;first;First;last;Last;lhs;LHS;rhs;RHS'
|
||||
- key: modernize-loop-convert.UseCxx20ReverseRanges
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-prefer-member-initializer.UseAssignment
|
||||
value: 'false'
|
||||
- key: performance-type-promotion-in-math-fn.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-function-cognitive-complexity.DescribeBasicIncrements
|
||||
value: 'true'
|
||||
- key: bugprone-suspicious-include.ImplementationFileExtensions
|
||||
value: 'c;cc;cpp;cxx'
|
||||
- key: modernize-loop-convert.MakeReverseRangeFunction
|
||||
value: ''
|
||||
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-suspicious-missing-comma.SizeThreshold
|
||||
value: '5'
|
||||
- key: readability-identifier-naming.IgnoreFailedSplit
|
||||
value: 'false'
|
||||
- key: readability-qualified-auto.AddConstToQualified
|
||||
value: 'true'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfThis
|
||||
value: 'true'
|
||||
- key: bugprone-string-constructor.WarnOnLargeLength
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.OverrideSpelling
|
||||
value: override
|
||||
- key: readability-uppercase-literal-suffix.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: modernize-make-shared.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-dynamic-static-initializers.HeaderFileExtensions
|
||||
value: ';h;hh;hpp;hxx'
|
||||
- key: bugprone-suspicious-enum-usage.StrictMode
|
||||
value: 'false'
|
||||
- key: performance-unnecessary-copy-initialization.AllowedTypes
|
||||
value: ''
|
||||
- key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
|
||||
value: '5'
|
||||
- key: modernize-use-transparent-functors.SafeMode
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.Levenshtein
|
||||
value: 'true'
|
||||
- key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
|
||||
value: 'true'
|
||||
- key: bugprone-string-constructor.LargeLengthThreshold
|
||||
value: '8388608'
|
||||
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreAllFloatingPointValues
|
||||
value: 'false'
|
||||
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
|
||||
value: 'false'
|
||||
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
|
||||
value: ''
|
||||
- key: performance-inefficient-vector-operation.EnableProto
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.MakeSmartPtrFunction
|
||||
value: 'std::make_shared'
|
||||
- key: modernize-loop-convert.MaxCopySize
|
||||
value: '16'
|
||||
- key: readability-suspicious-call-argument.PrefixDissimilarBelow
|
||||
value: '25'
|
||||
- key: readability-function-size.LineThreshold
|
||||
value: '4294967295'
|
||||
- key: bugprone-easily-swappable-parameters.MinimumLength
|
||||
value: '2'
|
||||
- key: portability-simd-intrinsics.Suggest
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
|
||||
value: ''
|
||||
- key: modernize-use-override.IgnoreDestructors
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.MakeSmartPtrFunctionHeader
|
||||
value: '<memory>'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfConstant
|
||||
value: 'true'
|
||||
- key: readability-redundant-string-init.StringNames
|
||||
value: '::std::basic_string_view;::std::basic_string'
|
||||
- key: modernize-make-unique.IgnoreDefaultInitialization
|
||||
value: 'true'
|
||||
- key: modernize-use-emplace.ContainersWithPushBack
|
||||
value: '::std::vector;::std::list;::std::deque'
|
||||
- key: readability-magic-numbers.IgnoreBitFieldsWidths
|
||||
value: 'true'
|
||||
- key: modernize-make-unique.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-override.OverrideSpelling
|
||||
value: override
|
||||
- key: readability-suspicious-call-argument.LevenshteinDissimilarBelow
|
||||
value: '50'
|
||||
- key: bugprone-argument-comment.CommentStringLiterals
|
||||
value: '0'
|
||||
- key: concurrency-mt-unsafe.FunctionSet
|
||||
value: any
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: bugprone-reserved-identifier.AllowedIdentifiers
|
||||
value: '_object'
|
||||
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
|
||||
value: 'false'
|
||||
- key: readability-else-after-return.WarnOnUnfixable
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredFloatingPointValues
|
||||
value: '1.0;100.0;'
|
||||
- key: modernize-use-emplace.IgnoreImplicitConstructors
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-macro-usage.IgnoreCommandLineMacros
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.Substring
|
||||
value: 'true'
|
||||
- key: modernize-use-equals-delete.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: readability-identifier-length.IgnoredVariableNames
|
||||
value: ''
|
||||
- key: readability-magic-numbers.IgnoreAllFloatingPointValues
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-pro-bounds-constant-array-index.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-suspicious-call-argument.Abbreviations
|
||||
value: 'arr=array;cnt=count;idx=index;src=source;stmt=statement;cpy=copy;dest=destination;dist=distancedst=distance;ptr=pointer;wdth=width;str=string;ln=line;srv=server;attr=attribute;ref=reference;buf=buffer;col=column;nr=number;vec=vector;len=length;elem=element;val=value;i=index;var=variable;hght=height;cl=client;num=number;pos=position;lst=list;addr=address'
|
||||
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
|
||||
value: 'false'
|
||||
- key: readability-uppercase-literal-suffix.NewSuffixes
|
||||
value: ''
|
||||
- key: modernize-loop-convert.MinConfidence
|
||||
value: reasonable
|
||||
- key: performance-unnecessary-value-param.AllowedTypes
|
||||
value: ''
|
||||
- key: readability-uniqueptr-delete-release.PreferResetCall
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumExceptionNameLength
|
||||
value: '2'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnorePowersOf2IntegerValues
|
||||
value: 'false'
|
||||
- key: google-readability-namespace-comments.SpacesBeforeComments
|
||||
value: '2'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreBitFieldsWidths
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredIntegerValues
|
||||
value: '1;2;3;4;'
|
||||
- key: cppcoreguidelines-no-malloc.Allocations
|
||||
value: '::malloc;::calloc'
|
||||
- key: bugprone-narrowing-conversions.IgnoreConversionFromTypes
|
||||
value: ''
|
||||
- key: readability-function-size.BranchThreshold
|
||||
value: '4294967295'
|
||||
- key: bugprone-suspicious-missing-comma.RatioThreshold
|
||||
value: '0.200000'
|
||||
- key: readability-identifier-length.IgnoredParameterNames
|
||||
value: '^[n]$'
|
||||
- key: readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: readability-identifier-naming.IgnoreMainLikeFunctions
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-init-variables.MathHeader
|
||||
value: '<math.h>'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: bugprone-reserved-identifier.AggressiveDependentMemberLookup
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.DiceSimilarAbove
|
||||
value: '70'
|
||||
- key: modernize-use-equals-default.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.Abbreviation
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumLoopCounterNameLength
|
||||
value: '2'
|
||||
- key: modernize-use-emplace.SmartPointers
|
||||
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
|
||||
- key: cppcoreguidelines-no-malloc.Deallocations
|
||||
value: '::free'
|
||||
- key: bugprone-dangling-handle.HandleClasses
|
||||
value: 'std::basic_string_view;std::experimental::basic_string_view'
|
||||
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.JaroWinklerSimilarAbove
|
||||
value: '85'
|
||||
- key: readability-simplify-subscript-expr.Types
|
||||
value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array'
|
||||
- key: performance-unnecessary-copy-initialization.ExcludedContainerTypes
|
||||
value: ''
|
||||
- key: modernize-replace-auto-ptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-move-const-arg.CheckTriviallyCopyableMove
|
||||
value: 'true'
|
||||
- key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
|
||||
value: '3'
|
||||
- key: readability-function-size.VariableThreshold
|
||||
value: '4294967295'
|
||||
- key: cert-dcl16-c.NewSuffixes
|
||||
value: 'L;LL;LU;LLU'
|
||||
- key: bugprone-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: readability-identifier-naming.GetConfigPerFile
|
||||
value: 'true'
|
||||
- key: modernize-use-default-member-init.UseAssignment
|
||||
value: 'false'
|
||||
- key: readability-function-size.NestingThreshold
|
||||
value: '4294967295'
|
||||
- key: modernize-use-override.AllowOverrideAndFinal
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes
|
||||
value: ''
|
||||
- key: readability-function-size.ParameterThreshold
|
||||
value: '4294967295'
|
||||
- key: modernize-pass-by-value.ValuesOnly
|
||||
value: 'false'
|
||||
- key: readability-function-cognitive-complexity.IgnoreMacros
|
||||
value: 'false'
|
||||
- key: modernize-loop-convert.IncludeStyle
|
||||
value: llvm
|
||||
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
|
||||
value: 'false'
|
||||
- key: bugprone-narrowing-conversions.WarnWithinTemplateInstantiation
|
||||
value: 'false'
|
||||
- key: cert-err33-c.CheckedFunctions
|
||||
value: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;'
|
||||
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
|
||||
value: 'false'
|
||||
- key: readability-redundant-smartptr-get.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.AllowOverrideAndFinal
|
||||
value: 'false'
|
||||
- key: readability-identifier-naming.AggressiveDependentMemberLookup
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumParameterNameLength
|
||||
value: '2'
|
||||
- key: modernize-use-emplace.TupleTypes
|
||||
value: '::std::pair;::std::tuple'
|
||||
- key: modernize-use-emplace.TupleMakeFunctions
|
||||
value: '::std::make_pair;::std::make_tuple'
|
||||
- key: bugprone-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-owning-memory.LegacyResourceProducers
|
||||
value: '::malloc;::aligned_alloc;::realloc;::calloc;::fopen;::freopen;::tmpfile'
|
||||
- key: bugprone-easily-swappable-parameters.SuppressParametersUsedTogether
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.StrictMode
|
||||
value: '0'
|
||||
- key: modernize-replace-random-shuffle.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-bool-literals.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField
|
||||
value: 'true'
|
||||
- key: google-readability-namespace-comments.ShortNamespaceLines
|
||||
value: '10'
|
||||
- key: bugprone-suspicious-string-compare.StringCompareLikeFunctions
|
||||
value: ''
|
||||
- key: modernize-avoid-bind.PermissiveParameterList
|
||||
value: 'false'
|
||||
- key: bugprone-easily-swappable-parameters.NamePrefixSuffixSilenceDissimilarityTreshold
|
||||
value: '1'
|
||||
- key: readability-suspicious-call-argument.Suffix
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.JaroWinklerDissimilarBelow
|
||||
value: '75'
|
||||
- key: modernize-use-noexcept.ReplacementString
|
||||
value: ''
|
||||
- key: modernize-use-override.FinalSpelling
|
||||
value: final
|
||||
- key: modernize-use-using.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.FinalSpelling
|
||||
value: final
|
||||
- key: readability-suspicious-call-argument.MinimumIdentifierNameLength
|
||||
value: '3'
|
||||
- key: bugprone-narrowing-conversions.WarnOnIntegerNarrowingConversion
|
||||
value: 'true'
|
||||
- key: modernize-loop-convert.NamingStyle
|
||||
value: CamelCase
|
||||
- key: cppcoreguidelines-pro-type-member-init.UseAssignment
|
||||
value: 'false'
|
||||
- key: bugprone-suspicious-include.HeaderFileExtensions
|
||||
value: ';h;hh;hpp;hxx'
|
||||
- key: performance-no-automatic-move.AllowedTypes
|
||||
value: ''
|
||||
- key: readability-suspicious-call-argument.SubstringDissimilarBelow
|
||||
value: '40'
|
||||
- key: bugprone-argument-comment.CommentIntegerLiterals
|
||||
value: '0'
|
||||
- key: bugprone-stringview-nullptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-for-range-copy.WarnOnAllAutoCopies
|
||||
value: 'false'
|
||||
- key: modernize-pass-by-value.IncludeStyle
|
||||
value: llvm
|
||||
- key: bugprone-argument-comment.CommentFloatLiterals
|
||||
value: '0'
|
||||
- key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
|
||||
value: '16'
|
||||
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
|
||||
value: 'false'
|
||||
- key: readability-else-after-return.WarnOnConditionVariables
|
||||
value: 'true'
|
||||
- key: modernize-use-nullptr.NullMacros
|
||||
value: 'NULL'
|
||||
- key: readability-suspicious-call-argument.SuffixDissimilarBelow
|
||||
value: '25'
|
||||
- key: bugprone-argument-comment.CommentCharacterLiterals
|
||||
value: '0'
|
||||
- key: cppcoreguidelines-macro-usage.AllowedRegexp
|
||||
value: '^DEBUG_*'
|
||||
- key: readability-suspicious-call-argument.LevenshteinSimilarAbove
|
||||
value: '66'
|
||||
- key: cppcoreguidelines-narrowing-conversions.PedanticMode
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.IgnoreDefaultInitialization
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.JaroWinkler
|
||||
value: 'true'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXHeadersInCppSources
|
||||
value: 'true'
|
||||
- key: modernize-make-shared.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-suspicious-call-argument.Prefix
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
|
||||
value: 'false'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXStaticCastsInCppSources
|
||||
value: 'true'
|
||||
- key: bugprone-signed-char-misuse.CharTypdefsToIgnore
|
||||
value: ''
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
|
||||
value: 'false'
|
||||
- key: modernize-make-unique.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: performance-for-range-copy.AllowedTypes
|
||||
value: ''
|
||||
- key: bugprone-argument-comment.CommentBoolLiterals
|
||||
value: '0'
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentUserDefinedLiterals
|
||||
value: '0'
|
||||
- key: readability-magic-numbers.IgnoredFloatingPointValues
|
||||
value: '1.0;100.0;'
|
||||
- key: performance-inefficient-string-concatenation.StrictMode
|
||||
value: 'false'
|
||||
- key: readability-redundant-declaration.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.IgnoredParameterTypeSuffixes
|
||||
value: 'bool;Bool;_Bool;it;It;iterator;Iterator;inputit;InputIt;forwardit;ForwardIt;bidirit;BidirIt;constiterator;const_iterator;Const_Iterator;Constiterator;ConstIterator;RandomIt;randomit;random_iterator;ReverseIt;reverse_iterator;reverse_const_iterator;ConstReverseIterator;Const_Reverse_Iterator;const_reverse_iterator;Constreverseiterator;constreverseiterator'
|
||||
- key: modernize-make-unique.MakeSmartPtrFunction
|
||||
value: 'std::make_unique'
|
||||
- key: portability-restrict-system-includes.Includes
|
||||
value: '*'
|
||||
- key: readability-implicit-bool-conversion.AllowPointerConditions
|
||||
value: 'true'
|
||||
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
|
||||
value: '<memory>'
|
||||
- key: bugprone-signal-handler.AsyncSafeFunctionSet
|
||||
value: POSIX
|
||||
- key: bugprone-easily-swappable-parameters.ModelImplicitConversions
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.SubstringSimilarAbove
|
||||
value: '50'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnWithinTemplateInstantiation
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumVariableNameLength
|
||||
value: '2'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnEquivalentBitWidth
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnorePublicMemberVariables
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
|
||||
value: 'false'
|
||||
- key: modernize-use-noexcept.UseNoexceptFalse
|
||||
value: 'true'
|
||||
- key: readability-function-cognitive-complexity.Threshold
|
||||
value: '25'
|
||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.IgnoreSingleArgument
|
||||
value: '0'
|
||||
- key: bugprone-narrowing-conversions.WarnOnEquivalentBitWidth
|
||||
value: 'true'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
|
||||
value: 'false'
|
||||
- key: performance-faster-string-find.StringLikeClasses
|
||||
value: '::std::basic_string;::std::basic_string_view'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: bugprone-assert-side-effect.CheckFunctionCalls
|
||||
value: 'false'
|
||||
- key: bugprone-string-constructor.StringNames
|
||||
value: '::std::basic_string;::std::basic_string_view'
|
||||
- key: bugprone-assert-side-effect.AssertMacros
|
||||
value: assert,NSAssert,NSCAssert
|
||||
- key: bugprone-exception-escape.IgnoredExceptions
|
||||
value: ''
|
||||
- key: bugprone-signed-char-misuse.DiagnoseSignedUnsignedCharComparisons
|
||||
value: 'true'
|
||||
- key: modernize-use-default-member-init.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: llvm-qualified-auto.AddConstToQualified
|
||||
value: 'false'
|
||||
- key: llvm-else-after-return.WarnOnConditionVariables
|
||||
value: 'false'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
|
||||
value: 'true'
|
||||
- key: modernize-raw-string-literal.DelimiterStem
|
||||
value: lit
|
||||
- key: readability-suspicious-call-argument.Dice
|
||||
value: 'true'
|
||||
- key: readability-identifier-length.IgnoredLoopCounterNames
|
||||
value: '^[ijk_]$'
|
||||
- key: modernize-raw-string-literal.ReplaceShorterLiterals
|
||||
value: 'false'
|
||||
- key: readability-magic-numbers.IgnoredIntegerValues
|
||||
value: '1;2;3;4;'
|
||||
- key: performance-inefficient-vector-operation.VectorLikeClasses
|
||||
value: '::std::vector'
|
||||
- key: modernize-use-auto.RemoveStars
|
||||
value: 'false'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.IncludeStyle
|
||||
value: llvm
|
||||
- key: portability-simd-intrinsics.Std
|
||||
value: ''
|
||||
- key: performance-unnecessary-value-param.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
|
||||
value: 'false'
|
||||
- key: modernize-replace-disallow-copy-and-assign-macro.MacroName
|
||||
value: DISALLOW_COPY_AND_ASSIGN
|
||||
- key: llvm-else-after-return.WarnOnUnfixable
|
||||
value: 'false'
|
||||
...
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
78d0fc786aece120146b5c7a2367b593d3498e43
|
||||
eef27b845f5409dafbe3434ef16cd0fd3c06b311
|
||||
a5bfba266593eeea4e1970b03b01ce360511d67d
|
||||
bfc8111d19e05f578e4f0567cb93a6288c8f39ee
|
||||
e901e584acaa1de1aa817448dbf1936f17c7f474
|
||||
3da6ced354983790f027514284a4aab1daf33022
|
||||
4543c982670a0d6044ebed7812ac7df43feb1c4a
|
||||
c4b1ec01baed0a6e2698fc2f8d6557193f6b15df
|
||||
2a8c1271d53bb9d4daad270e729661b7a35d7337
|
||||
7c43b059df1b33ceffb3aa57d7e2b162a310f5e1
|
||||
5bd5f3a9637c09a2537b5563c244c5db87b8a14a
|
||||
5abfdb140531c1c59254eb5dc4a62cb6bbd60e34
|
||||
298c67787377a06aee01d76477ba696b1335307b
|
||||
d5f6c096b8089d5835a22a80667b00eda6721526
|
||||
d84071275a76cea3ae96f12be6405e12305c98c7
|
||||
bfdffb50beb8064b15f3eaadee983c7c95ae57bd
|
||||
59fcb80a801e94248ae3184a0d8ca67745c96954
|
||||
31c0099a59ab76ac7282f60bb8308fad5ac59ddd
|
||||
67381e957984c0a3958e5c71f605f9a8a2fa3c5a
|
||||
a3cb87b11763504f86aac23a640ebf3cb840034a
|
||||
b75cd3dd522c7c2589016160f5bb342ea6a7ed94
|
||||
ae7cb9e30081b0c23643e69ff08d0d836b03b5f2
|
||||
8fb5c657365efb3fddce465b98ce8f5b39eca5f6
|
||||
c7f9874422ecccc791f35b02da521dcf76e60b22
|
||||
9d4b58ae85bfbac752b439b4146f8a0c119fd436
|
||||
d9237989467a036fa0095917b15ed30a34a1846a
|
||||
f11783a49876564eec5c9f6f9f0215db810fb1c4
|
||||
6f11ed298a9896c2b693cb2a5c6d540467496ca0
|
||||
4f308dc03cbb1d67482ba41d251a3c6bd8e9b194
|
||||
b2ffebf1c0ecee57bf5329f4d2546fd98f3f6399
|
||||
53bb216b571bdbacb5ac978a5ac3f6e5cd13c23f
|
||||
d38f18af23bfa76138d1c8b5e87672d57f3734eb
|
||||
1baf5da3cfb24d9fcc1a1389cbd502f60002e7ab
|
||||
7fe10182a9c2a1ca97beb8a8e82742fae6a80c8d
|
||||
0c6786d4bfe1814119c00a2b2816f2770885386d
|
||||
cbdba0b5bb19ffc0ff5450a3ff63281ef03d8bd9
|
||||
a5135efd879abcfb34868c775f4178124ccd771c
|
||||
e0399e83c3d48c7d43fa2d1ed2ad1f6d52e68a0a
|
||||
3ef6811dae41b0d5aa2343feea37cca12c5d23e3
|
||||
c44ccc0ff231b7a91deb4425fa7b484725e98683
|
||||
cb21ac7bf8ac998be93849b75c8ff94e9b1c1b54
|
||||
1ee046788d50bb2512dfb4454d3e8f6c4aff0f9f
|
||||
190d64bdae81af46a60241af9b8f4a8e381248fb
|
||||
ec74d351f0c533da1626b05d1db9e20b678a8f72
|
||||
1e9236abd416f998ccc3d052556338d4988ea709
|
||||
bac451cc537be8beb4826c89fd4429ca73e69f4d
|
||||
5f31fb74f6445fda5632b5f2545362f85a379c74
|
||||
6f230d740401f914d5340a4b4be1a1c1df7b444a
|
||||
0a65575c2c1b23fcae6354277fee264df6d163d8
|
||||
702238a99c80ff2e6c91b4880f91bb38ab7833ac
|
||||
35156cdce3b2716071e994467c607e5175693a12
|
||||
bb0e2f1c5186ae3008b9aad1f0ba3e35370d18db
|
||||
b13088664fea77e6ac4779dddfdea7aac3c50b30
|
||||
1ea364379f64314ea47549a2f625c34eafdd262d
|
||||
3b42d4aface8c64feb9c86533f3b847e9aa9c563
|
||||
bedf9207023d6d594f2c03d2a8d799b34759a8fb
|
||||
132a1d7e55eadd0cb5a09760d471780eb5bd9340
|
||||
3ef438eaf03f840958a2f7a9ec585a3d2728e447
|
||||
c726b69d7ede5b1af82407c515e14375f3358be3
|
||||
390e09db3258e4807a3d4b2993c1723480ae5350
|
||||
57d0c2000ae29d3160e0aa908ed1e027b321e36a
|
||||
b389f6e602eb42c07c21f37fbcd451e28dd9fbc4
|
||||
48365a1df5286c7a5608cd3a5cce0def5e4d5380
|
||||
dc5b3cb495002951c3a36c928c55108b0999bc3e
|
||||
875f9eaad6a59abd70775c0b67a7f10d92128a5a
|
||||
7a8a453746a8e4a845219948591fd17f4494a067
|
||||
8b31d7deb09077bc0cce0ecf6de02c94db262a67
|
||||
4a7e1b6d9b12df211cf6fbec61cc8544e4c6bf9d
|
||||
129d5882a729327a72b57ec695bb376e84205bd0
|
||||
2ae7cc4a94c1ab1dfc0264367c5da4716ea02bfe
|
||||
987b4bda2ac8570969dc07fa887bda420f77e441
|
||||
ec899d75c6abf45d7ee4dd91ea0f8141a9818446
|
||||
233a337ca5d693e4773fecf1de14325752afd658
|
||||
9271b6d433578f65df9b469131ece4e4bdbb19aa
|
||||
2637527e3a4e132506e8c074b752721d66ae146a
|
||||
7681c62468d7b6f4d8af6758324b9ec983340b97 # Test: apply clang format
|
||||
4919fa18ff7f9a4cdfdd7896d768c2342e5f9f37 # Surface: apply clang format
|
||||
791fe029341aa1dda42376620d52c67ecaca7eea # Sketcher: Reformat to current clang-format standard
|
||||
0a8292a850b98d2e66e08e235dfb81b6e7285df1 # Web: apply clang format
|
||||
1a960286a4a549a6454155481ce51cad88a51745 # Tests: Reformat to current clang-format standard
|
||||
c1825036a6dfd44576da6157bde9fa2fab724d55 # Tools: Reformat to current clang-format standard
|
||||
17bf44ec9a5fd7a8f1c7bf0d3c24d63b6c808dbd # Start: apply clang format
|
||||
89579cff6e8834e296d5efe6292f019fadedce53 # Addon Manager: Reformat with new Black line length
|
||||
c989a8506ecc26e3172c0d18ce4d0f710b5c7d92 # RE: apply clang format
|
||||
c6bc17ffc13aee4d38d2938800ef5002fc874fc3 # RE: apply clang format
|
||||
6fb2bcafe85eb6bb0c625f37f233b0b09e093963 # MeshPart: apply clang format
|
||||
c2bda2f75684ed8bb64813d4a92a5a595181f556 # MeshPart: apply clang format
|
||||
ea116dc0332ccfc5797f248b04492a16f421b787 # Inspection: apply clang format
|
||||
8d24f0c021a04f19f5463a52e3be1af60fb892f1 # Points: apply clang-formatting
|
||||
e3de4f217c4f028523adcb5cb566f4d6a7957abe # minor reformat: break lines, one per item
|
||||
d57d14321b408beef7b115331e2cfa7215f59b8a # Web: Final application of pre-commit
|
||||
efd11e590d28d72e350b72f02f3f599ef4f704f4 # Test: Final application of pre-commit
|
||||
217674de04533afb81da0968483dd5a6c4d88667 # Surface: Final application of pre-commit
|
||||
70e046bbd5a7214b5d5ae8f12da5aed502dc89ab # Start: Final application of pre-commit
|
||||
db24eeec535f1f43fb3d5b63d24c5171af637880 # RE: Final application of pre-commit
|
||||
714cb0a309e243cfb035b046dd8cc543ac514cd2 # Points: Final application of pre-commit
|
||||
7593f0c112198a0cf033a0bcf8d55db4e0a0e3f5 # MeshPart: Final application of pre-commit
|
||||
b8f8b232cb0882d171cb299e6f6279a516cdd6eb # Inspection: Final application of pre-commit
|
||||
c5c2ea3498f402c0c89916c46ddb071e22756622 # Assembly: Final application of pre-commit
|
||||
592c992b863549fde52741fd8830418168387695 # Assembly: Apply pre-commit to Assembly files
|
||||
94ca51b7799b2ac60a2a56d7e6e753bb97a73671 # PartDesign: Fix #9377 - issue with accuracy in AdditiveHelix (#11312)
|
||||
d472927bba7b2d8d151c99fb29cf1d8dd099ea7d # Correct PartDesign Helix feature negative angles (#11399)
|
||||
b93c02e07da4990482b9d927506901e6f5d624e1 # Black updated to 24.3.0
|
||||
cbea6b60942f8327e6105b12e8c1d5db4647984c # FEM: Apply pre-commit to FEM files
|
||||
f9d66096878c7d89c273522b9ca57bdb14fee3bc # Rearranged CommandCreateGeo.cpp
|
||||
b23d5809414d63ea90bcc744212c126645051438 # BIM: add to pre-commit and apply Black formatting
|
||||
50e4864efb06faf3e2126e8cb9ff9058a08a54b2 # Draft: add to pre-commit and apply Black formatting
|
||||
25c3ba733889264bcb3b3c8d2287b79053c0c8ec # All: Reformat according to new standard
|
||||
@@ -0,0 +1,20 @@
|
||||
#git archive --worktree-attributes --prefix=freecad-0.13/ --output=freecad.tar.gz HEAD
|
||||
acinclude.m4 export-ignore
|
||||
autogen.sh export-ignore
|
||||
build.sh export-ignore
|
||||
BuildAll.bat export-ignore
|
||||
BuildRelease.ini export-ignore
|
||||
BuildRelease.py export-ignore
|
||||
configure.ac export-ignore
|
||||
Makefile.am export-ignore
|
||||
mkinstalldirs export-ignore
|
||||
package export-ignore
|
||||
fc.sh export-ignore
|
||||
UpdateResources.bat export-ignore
|
||||
BuildVersion.bat export-ignore
|
||||
*.sln export-ignore
|
||||
WindowsInstaller export-ignore
|
||||
JtReader export-ignore
|
||||
mefisto.patch export-ignore
|
||||
Version.h.in export-subst
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: FreeCAD
|
||||
open_collective: freecad
|
||||
patreon: # Replace with a single Patreon username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ["https://wiki.freecad.org/Donate"]
|
||||
@@ -1,92 +0,0 @@
|
||||
name: Report a Problem
|
||||
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
|
||||
labels: ["Status: Needs triage","Status: Needs confirmation"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this problem report! Please [search](https://github.com/FreeCAD/FreeCAD/issues) if a similar issue already exists and check out [how to report issues](https://github.com/FreeCAD/FreeCAD?tab=readme-ov-file#reporting-issues). By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md).
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Problem description
|
||||
description: Describe the problem and how it impacts user experience, workflow, maintainability or performance. You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first.
|
||||
placeholder: Describe your problem briefly.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: wb
|
||||
attributes:
|
||||
label: Workbench affected?
|
||||
options:
|
||||
- Assembly
|
||||
- BIM
|
||||
- CAM
|
||||
- Core (App, Gui,...)
|
||||
- Draft
|
||||
- FEM
|
||||
- Material
|
||||
- Measurement
|
||||
- Mesh
|
||||
- Part
|
||||
- Part Design
|
||||
- Sketcher
|
||||
- Spreadsheet
|
||||
- TechDraw
|
||||
- Other (specify in description)
|
||||
|
||||
- type: textarea
|
||||
id: steps_to_reproduce
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: If the problem appears to be a bug with the current functionality, provide a test case or recipe that reliably reproduces the issue. Ideally [record a macro](https://wiki.freecad.org/Std_DlgMacroRecord) and attach it. Please also add an example file as ZIP.
|
||||
placeholder: |
|
||||
Drag an example file as ZIP into this textbox to attach it.
|
||||
|
||||
Steps to reproduce the behavior:
|
||||
1. Open my example file
|
||||
2. Go to '...'
|
||||
3. Click on '...'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected_behavior
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A clear and concise description of what you expected to happen when following the provided steps above.
|
||||
placeholder: What is the expected behavior?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: actual_behavior
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
description: A clear and concise description of what actually happens. If applicable, add screenshots to help explain the problem.
|
||||
placeholder: What is actually happening? You can add screenshorts or videos by dragging them into this textbox.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: dev_version
|
||||
attributes:
|
||||
label: Development version About Info (in Safe Mode)
|
||||
description: Download the latest weekly [development release](https://github.com/FreeCAD/FreeCAD/releases) and try reproducing the issue in safe mode (Help → Restart in Safe Mode). Use the [About FreeCAD](https://wiki.freecad.org/About) dialog to copy your full version information and paste it here.
|
||||
placeholder: |
|
||||
1. Download the latest weekly development version (link above).
|
||||
2. Make sure to run in Safe Mode (Help -> Restart in Safe Mode) to exclude interference from 3rd party addons.
|
||||
3. If the issue is still reproducible, open the About FreeCAD dialog and copy the full version info here.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: good_version
|
||||
attributes:
|
||||
label: Last known good version (optional)
|
||||
description: If this is a regression, paste the [About FreeCAD](https://wiki.freecad.org/About) info from the last known working version.
|
||||
placeholder: If the problem did not exist in a previous version, paste the About FreeCAD info from that version here.
|
||||
render: shell
|
||||
@@ -1,103 +0,0 @@
|
||||
name: Report a Code Quality Issue
|
||||
description: Report problems related to code structure, maintainability, performance, correctness, or technical debt that do not directly affect end-user behavior.
|
||||
labels: ["Status: Needs triage", "Status: Needs confirmation", "Type: Code Quality"]
|
||||
type: "Code Quality"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to help improve FreeCAD's code quality!
|
||||
|
||||
> [!NOTE]
|
||||
> This form is intended **only for code quality issues**, such as:
|
||||
> - Architectural or design problems
|
||||
> - Maintainability or readability issues
|
||||
> - Performance or scalability concerns
|
||||
> - Incorrect abstractions, layering violations, or technical debt
|
||||
>
|
||||
> If the issue affects user-visible behavior, workflows, or UI, please use the regular **Report Problem** form instead.
|
||||
|
||||
Please [search existing issues](https://github.com/FreeCAD/FreeCAD/issues) before submitting.
|
||||
By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md).
|
||||
|
||||
- type: dropdown
|
||||
id: wb
|
||||
attributes:
|
||||
label: Area / Workbench affected
|
||||
description: Select the primary area affected by the code quality issue.
|
||||
options:
|
||||
- Assembly
|
||||
- BIM
|
||||
- CAM
|
||||
- Core (App, Gui, Base, ...)
|
||||
- Draft
|
||||
- FEM
|
||||
- Material
|
||||
- Measurement
|
||||
- Mesh
|
||||
- Part
|
||||
- Part Design
|
||||
- Sketcher
|
||||
- Spreadsheet
|
||||
- TechDraw
|
||||
- Build system / CI
|
||||
- Documentation
|
||||
- Other (specify below)
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Problem description
|
||||
description: |
|
||||
Describe the code quality issue clearly.
|
||||
Focus on *why* the current implementation is problematic (e.g. maintainability, performance, correctness, extensibility).
|
||||
Reference files, classes, functions, or modules where applicable.
|
||||
placeholder: |
|
||||
Example:
|
||||
- Class X violates dependency rules by including Y
|
||||
- Function Z mixes responsibilities and is hard to reason about
|
||||
- Algorithm has unnecessary complexity or poor performance characteristics
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: impact
|
||||
attributes:
|
||||
label: Impact
|
||||
description: |
|
||||
Explain the practical impact of this issue.
|
||||
For example: increased maintenance cost, higher bug risk, performance degradation, difficulty extending functionality, or CI/build issues.
|
||||
placeholder: Describe how this affects the codebase long-term.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: proposed_solution
|
||||
attributes:
|
||||
label: Suggested improvement (optional)
|
||||
description: |
|
||||
If you have ideas on how to address the issue, outline them here.
|
||||
This can include refactoring suggestions, alternative designs, or references to best practices.
|
||||
placeholder: Optional — leave empty if unsure.
|
||||
|
||||
- type: textarea
|
||||
id: references
|
||||
attributes:
|
||||
label: References / evidence
|
||||
description: |
|
||||
Add relevant references such as:
|
||||
- File paths or code snippets
|
||||
- Related issues or pull requests
|
||||
- Benchmarks, logs, or static analysis results
|
||||
placeholder: Links, snippets, or related issues.
|
||||
|
||||
- type: textarea
|
||||
id: dev_version
|
||||
attributes:
|
||||
label: Development version (if relevant)
|
||||
description: |
|
||||
If the issue is version-specific or recently introduced, paste the output from the
|
||||
**About FreeCAD** dialog of a development build.
|
||||
Otherwise, this can be left empty.
|
||||
placeholder: Paste About FreeCAD information here.
|
||||
render: shell
|
||||
@@ -1,19 +0,0 @@
|
||||
name: Request a Backport
|
||||
description: Suggest that a commit from the main development branch be backported to the next point release
|
||||
title: "[Backport] "
|
||||
labels: ["needs triage", "backport"]
|
||||
body:
|
||||
- type: input
|
||||
id: pull_request
|
||||
attributes:
|
||||
label: Original PR
|
||||
description: A link to the PR that contains the commits to be backported
|
||||
placeholder: https://github.com/FreeCAD/FreeCAD/pulls/1234
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description and Justification
|
||||
description: Why should this PR (or individual commit) be backported?
|
||||
placeholder: Please explain why this PR or commit should be backported to the next point release.
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 💬 START HERE -- FreeCAD Forum
|
||||
url: https://forum.freecad.org/
|
||||
about: You are encouraged to discuss the problem you are seeing on the FreeCAD Forums before opening an issue on GitHub
|
||||
@@ -0,0 +1,10 @@
|
||||
Thank you for creating a pull request to contribute to FreeCAD! To ease integration, please confirm the following:
|
||||
|
||||
- [ ] Branch rebased on latest master `git pull --rebase upstream master`
|
||||
- [ ] Unit tests confirmed to pass by running `./bin/FreeCAD --run-test 0`
|
||||
- [ ] Commit message is [well-written](https://chris.beams.io/posts/git-commit/)
|
||||
- [ ] Commit message includes `issue #<id>` or `fixes #<id>` where `<id>` is the [associated MantisBT](https://freecadweb.org/wiki/tracker#GitHub_and_MantisBT) issue id if one exists
|
||||
|
||||
And please remember to update the Wiki with the features added or changed once this PR is merged.
|
||||
|
||||
---
|
||||
@@ -1,102 +0,0 @@
|
||||
aci
|
||||
addmin
|
||||
afile
|
||||
ake
|
||||
aline
|
||||
alle
|
||||
alledges
|
||||
alocation
|
||||
anid
|
||||
anormal
|
||||
anull
|
||||
apoints
|
||||
aply
|
||||
appy
|
||||
ascript
|
||||
ba
|
||||
beginn
|
||||
bloaded
|
||||
bottome
|
||||
brushin
|
||||
childrens
|
||||
childs
|
||||
connexion
|
||||
currenty
|
||||
curvelinear
|
||||
detet
|
||||
documentin
|
||||
doubleclick
|
||||
dum
|
||||
eiter
|
||||
ende
|
||||
extaction
|
||||
finde
|
||||
findn
|
||||
fle
|
||||
fo
|
||||
fpt
|
||||
freez
|
||||
froms
|
||||
graphin
|
||||
hist
|
||||
incrementin
|
||||
indexin
|
||||
indicies
|
||||
indx
|
||||
inout
|
||||
invertin
|
||||
isnt
|
||||
ist
|
||||
itsel
|
||||
leadin
|
||||
linez
|
||||
localy
|
||||
lod
|
||||
mantatory
|
||||
mata
|
||||
methode
|
||||
mke
|
||||
modell
|
||||
nd
|
||||
nin
|
||||
normale
|
||||
normaly
|
||||
numer
|
||||
oce
|
||||
ontop
|
||||
ot
|
||||
pard
|
||||
parm
|
||||
parms
|
||||
pointin
|
||||
programm
|
||||
propt
|
||||
rady
|
||||
recurrance
|
||||
rin
|
||||
rougly
|
||||
sectionin
|
||||
seh
|
||||
ser
|
||||
sergent
|
||||
serie
|
||||
shs
|
||||
siz
|
||||
som
|
||||
strack
|
||||
strin
|
||||
substraction
|
||||
sur
|
||||
te
|
||||
textin
|
||||
thist
|
||||
tread
|
||||
ue
|
||||
upto
|
||||
uptodate
|
||||
usind
|
||||
vas
|
||||
vertexes
|
||||
vew
|
||||
wallthickness
|
||||
zuser
|
||||
@@ -1,11 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: pip
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
|
Before Width: | Height: | Size: 431 KiB |
|
Before Width: | Height: | Size: 416 KiB |
|
Before Width: | Height: | Size: 540 KiB |
|
Before Width: | Height: | Size: 570 KiB |
|
Before Width: | Height: | Size: 464 KiB |
|
Before Width: | Height: | Size: 459 KiB |
|
Before Width: | Height: | Size: 457 KiB |
@@ -1,113 +0,0 @@
|
||||
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
|
||||
# source:
|
||||
# - any: ['src/**/*', '!src/docs/*']
|
||||
|
||||
# 'Mod' related labels
|
||||
|
||||
"Mod: Core":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/App/**/*', 'src/Base/**/*', 'src/Gui/**/*']
|
||||
|
||||
:octocat::
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['.github/**/*']
|
||||
|
||||
"Mod: Addon Manager":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/AddonManager/**/*']
|
||||
|
||||
"Mod: Materials":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Material/**/*']
|
||||
|
||||
"Mod: Measurement":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Measure/**/*']
|
||||
|
||||
"Mod: BIM":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/BIM/**/*']
|
||||
|
||||
"Mod: Assembly":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Assembly/**/*']
|
||||
|
||||
"Mod: Draft":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Draft/**/*']
|
||||
|
||||
"Mod: FEM":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Fem/**/*']
|
||||
|
||||
"Mod: Mesh":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Mesh/**/*']
|
||||
|
||||
"Mod: MeshPart":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/MeshPart/**/*']
|
||||
|
||||
"Mod: OpenSCAD":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/OpenSCAD/**/*']
|
||||
|
||||
"Mod: Part":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Part/**/*']
|
||||
|
||||
"Mod: Part Design":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/PartDesign/**/*']
|
||||
|
||||
"Mod: CAM":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/CAM/**/*']
|
||||
|
||||
"Mod: Points":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Points/**/*']
|
||||
|
||||
"Mod: Reverse Engineering":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/ReverseEngineering/**/*']
|
||||
|
||||
"Mod: Sketcher":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Sketcher/**/*']
|
||||
|
||||
"Mod: Spreadsheet":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Spreadsheet/**/*']
|
||||
|
||||
"Mod: Start":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Start/**/*']
|
||||
|
||||
"Mod: Surface":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Surface/**/*']
|
||||
|
||||
"Mod: TechDraw":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/TechDraw/**/*']
|
||||
|
||||
"Mod: Test":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Test/**/*']
|
||||
|
||||
# 'Packaging' related labels
|
||||
|
||||
"Packaging/building":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['cMake/**/*']
|
||||
|
||||
"3rd party component":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/3rdParty/**/*']
|
||||
|
||||
# 'Topic' related labels
|
||||
|
||||
"Topic: Stylesheets":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Gui/Stylesheets/**/*']
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "black-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(would reformat (.*))$",
|
||||
"file": 2,
|
||||
"message": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "clang",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "codespell-matcher",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpplint",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"__comment": "Taken from vscode-cpptools's Extension/package.json gcc rule",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "gcc-problem-matcher",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "grepMatcher-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"__comment":
|
||||
"Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "msvc-problem-matcher",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"code": 5,
|
||||
"message": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-error",
|
||||
"severity": "error",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
<!-- Include a brief summary of the changes. -->
|
||||
|
||||
<!--
|
||||
The FreeCAD community thanks you for your contribution!
|
||||
By creating a Pull Request you agree to the contributing policy. The complete policy can be found in the root of the source tree (CONTRIBUTING.md) or at https://github.com/FreeCAD/FreeCAD/blob/main/CONTRIBUTING.md
|
||||
|
||||
This template provides guidance on creating a PR that can be reviewed and approved as quickly as possible. Comments may be safely deleted.
|
||||
|
||||
Unless you know exactly what you're doing, please leave the checkbox 'Allow edits by maintainers' enabled. This will allow maintainers to help you.
|
||||
-->
|
||||
|
||||
## Issues
|
||||
<!-- link to individual issues this PR closes by referencing the issue number (e.g., fixes #1234, closes #4321). -->
|
||||
|
||||
## Before and After Images
|
||||
<!-- If your proposed changes affect the FreeCAD GUI, add before and after screenshots -->
|
||||
|
||||
|
||||
|
||||
<!-- Notes on the PR Review Process
|
||||
|
||||
The following section describes what the maintainers consider when reviewing your Pull Request. These items may not require you to take any action. This information is provided for context. Understanding what we consider will help you prepare your request for speedy approval.
|
||||
|
||||
You can find additional documentation about these guidelines in the [Developers handbook](https://freecad.github.io/DevelopersHandbook).
|
||||
|
||||
Alignment (Does the PR align with the goals and interests of the project?)
|
||||
- Does the PR have at least one issue linked, which this PR closes?
|
||||
- Has the conversation on the PR and related issue(s) reached consensus?
|
||||
- If the PR affects the GUI, is the Design Working Group (DWG) aware and have they had time to review and comment?
|
||||
- If the PR affects the GUI, did the contributor include before/after images?
|
||||
- If the PR affects standards and workflow, is the CAD Working Group (CWG) aware and have they had time to review/comment?
|
||||
|
||||
Impact (Does the change affect other parts of the project?)
|
||||
- Has the impact on documentation been considered and appropriate action taken?
|
||||
- Has the impact on translation been considered appropriate action taken?
|
||||
- Will the PR affect existing user documents?
|
||||
|
||||
Code Quality (Is code well-written and maintainable?)
|
||||
- Does the PR warrant a review by the Code Quality Working Group (CQWG)?
|
||||
- Does the change include tests?
|
||||
- Is the PR rebased on the current main branch with unnecessary commits squashed?
|
||||
|
||||
Release (Are there considerations related to release timing?)
|
||||
- Has the PR been considered for backporting to the latest release branch?
|
||||
- Have the release notes been considered/updated?
|
||||
-->
|
||||
@@ -1,168 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
"""
|
||||
run_gui_tests.py
|
||||
|
||||
List registered tests via `FreeCAD -t`, filter for GUI tests (names containing 'Gui'), and run each
|
||||
GUI test module using the specified FreeCAD executable.
|
||||
|
||||
Usage:
|
||||
run_gui_tests.py [FREECAD_EXEC]
|
||||
|
||||
If FREECAD_EXEC is omitted the script falls back to 'FreeCAD' on PATH.
|
||||
If FREECAD_EXEC is a directory containing bin/FreeCAD, that binary is used.
|
||||
If FREECAD_EXEC is an executable path, it is used directly.
|
||||
|
||||
This script returns 0 if all GUI modules run successfully. Otherwise it returns the last non-zero
|
||||
exit code.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import sys
|
||||
import subprocess
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def find_executable(arg: str | None) -> str:
|
||||
"""Return the FreeCAD executable path to use.
|
||||
|
||||
If `arg` is None or empty, returns the plain name 'FreeCAD' which will be looked up on PATH. If
|
||||
`arg` is a directory and contains `bin/FreeCAD` that binary will be returned. If `arg` is a file
|
||||
path it is returned as-is. Otherwise the original argument is returned.
|
||||
|
||||
Common use cases: use the FreeCAD binary from a build directory or an installed FreeCAD prefix.
|
||||
"""
|
||||
if not arg:
|
||||
return "FreeCAD"
|
||||
p = Path(arg)
|
||||
if p.is_dir():
|
||||
candidate = p / "bin" / "FreeCAD"
|
||||
if candidate.exists():
|
||||
return str(candidate)
|
||||
if p.is_file():
|
||||
return str(p)
|
||||
# fallback: return as-is (may be on PATH)
|
||||
return arg
|
||||
|
||||
|
||||
def validate_executable(path: str) -> tuple[bool, str]:
|
||||
"""Return (ok, message). Checks if the executable exists or is likely on PATH.
|
||||
|
||||
This is best effort: if a bare name is given (e.g. 'FreeCAD') we can't stat it here, so we
|
||||
accept it but warn. If the path points to a file, we check executability. Also warn if the name
|
||||
looks like the CLI-only 'FreeCADCmd'.
|
||||
"""
|
||||
p = Path(path)
|
||||
if p.is_file():
|
||||
if not os.access(str(p), os.X_OK):
|
||||
return False, f"File exists but is not executable: {path}"
|
||||
if p.name.endswith("FreeCADCmd"):
|
||||
return (
|
||||
True,
|
||||
(
|
||||
"Warning: executable looks like 'FreeCADCmd' (CLI); GUI tests require the GUI "
|
||||
"binary 'FreeCAD'."
|
||||
),
|
||||
)
|
||||
return True, ""
|
||||
# Bare name or non-existent path: accept but warn
|
||||
if p.name.endswith("FreeCADCmd"):
|
||||
return (
|
||||
True,
|
||||
(
|
||||
"Warning: executable name looks like 'FreeCADCmd' (CLI); GUI tests require the GUI "
|
||||
"binary 'FreeCAD'."
|
||||
),
|
||||
)
|
||||
return True, ""
|
||||
|
||||
|
||||
def run_and_capture(cmd: list[str]) -> tuple[int, str]:
|
||||
"""Run `cmd` and return (returncode, combined stdout+stderr string).
|
||||
|
||||
If the executable is not found a return code of 127 is returned and a small error string is
|
||||
provided as output to aid diagnosis.
|
||||
"""
|
||||
try:
|
||||
proc = subprocess.run(
|
||||
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, check=False
|
||||
)
|
||||
return proc.returncode, proc.stdout
|
||||
except FileNotFoundError:
|
||||
return 127, f"Executable not found: {cmd[0]}\n"
|
||||
|
||||
|
||||
def parse_registered_tests(output: str) -> list[str]:
|
||||
"""Parse output from `FreeCAD -t` and return a list of registered test unit names.
|
||||
|
||||
The function looks for the section starting with the literal 'Registered test units:' and
|
||||
then collects non-empty, stripped lines from that point onwards as test names.
|
||||
"""
|
||||
lines = output.splitlines()
|
||||
tests: list[str] = []
|
||||
started = False
|
||||
for ln in lines:
|
||||
if not started:
|
||||
if "Registered test units:" in ln:
|
||||
started = True
|
||||
continue
|
||||
s = ln.strip()
|
||||
if not s:
|
||||
# allow blank lines but keep going
|
||||
continue
|
||||
tests.append(s)
|
||||
return tests
|
||||
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
"""Entry point: run GUI test modules registered in the FreeCAD executable.
|
||||
|
||||
Returns the last non-zero exit code from any GUI test module, or 0 on success.
|
||||
"""
|
||||
exec_arg = argv[1] if len(argv) > 1 else None
|
||||
freecad_exec = find_executable(exec_arg)
|
||||
|
||||
print(f"Using FreeCAD executable: {freecad_exec}")
|
||||
|
||||
ok, msg = validate_executable(freecad_exec)
|
||||
if msg:
|
||||
print(msg, file=sys.stderr)
|
||||
if not ok:
|
||||
print(f"Aborting: invalid FreeCAD executable: {freecad_exec}", file=sys.stderr)
|
||||
return 3
|
||||
|
||||
code, out = run_and_capture([freecad_exec, "-t"])
|
||||
if code != 0:
|
||||
print(
|
||||
f"Warning: listing tests returned exit code {code}; attempting to parse output anyway",
|
||||
file=sys.stderr,
|
||||
)
|
||||
|
||||
tests = parse_registered_tests(out)
|
||||
if not tests:
|
||||
print("No registered tests found; exiting with success.")
|
||||
return 0
|
||||
|
||||
gui_tests = [t for t in tests if "Gui" in t]
|
||||
if not gui_tests:
|
||||
print("No GUI tests found in registered tests; nothing to run.")
|
||||
return 0
|
||||
|
||||
print("Found GUI test modules:")
|
||||
for t in gui_tests:
|
||||
print(" ", t)
|
||||
|
||||
last_rc = 0
|
||||
for mod in gui_tests:
|
||||
print(f"\nRunning GUI tests for module: {mod}")
|
||||
rc, out = run_and_capture([freecad_exec, "-t", mod])
|
||||
print(out)
|
||||
if rc != 0:
|
||||
print(f"Module {mod} exited with code {rc}", file=sys.stderr)
|
||||
last_rc = rc
|
||||
|
||||
return last_rc
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv))
|
||||
@@ -1,115 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This workflow is a complementary one to the master CI.
|
||||
# It aims at doing cleanup operations after a CI workflow ran.
|
||||
# Being triggered when the master workflow ends allows it to run with necessary privileges.
|
||||
# Indeed it always run with push-like rights even for PR events.
|
||||
|
||||
# In order to work, this cleanup workflow imposes name formatting for caches
|
||||
# Caches that have to be cleaned (typically compiler caches) shall be named as below :
|
||||
# ${MARK}-${CONTEXT}-${REF}-${ID}
|
||||
# with :
|
||||
# ${MARK} => A mark identifying a cache to be cleaned, defined as being "FC" (without quotes)
|
||||
# ${CONTEXT} => A string identifying cache saving context, typically OS name or compiler name
|
||||
# ${REF} => The full reference of the branch owning the cache (starting with "/refs/pull/" or "/refs/heads/")
|
||||
# ${ID} => A cache unique identifier, generally an ascending number, in no case containing a '-' (hyphen) sign
|
||||
|
||||
name: FreeCAD CI cleaner
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [FreeCAD master CI]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
dryrun: false
|
||||
|
||||
concurrency:
|
||||
group: FC-CI-cleaner
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
|
||||
CachesCleanup:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
logdir: /tmp/log/
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
- name: Get existing caches for the repo
|
||||
run: |
|
||||
curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches > ${{ env.logdir }}caches.json
|
||||
- name: Extract pull request caches
|
||||
run: |
|
||||
# Extract caches of which names starts with MARK and contains "/refs/pull/"
|
||||
jq ".actions_caches | map(select(.key | startswith(\"FC-\"))) | map(select(.key | contains(\"refs/pull/\")))" ${{ env.logdir }}caches.json > ${{ env.logdir }}pulls.json
|
||||
- name: Extract and delete pull request obsolete cache IDs
|
||||
run: |
|
||||
# Group the caches by MARK-CONTEXT-REF, sort by ascending last access datetime and keep all but the last as to be deleted
|
||||
# As a consequence, for pull requests, only the most recent cache is kept (one for each context and for each PR)
|
||||
PRID=$(jq "group_by(.key | .[:rindex(\"-\")]) | .[] | sort_by(.last_accessed_at) | .[:-1][].id" ${{ env.logdir }}pulls.json)
|
||||
for id in $PRID
|
||||
do
|
||||
echo "Trying to delete pull request obsolete cache ID : $id"
|
||||
if [ ${{ env.dryrun }} == "false" ]
|
||||
then
|
||||
curl -X DELETE -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id
|
||||
else
|
||||
echo "DRYRUN: executing : curl -X DELETE -H \"Accept: application/vnd.github+json\" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id"
|
||||
fi
|
||||
done
|
||||
- name: Extract push caches
|
||||
run: |
|
||||
# Extract caches of which names starts with MARK and contains "/refs/heads/"
|
||||
jq ".actions_caches | map(select(.key | startswith(\"FC-\"))) | map(select(.key | contains(\"refs/heads/\")))" ${{ env.logdir }}caches.json > ${{ env.logdir }}pushes.json
|
||||
- name: Extract and delete push obsolete cache IDs
|
||||
run: |
|
||||
# Group the caches by MARK-CONTEXT-REF, sort by ascending last access datetime, keep all but the last 2 and keep all accessed for more than 1 hour as to be deleted
|
||||
# As a consequence, for pushes (repo branches), at least 2 caches (for each context and for each branch) are kept, others are deleted if they have been useless for more than 1 hour
|
||||
PSID=$(jq "group_by(.key | .[:rindex(\"-\")]) | .[] | sort_by(.last_accessed_at) | .[:-2][] | select((.last_accessed_at | if contains(\".\") then .[:rindex(\".\")]+\"Z\" else . end | fromdateiso8601) < (now | floor - 3600)) | .id" ${{ env.logdir }}pushes.json)
|
||||
for id in $PSID
|
||||
do
|
||||
echo "Trying to delete push obsolete cache ID : $id"
|
||||
if [ ${{ env.dryrun }} == "false" ]
|
||||
then
|
||||
curl -X DELETE -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id
|
||||
else
|
||||
echo "DRYRUN: executing : curl -X DELETE -H \"Accept: application/vnd.github+json\" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id"
|
||||
fi
|
||||
done
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ github.job }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
@@ -1,93 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the master workflow for CI of FreeCAD.
|
||||
# It (only) aims at properly organizing the sub-workflows.
|
||||
|
||||
name: FreeCAD master CI
|
||||
|
||||
on:
|
||||
workflow_dispatch: ~
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- releases/**
|
||||
pull_request: ~
|
||||
merge_group: ~
|
||||
|
||||
|
||||
concurrency:
|
||||
group: FC-CI-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Prepare:
|
||||
uses: ./.github/workflows/sub_prepare.yml
|
||||
with:
|
||||
artifactBasename: Prepare-${{ github.run_id }}
|
||||
|
||||
Pixi:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildPixi.yml
|
||||
with:
|
||||
artifactBasename: Pixi-${{ github.run_id }}
|
||||
|
||||
Ubuntu:
|
||||
needs: [Prepare]
|
||||
if: "!startsWith(github.head_ref, 'refs/heads/backport-')"
|
||||
uses: ./.github/workflows/sub_buildUbuntu.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu-${{ github.run_id }}
|
||||
|
||||
Windows:
|
||||
needs: [Prepare]
|
||||
if: "!startsWith(github.head_ref, 'refs/heads/backport-')"
|
||||
uses: ./.github/workflows/sub_buildWindows.yml
|
||||
with:
|
||||
artifactBasename: Windows-${{ github.run_id }}
|
||||
|
||||
Lint:
|
||||
needs: [Prepare]
|
||||
if: "!startsWith(github.head_ref, 'refs/heads/backport-')"
|
||||
uses: ./.github/workflows/sub_lint.yml
|
||||
with:
|
||||
artifactBasename: Lint-${{ github.run_id }}
|
||||
changedFiles: ${{ needs.Prepare.outputs.changedFiles }}
|
||||
changedLines: ${{ needs.Prepare.outputs.changedLines }}
|
||||
changedCppFiles: ${{ needs.Prepare.outputs.changedCppFiles }}
|
||||
changedCppLines: ${{ needs.Prepare.outputs.changedCppLines }}
|
||||
changedPythonFiles: ${{ needs.Prepare.outputs.changedPythonFiles }}
|
||||
changedPythonLines: ${{ needs.Prepare.outputs.changedPythonLines }}
|
||||
|
||||
WrapUp:
|
||||
needs: [
|
||||
Prepare,
|
||||
Pixi,
|
||||
Ubuntu,
|
||||
Windows,
|
||||
Lint
|
||||
]
|
||||
if: always()
|
||||
uses: ./.github/workflows/sub_wrapup.yml
|
||||
with:
|
||||
previousSteps: ${{ toJSON(needs) }}
|
||||
@@ -1,74 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: build
|
||||
description: "Linux: build application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake build"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build
|
||||
id: build
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
(stdbuf -oL -eL cmake --build ${{ inputs.builddir }} -j$(nproc) ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.build.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake build succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake build failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Build Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,79 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: configure
|
||||
description: "Linux: configure CMake"
|
||||
|
||||
inputs:
|
||||
sourcedir:
|
||||
description: "Directory where sources are stored"
|
||||
required: false
|
||||
default: ./
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake configure"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure CMake
|
||||
id: configure
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
(stdbuf -oL -eL cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.configure.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake configure succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake configure failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,47 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: generateCacheKey
|
||||
description: "Linux: generates a cache key taking into account distro and compiler"
|
||||
|
||||
inputs:
|
||||
compiler:
|
||||
description: "Binary name/path of compiler to be used"
|
||||
required: true
|
||||
qt_major_version:
|
||||
description: "Major version number of qt to be used"
|
||||
required: true
|
||||
outputs:
|
||||
cacheKey:
|
||||
description: "Cache key with distro and compiler version"
|
||||
value: ${{ steps.generateCacheKey.outputs.cacheKey }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: generateCacheKey
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cacheKey=$(lsb_release -ds | tr -d ' ')-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)-qt${{ inputs.qt_major_version }}
|
||||
echo "Generated cache key : $cacheKey"
|
||||
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
|
||||
@@ -1,74 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: install
|
||||
description: "Linux: install application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build is stored"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake install"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install
|
||||
id: install
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
(stdbuf -oL -eL sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.install.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake install succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake install failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stdout output trimmed to the last 100 Lines):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
tail -n 100 ${{ inputs.logFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,73 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: build
|
||||
description: "macOS: build application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake build"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build
|
||||
id: build
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
(cmake --build ${{ inputs.builddir }} -j$(nproc) ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.build.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake build succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake build failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Build Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,78 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: configure
|
||||
description: "macOS: configure CMake"
|
||||
|
||||
inputs:
|
||||
sourcedir:
|
||||
description: "Directory where sources are stored"
|
||||
required: false
|
||||
default: ./
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake configure"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure CMake
|
||||
id: configure
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
(cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.configure.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake configure succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake configure failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,44 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: generateCacheKey
|
||||
description: "macOS: generates a cache key taking into account distro and compiler"
|
||||
|
||||
inputs:
|
||||
compiler:
|
||||
description: "Binary name/path of compiler to be used"
|
||||
required: true
|
||||
outputs:
|
||||
cacheKey:
|
||||
description: "Cache key with distro and compiler version"
|
||||
value: ${{ steps.generateCacheKey.outputs.cacheKey }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: generateCacheKey
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cacheKey=$(sw_vers --productName)-$(sw_vers --productVersion)-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)
|
||||
echo "Generated cache key : $cacheKey"
|
||||
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
|
||||
@@ -1,73 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: install
|
||||
description: "macOS: install application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build is stored"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake install"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install
|
||||
id: install
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
(sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.install.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake install succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake install failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stdout output trimmed to the last 100 Lines):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
tail -n 100 ${{ inputs.logFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,175 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 The FreeCAD Project Association *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# !!! Each step running a single test shall have an'id' defined so its report will be output
|
||||
|
||||
name: Run all C++ Tests
|
||||
description: "Run all C++ tests, generating logs and reports for each"
|
||||
|
||||
inputs:
|
||||
reportdir:
|
||||
description: "Report directory where logs will be stored"
|
||||
required: true
|
||||
builddir:
|
||||
description: "Build directory where tests are located"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: C++ Assembly tests
|
||||
id: assembly
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Assembly_tests_run --gtest_output=json:${{ inputs.reportdir }}assembly_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}assembly_gtest_test_log.txt
|
||||
testName: Assembly
|
||||
- name: C++ app tests
|
||||
id: app
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/App_tests_run --gtest_output=json:${{ inputs.reportdir }}app_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}app_gtest_test_log.txt
|
||||
testName: App
|
||||
- name: C++ base tests
|
||||
id: base
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Base_tests_run --gtest_output=json:${{ inputs.reportdir }}base_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}base_gtest_test_log.txt
|
||||
testName: Base
|
||||
- name: C++ Gui tests
|
||||
id: gui
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Gui_tests_run --gtest_output=json:${{ inputs.reportdir }}gui_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}gui_gtest_test_log.txt
|
||||
testName: Gui
|
||||
- name: C++ Qt tests
|
||||
id: qttests
|
||||
uses: ./.github/workflows/actions/runCPPTests/runQtTests
|
||||
with:
|
||||
builddir: ${{ inputs.builddir }}
|
||||
testLogFile: ${{ inputs.reportdir }}qt_ctest_log.txt
|
||||
- name: C++ Material tests
|
||||
id: material
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Material_tests_run --gtest_output=json:${{ inputs.reportdir }}material_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}material_gtest_test_log.txt
|
||||
testName: Material
|
||||
- name: C++ Measure tests
|
||||
id: measure
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Material_tests_run --gtest_output=json:${{ inputs.reportdir }}measure_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}measure_gtest_test_log.txt
|
||||
testName: Measure
|
||||
- name: C++ Mesh tests
|
||||
id: mesh
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Mesh_tests_run --gtest_output=json:${{ inputs.reportdir }}mesh_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}mesh_gtest_test_log.txt
|
||||
testName: Mesh
|
||||
- name: C++ MeshPart tests
|
||||
id: meshpart
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Mesh_tests_run --gtest_output=json:${{ inputs.reportdir }}meshpart_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}meshpart_gtest_test_log.txt
|
||||
testName: MeshPart
|
||||
- name: C++ Misc tests
|
||||
id: misc
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Misc_tests_run --gtest_output=json:${{ inputs.reportdir }}misc_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}misc_gtest_test_log.txt
|
||||
testName: Misc
|
||||
- name: C++ Part tests
|
||||
id: part
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Part_tests_run --gtest_output=json:${{ inputs.reportdir }}part_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}Part_gtest_test_log.txt
|
||||
testName: Part
|
||||
- name: C++ PartDesign tests
|
||||
id: partdesign
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/PartDesign_tests_run --gtest_output=json:${{ inputs.reportdir }}partdesign_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}PartDesign_gtest_test_log.txt
|
||||
testName: PartDesign
|
||||
- name: C++ Points tests
|
||||
id: points
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Points_tests_run --gtest_output=json:${{ inputs.reportdir }}points_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}points_gtest_test_log.txt
|
||||
testName: Points
|
||||
- name: C++ Sketcher tests
|
||||
id: sketcher
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}sketcher_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}sketcher_gtest_test_log.txt
|
||||
testName: Sketcher
|
||||
- name: C++ Spreadsheet tests
|
||||
id: spreadsheet
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}spreadsheet_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}spreadsheet_gtest_test_log.txt
|
||||
testName: Spreadsheet
|
||||
- name: C++ Start tests
|
||||
id: start
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Start_tests_run --gtest_output=json:${{ inputs.reportdir }}start_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}start_gtest_test_log.txt
|
||||
testName: Start
|
||||
- name: Compose summary report based on test results
|
||||
if: always()
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
# Print global result
|
||||
if [ ${{ job.status }} != "success" ]
|
||||
then
|
||||
echo "<details><summary>:fire: C++ tests failed</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: C++ tests succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "<blockquote>" >> ${{ inputs.reportFile }}
|
||||
#Extract individual results
|
||||
cat > /tmp/data << "EOD"
|
||||
${{ toJSON(steps) }}
|
||||
EOD
|
||||
echo "$(jq -r ".[].outputs.reportText" /tmp/data)" >> ${{ inputs.reportFile }}
|
||||
# Close report
|
||||
echo "</blockquote>" >> ${{ inputs.reportFile }}
|
||||
echo "</details>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,55 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-FileNotice: Part of the FreeCAD project.
|
||||
|
||||
name: runQtTests
|
||||
description: "Run all QtTest-based C++ tests (those labelled 'Qt' in CTest), generate log and report"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Build directory containing CTestTestfile.cmake"
|
||||
required: true
|
||||
testLogFile:
|
||||
description: "Path for the command-line output of the tests"
|
||||
required: true
|
||||
outputs:
|
||||
reportText:
|
||||
description: "Report text"
|
||||
value: ${{ steps.report.outputs.reportText }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run Qt tests via CTest
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
BUILD_DIR: ${{ inputs.builddir }}
|
||||
TEST_LOG_FILE: ${{ inputs.testLogFile }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
ctest --test-dir "$BUILD_DIR" -L Qt --output-on-failure | tee -a "$TEST_LOG_FILE"
|
||||
- name: Parse test results
|
||||
if: always()
|
||||
id: report
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
TEST_LOG_FILE: ${{ inputs.testLogFile }}
|
||||
run: |
|
||||
result=$(grep -E "(Test #|tests passed|tests failed|Total Test time)" "$TEST_LOG_FILE" || true)
|
||||
if grep -qE "[1-9][0-9]* tests failed" "$TEST_LOG_FILE"
|
||||
then
|
||||
reportText="<details><summary>:fire: QtTest C++ tests failed</summary>\n"
|
||||
else
|
||||
reportText="<details><summary>:heavy_check_mark: QtTest C++ tests succeeded</summary>\n"
|
||||
fi
|
||||
reportText+="\n"
|
||||
reportText+="Results\n"
|
||||
reportText+="\n"
|
||||
reportText+='```\n'
|
||||
reportText+="$result\n"
|
||||
reportText+='```\n'
|
||||
reportText+="</details>\n"
|
||||
reportText+="\n"
|
||||
echo "reportText<<EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText" >> $GITHUB_OUTPUT
|
||||
echo "EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText"
|
||||
@@ -1,62 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-FileNotice: Part of the FreeCAD project.
|
||||
|
||||
name: runSingleQtTest
|
||||
description: "Run a single QtTest-based C++ test executable, generate log and report"
|
||||
|
||||
inputs:
|
||||
testCommand:
|
||||
description: "Test executable path"
|
||||
required: true
|
||||
testLogFile:
|
||||
description: "Path for the command-line output of the tests"
|
||||
required: true
|
||||
testName:
|
||||
description: "A descriptive name for the test suite"
|
||||
required: true
|
||||
outputs:
|
||||
reportText:
|
||||
description: "Report text"
|
||||
value: ${{ steps.report.outputs.reportText }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run QtTest tests
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
QT_QPA_PLATFORM: offscreen
|
||||
TEST_COMMAND: ${{ inputs.testCommand }}
|
||||
TEST_LOG_FILE: ${{ inputs.testLogFile }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
$TEST_COMMAND | tee -a "$TEST_LOG_FILE"
|
||||
- name: Parse test results
|
||||
if: always()
|
||||
id: report
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
TEST_LOG_FILE: ${{ inputs.testLogFile }}
|
||||
TEST_NAME: ${{ inputs.testName }}
|
||||
run: |
|
||||
# This bonkers sed regex is to try to find the start and end of the QtTest output block, which is not really
|
||||
# designed to be machine-readable. Why did they have to choose asterisks?!?!
|
||||
result=$(sed -n '/^\*\*\*\*\*\*\*\*\* Start/,/^\*\*\*\*\*\*\*\*\* Finished/p' "$TEST_LOG_FILE" || true)
|
||||
if grep -qE "^FAIL!" "$TEST_LOG_FILE"
|
||||
then
|
||||
reportText="<details><summary>:fire: QtTest C++ test suite '${TEST_NAME}' failed</summary>\n"
|
||||
else
|
||||
reportText="<details><summary>:heavy_check_mark: QtTest C++ test suite '${TEST_NAME}' succeeded</summary>\n"
|
||||
fi
|
||||
reportText+="\n"
|
||||
reportText+="Results\n"
|
||||
reportText+="\n"
|
||||
reportText+='```\n'
|
||||
reportText+="$result\n"
|
||||
reportText+='```\n'
|
||||
reportText+="</details>\n"
|
||||
reportText+="\n"
|
||||
echo "reportText<<EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText" >> $GITHUB_OUTPUT
|
||||
echo "EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText"
|
||||
@@ -1,74 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * Copyright (c) 2023 FreeCAD Project Association *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: runCPPTests
|
||||
description: "Run C++ tests, generate log and report"
|
||||
|
||||
inputs:
|
||||
testCommand:
|
||||
description: "Test command to be run"
|
||||
required: true
|
||||
testLogFile:
|
||||
description: "Path for the command-line output of the tests"
|
||||
required: true
|
||||
testName:
|
||||
description: "A descriptive name for the test suite"
|
||||
required: true
|
||||
outputs:
|
||||
reportText:
|
||||
description: "Report text"
|
||||
value: ${{ steps.report.outputs.reportText }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run C++ tests
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
${{ inputs.testCommand }} | tee -a ${{ inputs.testLogFile }}
|
||||
- name: Parse test results
|
||||
if: always()
|
||||
id: report
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
result=$(sed -ne "/Global test environment tear-down/,/^$/{/^$/d;p}" ${{ inputs.testLogFile }})
|
||||
if grep -qF "[ FAILED ]" <<< $result
|
||||
then
|
||||
reportText="<details><summary>:fire: GTest C++ test suite '${{ inputs.testName }}' failed</summary>\n"
|
||||
else
|
||||
reportText="<details><summary>:heavy_check_mark: GTest C++ test suite '${{ inputs.testName }}' succeeded</summary>\n"
|
||||
fi
|
||||
reportText+="\n"
|
||||
reportText+="Results\n"
|
||||
reportText+="\n"
|
||||
reportText+='```\n'
|
||||
reportText+="$result\n"
|
||||
reportText+='```\n'
|
||||
reportText+="</details>\n"
|
||||
reportText+="\n"
|
||||
echo "reportText<<EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText" >> $GITHUB_OUTPUT
|
||||
echo "EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText"
|
||||
@@ -1,82 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: runPythonTests
|
||||
description: "Run Python tests, generate log and report"
|
||||
|
||||
inputs:
|
||||
testDescription:
|
||||
description: "Test description text, will be used on report"
|
||||
required: true
|
||||
testCommand:
|
||||
description: "Test command to be run"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run tests
|
||||
id: runTests
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
${{ inputs.testCommand }} | sed -Ee "/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d" | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
sed -ne "/^\(FAILED\|ERROR\):/,/^[[:blank:]]*$/bF; /^Traceback/,/^[^[:blank:]]/{/^Traceback/bT; /^[^[:blank:]]/G; bT}; b; :T w ${{ inputs.logFile }}_tracebacks" -e "b; :F w ${{ inputs.logFile }}_failedtests" ${{ inputs.logFile }}
|
||||
icon=""
|
||||
if [ $( cat ${{ inputs.logFile }}_tracebacks | wc -l ) -gt 0 ]
|
||||
then
|
||||
icon=" :fire:"
|
||||
fi
|
||||
if [ ${{ steps.runTests.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: ${{ inputs.testDescription }} succeeded$icon</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: ${{ inputs.testDescription }} failed$icon</summary>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Failed tests" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }}_failedtests >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
if [ $( cat ${{ inputs.logFile }}_tracebacks | wc -l ) -gt 0 ]
|
||||
then
|
||||
echo "Uncaught tracebacks -- these tracebacks appeared during test but didn't fail a test --" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }}_tracebacks >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,78 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This action aims at speeding up CI and reduce dependency to external resources
|
||||
# by creating a cache of Ccache needed binaries then using it for CI runs rather
|
||||
# than downloading every time.
|
||||
#
|
||||
# If it needs to be updated to another version, the process it to change
|
||||
# 'downloadpath' and 'version' inputs below then delete the existing cache
|
||||
# from Github interface so a new one is generated using new values.
|
||||
|
||||
name: getCcache
|
||||
description: "Windows: tries to get a cached version of Ccache and create one if fails"
|
||||
|
||||
inputs:
|
||||
ccachebindir:
|
||||
description: "Directory where ccache binaries shall be stored"
|
||||
required: true
|
||||
# Below inputs shall generally not be provided as they won't be used if a cached version exists
|
||||
# They are mainly used because Github do not support adding env variables in a composite action
|
||||
ccachedownloadpath:
|
||||
description: "Path where to download ccache"
|
||||
required: false
|
||||
default: https://github.com/ccache/ccache/releases/download/v4.9/
|
||||
ccacheversion:
|
||||
description: "Ccache version to be downloaded"
|
||||
required: false
|
||||
default: ccache-4.9-windows-x86_64
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create destination directory
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.ccachebindir }}
|
||||
- name: Get cached version
|
||||
uses: actions/cache/restore@v4
|
||||
id: getCached
|
||||
with:
|
||||
path: ${{ inputs.ccachebindir }}
|
||||
key: ccacheforwin-${{ inputs.ccacheversion }}
|
||||
- name: Download ccache
|
||||
shell: bash
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -L -o ccache.zip ${{ inputs.ccachedownloadpath }}${{ inputs.ccacheversion }}.zip
|
||||
7z x ccache.zip -o"ccachetemp" -r -y
|
||||
cp -a ccachetemp/${{ inputs.ccacheversion }}/ccache.exe ${{ inputs.ccachebindir }}
|
||||
cp -a ccachetemp/${{ inputs.ccacheversion }}/ccache.exe ${{ inputs.ccachebindir }}/cl.exe
|
||||
rm ccache.zip
|
||||
rm -rf ccachetemp
|
||||
- name: Save version to cache
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ inputs.ccachebindir }}
|
||||
key: ${{ steps.getCached.outputs.cache-primary-key }}
|
||||
@@ -1,76 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This action aims at speeding up CI and reduce dependency to external resources
|
||||
# by creating a cache of Libpack needed files then using it for CI runs rather
|
||||
# than downloading every time.
|
||||
#
|
||||
# If it needs to be updated to another version, the process it to change
|
||||
# 'downloadpath' and 'version' inputs below then delete the existing cache
|
||||
# from Github interface so a new one is generated using new values.
|
||||
|
||||
name: getLibpack
|
||||
description: "Windows: tries to get a cached version of Libpack and create one if fails"
|
||||
|
||||
inputs:
|
||||
libpackdir:
|
||||
description: "Directory where libpack files shall be stored"
|
||||
required: true
|
||||
# Below inputs shall generally not be provided as they won't be used if a cached version exists
|
||||
# They are mainly used because Github do not support adding env variables in a composite action
|
||||
libpackdownloadurl:
|
||||
description: "URL where to download libpack"
|
||||
required: false
|
||||
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/3.1.1.3/LibPack-1.1.0-v3.1.1.3-Release.7z
|
||||
libpackname:
|
||||
description: "Libpack name (once downloaded)"
|
||||
required: false
|
||||
default: LibPack-1.1.0-v3.1.1.3-Release
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create destination directory
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.libpackdir }}
|
||||
- name: Get cached version
|
||||
uses: actions/cache/restore@v4
|
||||
id: getCached
|
||||
with:
|
||||
path: ${{ inputs.libpackdir }}
|
||||
key: libpackforwin-${{ inputs.libpackname }}
|
||||
- name: Download libpack
|
||||
shell: bash
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -L -o libpack.7z ${{ inputs.libpackdownloadurl }}
|
||||
7z x libpack.7z -o"libpacktemp" -r -y
|
||||
mv libpacktemp/${{ inputs.libpackname }}/* ${{ inputs.libpackdir }}
|
||||
rm -rf libpacktemp
|
||||
- name: Save version to cache
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ inputs.libpackdir }}
|
||||
key: ${{ steps.getCached.outputs.cache-primary-key }}
|
||||
@@ -1,133 +0,0 @@
|
||||
# This workflow warns and then closes issues that have had no activity for a
|
||||
# specified amount of time. You can adjust the behavior by modifying this file.
|
||||
# For more information, see:
|
||||
# https://github.com/marketplace/actions/close-stale-issues
|
||||
# https://github.com/actions/stale/blob/master/action.yml
|
||||
# https://github.com/actions/stale
|
||||
---
|
||||
name: 'Stale Issues'
|
||||
on: # yamllint disable-line rule:truthy
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Run at 00:00 UTC every day
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale pull requests
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: '🧹 Tag & close stale unconfirmed bugs'
|
||||
id: stale_issues
|
||||
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 90
|
||||
days-before-issue-close: 14
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 200 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
exempt-issue-labels: 'Status: Confirmed,Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close,3rd party: OCC'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while. If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the problem is resolved.
|
||||
|
||||
If the issue persists, let us know by adding a comment with any updates or details. Otherwise, we’ll close this issue automatically in 14 days to keep our backlog tidy. Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Close stale requested feedback issues'
|
||||
id: awaiting_issues
|
||||
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 20
|
||||
days-before-issue-close: 14
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 100 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
only-labels: 'Status: Needs feedback,Status: Needs test on dev version,Status: Needs steps to reproduce'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while despite the need for further feedback.
|
||||
If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the problem is resolved.
|
||||
|
||||
If the issue persists, let us know by adding a comment with any updates or details. Otherwise, we’ll close this issue automatically in 14 days to keep our backlog tidy. Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Tag & close inactive issues'
|
||||
id: inactive_issues
|
||||
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 190
|
||||
days-before-issue-close: 60
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 100 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
exempt-issue-labels: 'Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close,3rd party: OCC'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while. We automatically check each issue after 190 days without activity to keep the backlog tidy.
|
||||
If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the issue is already resolved.
|
||||
|
||||
If the issue is still relevant, let us know by adding a comment.
|
||||
Otherwise, we’ll close this issue automatically in 60 days.
|
||||
|
||||
Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Tag & close inactive PRs'
|
||||
id: inactive_pr
|
||||
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: -1
|
||||
days-before-issue-close: -1
|
||||
days-before-pr-stale: 120
|
||||
days-before-pr-close: 60
|
||||
operations-per-run: 30 # max num of ops per run
|
||||
stale-pr-label: 'Status: Stale'
|
||||
close-pr-label: 'Status: Auto-closing'
|
||||
exempt-pr-labels: 'Needs backport,Priority: High,Priority: Critical,no-auto-close'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-pr-message: |
|
||||
Thanks for helping improve FreeCAD!
|
||||
This pull request hasn’t seen activity in a while. We automatically check each PR after 120 days without activity to keep the repository tidy.
|
||||
|
||||
If the PR is still relevant, let us know by adding a comment.
|
||||
Otherwise, we’ll close this PR automatically in 60 days.
|
||||
|
||||
If you would like to keep working on this pull request, we advice to rebase it on current main branch, ask feedback from users or maintainers and engage with the community to get it forward.
|
||||
@@ -1,52 +0,0 @@
|
||||
name: Backport merged pull request
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed, labeled]
|
||||
branches: [main, releases/*]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
name: Create backport pull request
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Run the action if a PR is merged with backport labels
|
||||
# OR
|
||||
# when already merged PR is labeled with backport labels
|
||||
if: >
|
||||
github.event.pull_request.merged
|
||||
&& (
|
||||
github.event.action == 'closed'
|
||||
|| (
|
||||
github.event.action == 'labeled'
|
||||
&& startsWith(github.event.label.name, 'backport ')
|
||||
)
|
||||
)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN_FOR_CI_RUNNERS }}
|
||||
|
||||
- name: Create backport pull requests
|
||||
uses: korthout/backport-action@01619ebc9a6e3f6820274221b9956b3e7365000a # v4.1.0
|
||||
with:
|
||||
# Inputs documented here: https://github.com/korthout/backport-action?tab=readme-ov-file#inputs
|
||||
github_token: ${{ secrets.GH_TOKEN_FOR_CI_RUNNERS }}
|
||||
github_workspace: ${{ github.workspace }}
|
||||
|
||||
# permit PRs with merge commits to be backported
|
||||
merge_commits: 'skip'
|
||||
|
||||
# copy labels to backport to identify affected systems and priorities
|
||||
copy_labels_pattern: '.*'
|
||||
|
||||
# Regex pattern to match github labels
|
||||
# The capture group catches the target branch
|
||||
# i.e. label "backport releases/FreeCAD-1-0" will create backport
|
||||
# PR for branch releases/FreeCAD-1-0
|
||||
label_pattern: ^backport ([^ ]+)$
|
||||
@@ -1,277 +0,0 @@
|
||||
name: Build Release
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
schedule:
|
||||
- cron: "0 0 * * 3"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
|
||||
concurrency:
|
||||
group: build-release-${{ github.event_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
upload_src:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
build_tag: ${{ steps.get_tag.outputs.build_tag }}
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
fetch-depth: 2
|
||||
fetch-tags: true
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Get tag and create release if weekly
|
||||
id: get_tag
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "release" ]; then
|
||||
export BUILD_TAG="${{ github.event.release.tag_name }}"
|
||||
else
|
||||
export BUILD_TAG=weekly-$(date "+%Y.%m.%d")
|
||||
gh release create ${BUILD_TAG} --title "Development Build ${BUILD_TAG}" \
|
||||
-F .github/workflows/weekly-build-notes.md \
|
||||
--prerelease || \
|
||||
gh release view ${BUILD_TAG} > /dev/null # fail if it doesn't exist
|
||||
fi
|
||||
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
|
||||
echo "build_tag=${BUILD_TAG}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Trigger notes updater workflow (only for weekly)
|
||||
if: startsWith(steps.get_tag.outputs.build_tag, 'weekly-')
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
env:
|
||||
WEEKLY_TAG: ${{ steps.get_tag.outputs.build_tag }}
|
||||
with:
|
||||
script: |
|
||||
const owner = context.repo.owner;
|
||||
const repo = context.repo.repo;
|
||||
|
||||
// Reusable/dispatchable updater workflow file in .github/workflows/
|
||||
const workflow_id = 'weekly-compare-link.yml';
|
||||
|
||||
// Use the default branch so the workflow file is available
|
||||
const ref = (context.payload?.repository?.default_branch) || 'main';
|
||||
const current_tag = process.env.WEEKLY_TAG || '';
|
||||
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner, repo, workflow_id, ref,
|
||||
inputs: { current_tag }
|
||||
});
|
||||
|
||||
core.info(`Dispatched ${workflow_id} on ${ref} with current_tag='${current_tag}'.`)
|
||||
|
||||
- name: Upload Source
|
||||
id: upload_source
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
python3 package/scripts/write_version_info.py ../freecad_version.txt
|
||||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
||||
git config user.name 'github-actions[bot]'
|
||||
git apply package/disable_git_info.patch
|
||||
git commit -a -m "Disable git info write to Version.h"
|
||||
git archive HEAD -o freecad_source_${BUILD_TAG}.tar
|
||||
git submodule foreach --recursive \
|
||||
"git archive HEAD --prefix=\$path/ -o \$sha1.tar && \
|
||||
tar -A -f \$toplevel/freecad_source_${BUILD_TAG}.tar \$sha1.tar && \
|
||||
rm \$sha1.tar"
|
||||
gzip freecad_source_${BUILD_TAG}.tar
|
||||
sha256sum freecad_source_${BUILD_TAG}.tar.gz > freecad_source_${BUILD_TAG}.tar.gz-SHA256.txt
|
||||
gh release upload --clobber ${BUILD_TAG} "freecad_source_${BUILD_TAG}.tar.gz" "freecad_source_${BUILD_TAG}.tar.gz-SHA256.txt"
|
||||
|
||||
build:
|
||||
needs: upload_src
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { target: linux-64, os: ubuntu-22.04 }
|
||||
- { target: linux-arm64, os: ubuntu-22.04-arm }
|
||||
- { target: osx-64, os: macos-15-intel, deploy_target: "10.13" }
|
||||
- { target: osx-arm64, os: macos-latest, deploy_target: "11.0" }
|
||||
- { target: osx-arm64, os: macos-latest, deploy_target: "15.0" }
|
||||
- { target: win-64, os: windows-latest }
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
environment: weekly-build
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
# prevent running out of disk space on Ubuntu runners.
|
||||
- name: Maximize build space
|
||||
if: runner.os == 'Linux'
|
||||
uses: AdityaGarg8/remove-unwanted-software@90e01b21170618765a73370fcc3abbd1684a7793 # v5
|
||||
with:
|
||||
verbose: 'true'
|
||||
remove-android: 'true' # (frees ~9 GB)
|
||||
remove-cached-tools: 'true' # (frees ~8.3 GB)
|
||||
|
||||
- name: Set platform environment variables
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
OPERATING_SYSTEM: ${{ runner.os }}
|
||||
run: |
|
||||
if [[ $OPERATING_SYSTEM == 'Windows' ]]; then
|
||||
echo 'PIXI_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
|
||||
echo 'RATTLER_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
fetch-depth: 2
|
||||
fetch-tags: true
|
||||
submodules: 'recursive'
|
||||
|
||||
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
|
||||
with:
|
||||
pixi-version: v0.59.0
|
||||
cache: false
|
||||
|
||||
- name: Install the Apple certificate and provisioning profile
|
||||
id: macos_get_cert
|
||||
if: runner.os == 'macOS'
|
||||
env:
|
||||
APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
|
||||
DEVELOPER_TEAM_ID: ${{ secrets.DEVELOPER_TEAM_ID }}
|
||||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||
run: |
|
||||
if [ -z "$BUILD_CERTIFICATE_BASE64" ]; then
|
||||
echo "has_cert=false" >> $GITHUB_OUTPUT
|
||||
echo "No certificate avalable... skipping" && exit 0
|
||||
else
|
||||
echo "has_cert=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
PP_PATH=$RUNNER_TEMP/FreeCAD_bundle.provisionprofile
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
export KEYCHAIN_PASSWORD=$(openssl rand -base64 8)
|
||||
|
||||
# import certificate and provisioning profile from secrets
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
|
||||
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
# apply provisioning profile
|
||||
mkdir -p ~/Library/Provisioning\ Profiles
|
||||
cp $PP_PATH ~/Library/Provisioning\ Profiles
|
||||
|
||||
xcrun notarytool store-credentials "FreeCAD" --keychain "$KEYCHAIN_PATH" --apple-id "${APPLE_ID}" --password "${APP_SPECIFIC_PASSWORD}" --team-id "${DEVELOPER_TEAM_ID}"
|
||||
|
||||
- name: Setup .NET 10 SDK
|
||||
if: runner.os == 'Windows'
|
||||
uses: actions/setup-dotnet@baa11fbfe1d6520db94683bd5c7a3818018e4309 # v5.1.0
|
||||
with:
|
||||
dotnet-version: '10.0.103'
|
||||
|
||||
- name: Install sign tool
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
# NOTE: The sign tool is ONLY available as a prerelease package, they never issue real releases.
|
||||
dotnet tool install --global --prerelease sign
|
||||
echo "$env:USERPROFILE\.dotnet\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
dotnet --info
|
||||
sign --version
|
||||
|
||||
- name: Build packages
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TARGET_PLATFORM: ${{ matrix.target }}
|
||||
BUILD_TAG: ${{ needs.upload_src.outputs.build_tag }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||
export MACOS_DEPLOYMENT_TARGET="${{ matrix.deploy_target }}"
|
||||
fi
|
||||
python3 package/scripts/write_version_info.py ../freecad_version.txt
|
||||
cd package/rattler-build
|
||||
pixi install
|
||||
|
||||
- name: Azure login for Windows build code signing
|
||||
id: azure_login
|
||||
if: runner.os == 'Windows'
|
||||
continue-on-error: true
|
||||
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
|
||||
with:
|
||||
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
|
||||
|
||||
- name: Release packages with optional code-signing on Windows and macOS
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TARGET_PLATFORM: ${{ matrix.target }}
|
||||
MAKE_INSTALLER: "true"
|
||||
UPLOAD_RELEASE: "true"
|
||||
BUILD_TAG: ${{ needs.upload_src.outputs.build_tag }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
export MACOS_SIGN_RELEASE=0
|
||||
export WINDOWS_SIGN_RELEASE=0
|
||||
|
||||
case "${RUNNER_OS}" in
|
||||
Windows)
|
||||
export WINDOWS_SIGN_RELEASE="${{ steps.azure_login.outcome }}"
|
||||
export WINDOWS_AZURE_ENDPOINT="${{ vars.AZURE_TRUSTED_SIGNING_ENDPOINT }}"
|
||||
export WINDOWS_AZURE_CERTIFICATE_PROFILE="${{ vars.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }}"
|
||||
export WINDOWS_AZURE_SIGNING_ACCOUNT="${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT }}"
|
||||
|
||||
# For good measure, normalize the azure_login result to 1 or 0
|
||||
if [[ "${WINDOWS_SIGN_RELEASE:-}" == "success" ]]; then
|
||||
export WINDOWS_SIGN_RELEASE=1
|
||||
else
|
||||
export WINDOWS_SIGN_RELEASE=0
|
||||
fi
|
||||
;;
|
||||
|
||||
macOS)
|
||||
export MACOS_SIGN_RELEASE="${{ steps.macos_get_cert.outputs.has_cert }}"
|
||||
export MACOS_SIGNING_KEY_ID="${{ secrets.SIGNING_KEY_ID }}"
|
||||
export MACOS_DEPLOYMENT_TARGET="${{ matrix.deploy_target }}"
|
||||
;;
|
||||
esac
|
||||
|
||||
cd package/rattler-build
|
||||
pixi run -e package create_bundle
|
||||
|
||||
## Needed if running on a self-hosted runner:
|
||||
# - name: Clean up keychain and provisioning profile
|
||||
# if: ${{ always() }}
|
||||
# run: |
|
||||
# security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
# rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
|
||||
@@ -1,127 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '28 12 * * 6'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
build-mode: none
|
||||
# - language: c-cpp
|
||||
# build-mode: autobuild
|
||||
# - language: javascript-typescript
|
||||
# build-mode: none
|
||||
- language: python
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
submodules: recursive
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended
|
||||
queries: security-and-quality
|
||||
|
||||
# Change the CodeQL Bundle version
|
||||
# tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.20.7/codeql-bundle-linux64.tar.gz
|
||||
|
||||
# Add exclusions
|
||||
config: |
|
||||
paths-ignore:
|
||||
- src/Mod/Import/App/SCL_output/**
|
||||
query-filters:
|
||||
- exclude:
|
||||
id: py/file-not-closed
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -1,163 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced (c-cpp)"
|
||||
|
||||
on:
|
||||
# push:
|
||||
# branches: [ "main" ]
|
||||
# pull_request:
|
||||
# branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '28 12 * * 6'
|
||||
workflow_dispatch: # Allow manual triggers
|
||||
|
||||
env:
|
||||
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# - language: actions
|
||||
# build-mode: none
|
||||
- language: c-cpp
|
||||
build-mode: autobuild
|
||||
# - language: javascript-typescript
|
||||
# build-mode: none
|
||||
# - language: python
|
||||
# build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
# prevent running out of disk space on Ubuntu runners.
|
||||
- name: Maximize build space
|
||||
uses: AdityaGarg8/remove-unwanted-software@90e01b21170618765a73370fcc3abbd1684a7793 # v5
|
||||
with:
|
||||
verbose: 'true'
|
||||
remove-android: 'true' # (frees ~9 GB)
|
||||
remove-cached-tools: 'true' # (frees ~8.3 GB)
|
||||
remove-haskell: 'true' # (frees ~5.2 GB)
|
||||
remove-swapfile: 'true' # (frees ~4 GB)
|
||||
remove-docker-images: 'true' # (frees ~3.2 GB)
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
submodules: recursive
|
||||
|
||||
# Install FreeCAD dependencies (cpp)
|
||||
- name: Setup build environment
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended
|
||||
queries: security-and-quality
|
||||
|
||||
# Change the CodeQL Bundle version
|
||||
# tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.20.7/codeql-bundle-linux64.tar.gz
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
output: sarif-results
|
||||
upload: failure-only
|
||||
|
||||
- name: filter-sarif
|
||||
uses: advanced-security/filter-sarif@v1
|
||||
with:
|
||||
patterns: |
|
||||
-tests/**/*
|
||||
-src/3rdParty/**/*
|
||||
-**/ui_*.h
|
||||
-**/moc_*.cpp
|
||||
input: sarif-results/cpp.sarif
|
||||
output: sarif-results/cpp.sarif
|
||||
|
||||
- name: Upload SARIF
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: sarif-results/cpp.sarif
|
||||
|
||||
- name: Upload loc as a Build Artifact
|
||||
uses: actions/upload-artifact@v7.0.0
|
||||
with:
|
||||
name: sarif-results
|
||||
path: sarif-results
|
||||
retention-days: 1
|
||||
@@ -1,27 +0,0 @@
|
||||
# Dependency Review Action
|
||||
#
|
||||
# This Action will scan dependency manifest files that change as part of a Pull Request,
|
||||
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
|
||||
# Once installed, if the workflow run is marked as required,
|
||||
# PRs introducing known-vulnerable packages will be blocked from merging.
|
||||
#
|
||||
# Source repository: https://github.com/actions/dependency-review-action
|
||||
name: 'Dependency Review'
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@05fe4576374b728f0c523d6a13d64c25081e0803 # v4
|
||||
@@ -1,39 +0,0 @@
|
||||
name: Fedora Daily Build
|
||||
permissions:
|
||||
contents: read
|
||||
on:
|
||||
schedule:
|
||||
- cron: "00 00 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
trigger-copr-build:
|
||||
environment: fedora-daily
|
||||
env:
|
||||
copr_login: ${{ secrets.COPR_LOGIN }}
|
||||
copr_username: ${{ secrets.COPR_USERNAME }}
|
||||
copr_token: ${{ secrets.COPR_TOKEN }}
|
||||
runs-on: ubuntu-latest
|
||||
container: quay.io/packit/packit
|
||||
steps:
|
||||
- name: setup copr token
|
||||
run: |
|
||||
mkdir -p ~/.config
|
||||
echo \
|
||||
"[copr-cli]
|
||||
login = $copr_login
|
||||
username = $copr_username
|
||||
token = $copr_token
|
||||
copr_url = https://copr.fedorainfracloud.org
|
||||
" > ~/.config/copr
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 500
|
||||
fetch-tags: true
|
||||
- name: Setup safe Git directory
|
||||
run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
- name: trigger copr build
|
||||
run: |
|
||||
packit build in-copr --project freecad
|
||||
@@ -1,68 +0,0 @@
|
||||
name: Fetch Crowdin Translations
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * 1"
|
||||
|
||||
jobs:
|
||||
update-crowdin:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_TOKEN_FOR_CROWDIN_SYNC }}
|
||||
|
||||
- name: Install Qt ≥ 6.8
|
||||
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
|
||||
with:
|
||||
aqtversion: "==3.1.*"
|
||||
version: "6.8.3"
|
||||
host: "linux"
|
||||
target: "desktop"
|
||||
arch: "linux_gcc_64"
|
||||
|
||||
- name: Setup Python & dependencies
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install pyside6
|
||||
|
||||
- name: Gather translations from crowdin
|
||||
run: |
|
||||
./updatecrowdin.py build
|
||||
while ./updatecrowdin.py build-status | grep -q "status: inProgress"; do sleep 10; done
|
||||
./updatecrowdin.py download
|
||||
./updatecrowdin.py install
|
||||
working-directory: ./src/Tools
|
||||
env:
|
||||
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: freecad
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config --global user.name "freecad-gh-actions-translation-bot"
|
||||
git config --global user.email "freecad-gh-actions-translation-bot@github.com"
|
||||
git add src
|
||||
git commit -m "Update translations from Crowdin" || echo "No changes to commit"
|
||||
|
||||
- name: Push changes to a new branch
|
||||
run: |
|
||||
git branch update-crowdin-translations
|
||||
git push origin update-crowdin-translations --force
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
|
||||
with:
|
||||
branch: update-crowdin-translations
|
||||
title: "Update translations from Crowdin"
|
||||
body: "Automatic Crowdin update."
|
||||
token: ${{ secrets.GH_TOKEN_FOR_CROWDIN_SYNC }}
|
||||
delete-branch: true
|
||||
add-paths: |
|
||||
src
|
||||
@@ -1,49 +0,0 @@
|
||||
name: Monthly issue metrics
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 15 * *'
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: issue metrics
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'FreeCAD'
|
||||
|
||||
steps:
|
||||
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Get dates for last month
|
||||
shell: bash
|
||||
run: |
|
||||
# Calculate the first day of the previous month
|
||||
first_day=$(date -d "last month" +%Y-%m-15)
|
||||
|
||||
# Calculate the last day of the previous month
|
||||
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
|
||||
|
||||
#Set an environment variable with the date range
|
||||
echo "$first_day..$last_day"
|
||||
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Run issue-metrics tool
|
||||
uses: github/issue-metrics@6a35322ff89cee3e1a594d282c27eb34bffa9174 # v4.1.1
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SEARCH_QUERY: 'repo:FreeCAD/FreeCAD is:issue created:${{ env.last_month }}'
|
||||
|
||||
- name: Create issue
|
||||
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
|
||||
with:
|
||||
title: Monthly issue metrics report
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
content-filepath: ./issue_metrics.md
|
||||
assignees: maxwxyz
|
||||
@@ -1,32 +0,0 @@
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
#
|
||||
# For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
name: Labeler
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: ".github/labels.yml"
|
||||
sync-labels: false
|
||||
@@ -1,43 +0,0 @@
|
||||
name: Push Crowdin Translations
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * 1"
|
||||
|
||||
jobs:
|
||||
update-crowdin:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: releases/FreeCAD-1-1
|
||||
|
||||
- name: Install Qt ≥ 6.8
|
||||
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
|
||||
with:
|
||||
aqtversion: "==3.1.*"
|
||||
version: "6.8.3"
|
||||
host: "linux"
|
||||
target: "desktop"
|
||||
arch: "linux_gcc_64"
|
||||
|
||||
- name: Setup Python & dependencies
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install pyside6
|
||||
|
||||
- name: Push translations to Crowdin
|
||||
run: |
|
||||
./updatecrowdin.py gather
|
||||
./updatecrowdin.py upload
|
||||
working-directory: ./src/Tools
|
||||
env:
|
||||
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: freecad
|
||||
@@ -1,81 +0,0 @@
|
||||
# This workflow uses actions that are not certified by GitHub. They are provided
|
||||
# by a third-party and are governed by separate terms of service, privacy
|
||||
# policy, and support documentation.
|
||||
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '20 7 * * 2'
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
contents: read
|
||||
actions: read
|
||||
# To allow GraphQL ListCommits to work
|
||||
issues: read
|
||||
pull-requests: read
|
||||
# To detect SAST tools
|
||||
checks: read
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecards on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -1,232 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2024 0penBrain, Lorenz Lechner and Jacob Oursland. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on macOS.
|
||||
|
||||
name: Pixi Builds
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
build_with_pixi:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
cacheKey: pixi-${{ matrix.os }}
|
||||
config: release
|
||||
logdir: ${{ github.workspace }}/logs/
|
||||
reportdir: ${{ github.workspace }}/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-${{ matrix.os }}-report.md
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
strategy:
|
||||
max-parallel: 6
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Set Platform Environment Variables
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
OPERATING_SYSTEM: ${{ runner.os }}
|
||||
run: |
|
||||
if [[ $OPERATING_SYSTEM == 'Windows' ]]; then
|
||||
echo 'CCACHE_COMPILERCHECK=%compiler%' >> "$GITHUB_ENV"
|
||||
else
|
||||
echo 'CCACHE_COMPILERCHECK=%compiler% -dumpfullversion -dumpversion' >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Add GCC Problem Matcher
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/gcc.json"
|
||||
|
||||
- name: Add Clang Problem Matcher
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
|
||||
- name: Add MSVC++ Problem Matcher
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/msvc.json"
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
|
||||
with:
|
||||
pixi-version: v0.59.0
|
||||
cache: false
|
||||
|
||||
- name: Restore Compiler Cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ env.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ env.cacheKey }}-
|
||||
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
pixi run ccache -s
|
||||
pixi run ccache -z
|
||||
pixi run ccache -p
|
||||
|
||||
- name: CMake Configure
|
||||
run: |
|
||||
pixi run configure-${{ env.config }}
|
||||
|
||||
- name: CMake Build
|
||||
run: |
|
||||
pixi run build-${{ env.config }}
|
||||
|
||||
- name: Print ccache statistics after Build
|
||||
if: always()
|
||||
run: |
|
||||
pixi run ccache -s
|
||||
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: pixi run ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: runner.os == 'Linux' && inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: pixi run xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: C++ tests
|
||||
timeout-minutes: 10
|
||||
if: runner.os != 'Windows'
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
|
||||
- name: CMake Install
|
||||
run: |
|
||||
pixi run install-${{ env.config }}
|
||||
|
||||
- name: FreeCAD CLI tests on install
|
||||
if: runner.os != 'Windows'
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: pixi run FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on install
|
||||
# if: runner.os == 'Linux'
|
||||
# currently broken on Qt6 builds
|
||||
if: false
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: pixi run xvfb-run FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-${{ matrix.os }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,239 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Ubuntu 24.04 using GCC.
|
||||
|
||||
name: Build Ubuntu 24.04
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-24.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
|
||||
CC: /usr/bin/gcc
|
||||
CXX: /usr/bin/g++
|
||||
#CC: /usr/bin/clang
|
||||
#CXX: /usr/bin/clang++
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
config: release
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install FreeCAD dependencies
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
- name: Install FreeCAD Python test dependencies
|
||||
run: |
|
||||
sudo apt-get update -y -qq
|
||||
sudo apt-get install -y -qq python3-pip
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install ifcopenshell==0.8.2 --break-system-packages
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 5
|
||||
|
||||
- name: Restore Compiler Cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
|
||||
- name: Install cmake
|
||||
uses: jwlawson/actions-setup-cmake@3a6cbe35ba64df7ca70c51365c4aff65db9a9037 # v2.1.1
|
||||
with:
|
||||
cmake-version: '3.31.6'
|
||||
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: -G Ninja --preset ${{ env.config }}
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Print ccache statistics after Build
|
||||
if: always()
|
||||
run: |
|
||||
ccache -s
|
||||
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
# Use Python wrapper to run only GUI-registered tests with the built FreeCAD executable
|
||||
testCommand: xvfb-run python3 ./.github/scripts/run_gui_tests.py "${{ env.builddir }}"
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
# Use Python wrapper to run only GUI-registered tests using the installed FreeCAD
|
||||
testCommand: xvfb-run python3 ./.github/scripts/run_gui_tests.py "FreeCAD"
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,183 +0,0 @@
|
||||
# ***************************************************************************
|
||||
# * Copyright (c) 2023 0penBrain *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||
# * as published by the Free Software Foundation; either version 2 of *
|
||||
# * the License, or (at your option) any later version. *
|
||||
# * for detail see the LICENCE text file. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU Library General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Library General Public *
|
||||
# * License along with this program; if not, write to the Free Software *
|
||||
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Windows using MSVC.
|
||||
|
||||
name: Build Windows
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
description: "Base name for artifact"
|
||||
required: false
|
||||
type: string
|
||||
default: "FreeCAD"
|
||||
allowedToFail:
|
||||
description: "whether a failed build is allowed"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
required: true
|
||||
type: string
|
||||
allowedToFail:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_DIR: C:/FC/cache/
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
## Have to use C:\ because not enough space on workspace drive
|
||||
builddir: C:/FC/build/release/
|
||||
cacheKey: Windows
|
||||
ccachebindir: C:/FC/ccache/
|
||||
config: release
|
||||
libpackdir: C:/FC/libpack/
|
||||
logdir: C:/logs/
|
||||
reportdir: C:/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir ${{ env.CCACHE_DIR }}
|
||||
mkdir ${{ env.ccachebindir }}
|
||||
mkdir ${{ env.libpackdir }}
|
||||
mkdir ${{ env.builddir }}
|
||||
mkdir ${{ env.logdir }}
|
||||
mkdir ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get Ccache
|
||||
uses: ./.github/workflows/actions/windows/getCcache
|
||||
with:
|
||||
ccachebindir: ${{ env.ccachebindir }}
|
||||
|
||||
- name: Get Libpack
|
||||
uses: ./.github/workflows/actions/windows/getLibpack
|
||||
with:
|
||||
libpackdir: ${{ env.libpackdir }}
|
||||
|
||||
- name: Restore compiler cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ env.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ env.cacheKey }}-
|
||||
|
||||
- name: Print Ccache statistics before build, reset stats and print config
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
. $env:ccachebindir\ccache -z
|
||||
. $env:ccachebindir\ccache -p
|
||||
|
||||
- name: Install cmake
|
||||
uses: jwlawson/actions-setup-cmake@3a6cbe35ba64df7ca70c51365c4aff65db9a9037 # v2.1.1
|
||||
with:
|
||||
cmake-version: '3.31.6'
|
||||
|
||||
- name: Configuring CMake
|
||||
run: >
|
||||
cmake -B"${{ env.builddir }}" .
|
||||
--preset ${{ env.config }}
|
||||
-DCMAKE_VS_NO_COMPILE_BATCHING=ON
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DFREECAD_USE_PCH=OFF
|
||||
-DFREECAD_RELEASE_PDB=OFF
|
||||
-DFREECAD_LIBPACK_DIR="${{ env.libpackdir }}"
|
||||
-DFREECAD_COPY_DEPEND_DIRS_TO_BUILD=ON
|
||||
-DFREECAD_COPY_LIBPACK_BIN_TO_BUILD=ON
|
||||
-DFREECAD_COPY_PLUGINS_BIN_TO_BUILD=ON
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||
|
||||
- name: Compiling sources
|
||||
run: |
|
||||
cd $env:builddir
|
||||
msbuild ALL_BUILD.vcxproj /m /p:Configuration=Release /p:TrackFileAccess=false /p:CLToolPath=${{ env.ccachebindir }}
|
||||
|
||||
- name: Print Ccache statistics after build
|
||||
if: always()
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
|
||||
- name: C++ unit tests
|
||||
if: false # Disabled because seems to not function on Windows build
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
. ${{ env.builddir }}\tests\Release\Tests_run --gtest_output=json:${{ env.reportdir }}gtest_results.json # 2>&1 | tee -filepath ${{ env.logdir }}\unitTests.log
|
||||
|
||||
- name: FreeCAD CLI tests
|
||||
run: |
|
||||
. ${{ env.builddir }}\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}\integrationTests.log
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
@@ -1,371 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the lint workflow for CI of FreeCAD
|
||||
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
changedFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedLines:
|
||||
type: string
|
||||
required: false
|
||||
changedCppFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedCppLines:
|
||||
type: string
|
||||
required: false
|
||||
changedPythonFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedPythonLines:
|
||||
type: string
|
||||
required: false
|
||||
checkLineendings:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
lineendingsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkWhitespace:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
whitespaceFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkTabs:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
tabsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkQtConnections:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
qtConnectionsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkCpplint:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
cpplintFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkPylint:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
pylintDisable:
|
||||
default: C0302,C0303 # Trailing whitespaces (C0303) are already checked
|
||||
type: string
|
||||
required: false
|
||||
pylintFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkBlack:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
blackFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkClangFormat:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
clangStyle:
|
||||
default: file # for .clang-format file
|
||||
type: string
|
||||
required: false
|
||||
clangFormatFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkSpelling:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
listIgnoredMisspelling:
|
||||
default: .github/codespellignore
|
||||
type: string
|
||||
required: false
|
||||
spellingIgnore:
|
||||
default: ./.git*,*.po,*.ts,*.svg,./src/3rdParty,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL*,./src/Doc/FreeCAD.uml,./build/
|
||||
type: string
|
||||
required: false
|
||||
codespellFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkClangTidy:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clangTidyFailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazy: # for the Message codes see: https://invent.kde.org/sdk/clazy#list-of-checks
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
clazyChecks:
|
||||
default: level2,no-non-pod-global-static,no-copyable-polymorphic
|
||||
type: string
|
||||
required: false
|
||||
clazyFailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazyQT6:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
clazyQT6Checks:
|
||||
default: qt6-deprecated-api-fixes,qt6-header-fixes,qt6-qhash-signature,qt6-fwd-fixes,missing-qobject-macro # for QT6 Porting https://invent.kde.org/sdk/clazy#list-of-checks
|
||||
type: string
|
||||
required: false
|
||||
QT6Branch: # branch to check for QT6 Porting
|
||||
default: main
|
||||
type: string
|
||||
required: false
|
||||
clazyQT6FailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Lint.outputs.reportFile }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
Lint:
|
||||
if: inputs.changedFiles != ''
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
logdir: /tmp/logs/
|
||||
fixesdir: /tmp/fixes/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.fixesdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
# Generic lints steps
|
||||
- name: Check File Case Sensitivity
|
||||
uses: credfeto/action-case-checker@cb652aeab29ed363bbdb7d9ee1bfcc010c46cac5 # v1.3.0
|
||||
|
||||
- name: Check for non Unix line ending
|
||||
if: inputs.checkLineendings && always()
|
||||
continue-on-error: ${{ inputs.lineendingsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--lineendings-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
- name: Check for trailing whitespaces
|
||||
if: inputs.checkWhitespace && always()
|
||||
continue-on-error: ${{ inputs.whitespaceFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--whitespace-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
- name: Check for Tab usage
|
||||
if: inputs.checkTabs && always()
|
||||
continue-on-error: ${{ inputs.tabsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--tabs-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
# Python linting steps
|
||||
|
||||
- name: Pylint
|
||||
if: inputs.checkPylint && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.pylintFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/pylint.py \
|
||||
--files "${{ inputs.changedPythonFiles }}" \
|
||||
--disable "${{ inputs.pylintDisable }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Black
|
||||
if: inputs.checkBlack && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.blackFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/black.py \
|
||||
--files "${{ inputs.changedPythonFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
# C++ linting steps
|
||||
|
||||
- name: Install FreeCAD dependencies
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
- name: Run CMake # This is needed for Clang tools to work correctly
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: |
|
||||
mkdir build && cmake -S ./ -B ./build/ -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
|
||||
|
||||
- name: Check old Qt string-based connections (https://wiki.qt.io/New_Signal_Slot_Syntax)
|
||||
if: inputs.checkQtConnections && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.qtConnectionsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/qt_connections.py \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Cpplint
|
||||
if: inputs.checkCpplint && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.cpplintFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/cpplint.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Clang-format
|
||||
if: inputs.checkClangFormat && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangFormatFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clang_format.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clang-style "${{ inputs.clangStyle }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Codespell
|
||||
if: inputs.checkSpelling && always()
|
||||
continue-on-error: ${{ inputs.codespellFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/codespell.py \
|
||||
--files ${{ inputs.changedFiles }} \
|
||||
--ignore-words "${{ inputs.listIgnoredMisspelling }}" \
|
||||
--skip "${{ inputs.spellingIgnore }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Clang-tidy
|
||||
if: inputs.checkClangTidy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangTidyFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clang_tidy.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--line-filter '${{ inputs.changedCppLines }}' \
|
||||
--clang-style "${{ inputs.clangStyle }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Clazy
|
||||
if: inputs.checkClazy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clazyFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clazy.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clazy-checks "${{ inputs.clazyChecks }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Clazy-QT6
|
||||
if: inputs.checkClazyQT6 && inputs.changedCppFiles != '' && github.ref == inputs.QT6Branch && always()
|
||||
continue-on-error: ${{ inputs.clazyQT6FailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clazy_qt6.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clazy-qt6-checks "${{ inputs.clazyQT6Checks }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
# Upload steps
|
||||
|
||||
- name: Upload logs and fixes
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
${{ env.fixesdir }}
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,194 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the pre-check workflow for CI of FreeCAD.
|
||||
# It aims at running some basic checks about the workflow run ...
|
||||
# ... and gathering some data needed for the next steps.
|
||||
|
||||
name: Prepare
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
dontFailOnOldRebase:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
maxRebaseHours:
|
||||
default: "48"
|
||||
type: string
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Prepare.outputs.reportFile }}
|
||||
changedFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedFiles }}
|
||||
changedLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedLines }}
|
||||
changedPythonFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedPythonFiles }}
|
||||
changedPythonLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedPythonLines }}
|
||||
changedCppFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedCppFiles }}
|
||||
changedCppLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedCppLines }}
|
||||
|
||||
jobs:
|
||||
|
||||
Prepare:
|
||||
env:
|
||||
isPR: ${{ github.event_name == 'pull_request' }}
|
||||
isPush: ${{ github.event_name == 'push' }}
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
changedFiles: ${{ steps.Output.outputs.changedFiles }}
|
||||
changedLines: ${{ steps.Output.outputs.changedLines }}
|
||||
changedPythonFiles: ${{ steps.Output.outputs.changedPythonFiles }}
|
||||
changedPythonLines: ${{ steps.Output.outputs.changedPythonLines }}
|
||||
changedCppFiles: ${{ steps.Output.outputs.changedCppFiles }}
|
||||
changedCppLines: ${{ steps.Output.outputs.changedCppLines }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
commitCnt=0
|
||||
touch ${{ env.logdir }}changedFiles.lst ${{ env.logdir }}changedCppFiles.lst ${{ env.logdir }}changedPythonFiles.lst
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Check out code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Determine base and head SHA in case of PR
|
||||
if: env.isPR == 'true'
|
||||
run: |
|
||||
baseSha=${{ github.event.pull_request.base.sha }}
|
||||
headSha=${{ github.event.pull_request.head.sha }}
|
||||
echo "baseSha=$baseSha" >> $GITHUB_ENV
|
||||
echo "headSha=$headSha" >> $GITHUB_ENV
|
||||
echo "This CI run is performed on a Pull Request" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Base SHA is $baseSha, Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Check if PR has been recently rebased
|
||||
if: env.isPR == 'true'
|
||||
continue-on-error: ${{ inputs.dontFailOnOldRebase }}
|
||||
run: |
|
||||
baseDate=$(curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/commits/$baseSha | jq -r '.commit.committer.date')
|
||||
dateDiff=$(( ( $(date +%s) - $(date -d $baseDate +%s) ) / 3600 ))
|
||||
echo "Pull request is based on a $dateDiff hour-old commit" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
if [ $dateDiff -gt ${{ inputs.maxRebaseHours }} ]
|
||||
then
|
||||
echo -n ":warning: Pull request should be rebased" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
exit 1
|
||||
fi
|
||||
- name: Determine base and head SHA in case of push
|
||||
if: env.isPush == 'true'
|
||||
run: |
|
||||
baseSha=${{ github.event.before }}
|
||||
headSha=${{ github.event.after }}
|
||||
echo "headSha=$headSha" >> $GITHUB_ENV
|
||||
if [ $baseSha -eq 0 ]
|
||||
then
|
||||
echo "This CI run is performed on a Push that created a new branch : files changed will be ignored" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "isPush='false'" >> $GITHUB_ENV
|
||||
else
|
||||
echo "This CI run is performed on a Push" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Base SHA is $baseSha, Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "baseSha=$baseSha" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Get compare between head and base
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
echo "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/compare/$baseSha...$headSha"
|
||||
curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/compare/$baseSha...$headSha > ${{ env.logdir }}compare.json
|
||||
- name: Get number of commits in the changeset
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
commitCnt=$(jq -re '.ahead_by' ${{ env.logdir }}compare.json)
|
||||
echo "Changeset is composed of $commitCnt commit(s)" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Get files modified in changeset #TODO check what happens with deleted file in the subsequent process
|
||||
if: env.isPR == 'true'
|
||||
env:
|
||||
API_URL: ${{ github.api_url }}
|
||||
TOKEN: ${{ github.token }}
|
||||
REPO: ${{ github.repository }}
|
||||
REF: ${{ github.ref_name }}
|
||||
PR: ${{ github.event.number }}
|
||||
run: |
|
||||
# could reduce this to a single
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} > ${{ env.logdir }}changedLines.lst
|
||||
cat ${{ env.logdir }}changedLines.lst | jq '.[].name' > ${{ env.logdir }}changedFiles.lst
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} --file-filter '.py, .pyi' > ${{ env.logdir }}changedPythonLines.lst
|
||||
cat ${{ env.logdir }}changedPythonLines.lst | jq '.[].name' > ${{ env.logdir }}changedPythonFiles.lst
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} --file-filter '.c, .cc, .cu, .cuh, .c++, .cpp, .cxx, .h, .hh, .h++, .hpp, .hxx' > ${{ env.logdir }}changedCppLines.lst
|
||||
cat ${{ env.logdir }}changedCppLines.lst | jq '.[].name' > ${{ env.logdir }}changedCppFiles.lst
|
||||
|
||||
# Write the report
|
||||
echo "::group::Modified files in changeset (removed files are ignored) :" ; cat ${{ env.logdir }}changedFiles.lst ; echo "::endgroup::"
|
||||
echo "<details><summary>Modified files (removed files are ignored):</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}changedFiles.lst >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Transmitting outputs
|
||||
id: Output
|
||||
run: |
|
||||
echo "changedFiles=$(cat ${{ env.logdir }}changedFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedLines=$(cat ${{ env.logdir }}changedLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedPythonFiles=$(cat ${{ env.logdir }}changedPythonFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedPythonLines=$(cat ${{ env.logdir }}changedPythonLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedCppFiles=$(cat ${{ env.logdir }}changedCppFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedCppLines=$(cat ${{ env.logdir }}changedCppLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "" >> $GITHUB_OUTPUT
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,125 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a generic wrapup workflow that only aims at gathering reports and ...
|
||||
# ... presenting them as a unified summary
|
||||
#
|
||||
# It expects steps to be summarized to be presented a JSON input formatted ...
|
||||
# ... as the "needs" context of Github :
|
||||
# https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
|
||||
# In addition to standard "result", each step shall have a string entry in "outputs" ...
|
||||
# ... named "reportFile" containing the name of the corresponding report. The ...
|
||||
# ... report file shall be available in an artifact with the same name.
|
||||
|
||||
name: WrapUp
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
previousSteps:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
WrapUp:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
artifactsDownloadDir: /tmp/artifacts/
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
run: |
|
||||
mkdir -p ${{ env.artifactsDownloadDir }}
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
path: ${{ env.artifactsDownloadDir }}
|
||||
- name: Save input data to file
|
||||
run: |
|
||||
cat > data << "EOD"
|
||||
${{ inputs.previousSteps }}
|
||||
EOD
|
||||
- name: Compute the report
|
||||
run: |
|
||||
echo "usedArtifacts<<EOD" >> $GITHUB_ENV
|
||||
for step in $(jq -r "keys_unsorted | .[]" data)
|
||||
do
|
||||
echo "Processing step $step"
|
||||
result=$(jq -r ".\"$step\".result" data)
|
||||
icon=":heavy_check_mark:"
|
||||
if [ $result == 'failure' ]
|
||||
then
|
||||
icon=":x:"
|
||||
elif [ $result == 'cancelled' ]
|
||||
then
|
||||
icon=":no_entry_sign:"
|
||||
elif [ $result == 'skipped' ]
|
||||
then
|
||||
icon=":white_check_mark:"
|
||||
fi
|
||||
echo "### $icon $step step" >> report.md
|
||||
if [ $result == 'skipped' ]
|
||||
then
|
||||
echo "Step was skipped, no report was generated" | tee -a report.md
|
||||
continue
|
||||
elif [ $result == 'cancelled' ]
|
||||
then
|
||||
echo "Step was cancelled when executing, report may be incomplete" | tee -a report.md
|
||||
fi
|
||||
report=$(jq -r ".\"$step\".outputs.reportFile" data)
|
||||
if [ $report ]
|
||||
then
|
||||
echo "Report for step $step is $report"
|
||||
echo "$report" >> $GITHUB_ENV
|
||||
if [ $(find ${{ env.artifactsDownloadDir }} -type f -name $report | wc -l) -eq 1 ]
|
||||
then
|
||||
find ${{ env.artifactsDownloadDir }} -type f -name $report -exec cat {} \; >> report.md
|
||||
else
|
||||
echo "No or several files found for report $report, not printing" | tee -a report.md
|
||||
echo "Below files found :"
|
||||
find ${{ env.artifactsDownloadDir }} -type f -name $report
|
||||
fi
|
||||
else
|
||||
echo "Report file was not set by step $step" | tee -a report.md
|
||||
fi
|
||||
echo "" >> report.md
|
||||
done
|
||||
echo "EOD" >> $GITHUB_ENV
|
||||
cat report.md >> $GITHUB_STEP_SUMMARY
|
||||
- name: Delete used artifacts
|
||||
continue-on-error: true
|
||||
uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0
|
||||
with:
|
||||
name: |
|
||||
${{ env.usedArtifacts }}
|
||||
@@ -1,16 +0,0 @@
|
||||
> [!IMPORTANT]
|
||||
> Bleeding edge FreeCAD development builds for testing bugfixes, regressions, and recently implemented features. Do not use in a production environment.
|
||||
|
||||
**Changes since last weekly:** <!--DIFF_LINK-->
|
||||
|
||||
### How-to use
|
||||
|
||||
1. Download the appropriate asset for your OS below
|
||||
2. Unpack the bundle to any folder on your system
|
||||
3. Launch the application
|
||||
- **Windows**
|
||||
Run `\FreeCAD.exe` in the extracted directory
|
||||
- **macOS**
|
||||
Launch `/FreeCAD.app` in the extracted directory
|
||||
- **Linux**
|
||||
Open the `*.AppImage`
|
||||
@@ -1,140 +0,0 @@
|
||||
name: Weekly compare link to release notes
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published] # run automatically when a (pre-)release is published
|
||||
workflow_dispatch: # allow manual runs too
|
||||
inputs:
|
||||
current_tag:
|
||||
description: "Weekly tag (e.g., weekly-2026.01.07). Leave empty to auto-detect latest weekly pre-release."
|
||||
required: false
|
||||
dry_run:
|
||||
description: "Only compute; do not update the release body."
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: write # required to PATCH the release body
|
||||
|
||||
jobs:
|
||||
update-notes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Inject compare link into weekly release notes
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
env:
|
||||
# Pass manual inputs via env for convenience
|
||||
CURRENT_TAG: ${{ github.event.inputs.current_tag }}
|
||||
DRY_RUN: ${{ github.event.inputs.dry_run }}
|
||||
PLACEHOLDER: "<!--DIFF_LINK-->"
|
||||
with:
|
||||
script: |
|
||||
// Updates the current weekly release notes with a compare link to the previous weekly.
|
||||
// Works for both release-published events and manual (workflow_dispatch) runs.
|
||||
const owner = context.repo.owner;
|
||||
const repo = context.repo.repo;
|
||||
|
||||
const rx = /^weekly-(\d{4})\.(\d{2})\.(\d{2})$/;
|
||||
|
||||
// Determine currentTag:
|
||||
// 1) Manual input via workflow_dispatch (env.CURRENT_TAG)
|
||||
// 2) Tag from release event payload
|
||||
// 3) Fallback: newest weekly pre-release
|
||||
let currentTag = process.env.CURRENT_TAG || (context.payload?.release?.tag_name) || null;
|
||||
|
||||
async function detectLatestWeeklyTag() {
|
||||
const releases = await github.paginate(github.rest.repos.listReleases, { owner, repo, per_page: 100 });
|
||||
const cand = releases.find(r => r.prerelease && typeof r.tag_name === 'string' && rx.test(r.tag_name));
|
||||
return cand?.tag_name || null;
|
||||
}
|
||||
|
||||
if (!currentTag) {
|
||||
currentTag = await detectLatestWeeklyTag();
|
||||
}
|
||||
|
||||
if (!currentTag || !rx.test(currentTag)) {
|
||||
core.info(`No weekly tag detected or tag format mismatch ('${currentTag}'). Skipping.`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Resolve the current release object
|
||||
let curRel;
|
||||
try {
|
||||
const { data } = await github.rest.repos.getReleaseByTag({ owner, repo, tag: currentTag });
|
||||
curRel = data;
|
||||
} catch (e) {
|
||||
core.setFailed(`No release for tag ${currentTag}: ${e.message}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// If event is a normal release (not pre-release), skip automatically-run case;
|
||||
// but allow manual override (manual runs can patch any weekly tag).
|
||||
const isManual = context.eventName === 'workflow_dispatch';
|
||||
if (!isManual && !curRel.prerelease) {
|
||||
core.info('Current release is not a pre-release; skipping (auto run).');
|
||||
return;
|
||||
}
|
||||
|
||||
// Helpers
|
||||
const toPrevWeeklyTag = (tag) => {
|
||||
const [, y, m, d] = tag.match(rx);
|
||||
const dt = new Date(Date.UTC(+y, +m - 1, +d));
|
||||
const prev = new Date(dt.getTime() - 7 * 24 * 3600 * 1000); // minus 7 days
|
||||
const iso = prev.toISOString().slice(0, 10); // YYYY-MM-DD
|
||||
return `weekly-${iso.replace(/-/g, '.')}`; // weekly-YYYY.MM.DD
|
||||
};
|
||||
const ymdKey = (t) => t.replace(rx, '$1$2$3'); // YYYYMMDD
|
||||
|
||||
async function tagExists(tag) {
|
||||
try {
|
||||
await github.rest.git.getRef({ owner, repo, ref: `tags/${tag}` });
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Compute previous weekly deterministically, then fall back if needed
|
||||
let prevTag = toPrevWeeklyTag(currentTag);
|
||||
if (!(await tagExists(prevTag))) {
|
||||
core.info(`Computed previous tag ${prevTag} not found; scanning older weeklies...`);
|
||||
const releases = await github.paginate(github.rest.repos.listReleases, { owner, repo, per_page: 100 });
|
||||
const curKey = ymdKey(currentTag);
|
||||
const older = releases
|
||||
.filter(r => r.prerelease && typeof r.tag_name === 'string' && rx.test(r.tag_name))
|
||||
.map(r => ({ tag: r.tag_name, key: ymdKey(r.tag_name) }))
|
||||
.filter(x => x.key < curKey)
|
||||
.sort((a, b) => b.key.localeCompare(a.key)); // newest older first
|
||||
if (!older.length) {
|
||||
core.info('No older weekly found; nothing to do.');
|
||||
return;
|
||||
}
|
||||
prevTag = older[0].tag;
|
||||
}
|
||||
|
||||
const compareUrl = `https://github.com/${owner}/${repo}/compare/${prevTag}...${currentTag}`;
|
||||
const head = `**Changes since last weekly (${prevTag} → ${currentTag}):**\n${compareUrl}\n`;
|
||||
|
||||
if (process.env.DRY_RUN === 'true') {
|
||||
core.info(`[DRY RUN] Would update release ${currentTag} with: ${compareUrl}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Idempotent body update
|
||||
let body = curRel.body || '';
|
||||
if (body.includes(compareUrl)) {
|
||||
core.info('Compare URL already present; done.');
|
||||
return;
|
||||
}
|
||||
const placeholder = process.env.PLACEHOLDER || '<!--DIFF_LINK-->';
|
||||
if (body.includes(placeholder)) {
|
||||
body = body.replace(placeholder, compareUrl);
|
||||
} else if (/\*\*Changes since last weekly:/i.test(body)) {
|
||||
body = body.replace(/\*\*Changes since last weekly:[^\n]*\n?/i, head + '\n');
|
||||
} else {
|
||||
body += (body.endsWith('\n') ? '\n' : '\n\n') + head;
|
||||
}
|
||||
|
||||
await github.rest.repos.updateRelease({ owner, repo, release_id: curRel.id, body });
|
||||
core.info(`Release notes updated with compare link: ${compareUrl}`);
|
||||
@@ -1,73 +1,40 @@
|
||||
# file types to ignore
|
||||
.*
|
||||
!*.gitattributes
|
||||
!*.gitignore
|
||||
!/.clang-format
|
||||
!/.clang-tidy
|
||||
!/.git-blame-ignore-revs
|
||||
!/.gitattributes
|
||||
!/.github/
|
||||
!/.gitignore
|
||||
!/.gitmodules
|
||||
!/.packit.yaml
|
||||
!/.pre-commit-config.yaml
|
||||
!/.pylintrc
|
||||
!/contrib/.vscode/
|
||||
*.clangd
|
||||
*.DS_Store
|
||||
*.dep
|
||||
*.exp
|
||||
*.kdev4
|
||||
*.lib
|
||||
*.manifest
|
||||
*.o
|
||||
*.obj
|
||||
*.orig
|
||||
*.output
|
||||
*.pch
|
||||
|
||||
*.pyc
|
||||
*.obj
|
||||
*.lib
|
||||
*.pch
|
||||
*.vcproj
|
||||
# Ignore .db files created by Qt Designer when editing .ui files
|
||||
*.db
|
||||
*qrc.depends
|
||||
*~
|
||||
*.exp
|
||||
*.dep
|
||||
*.manifest
|
||||
qrc_*.cpp
|
||||
BuildLog.htm
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
CMakeLists.txt.user
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
*~
|
||||
CMakeFiles/
|
||||
*qrc.depends
|
||||
ui_*.h
|
||||
moc_*.cpp
|
||||
Makefile
|
||||
CMakeCache.txt
|
||||
config.h
|
||||
install_manifest.txt
|
||||
moc_*.cpp
|
||||
qrc_*.cpp
|
||||
ui_*.h
|
||||
/.vscode/
|
||||
/ALL_BUILD.dir/
|
||||
/Mod/
|
||||
/ZERO_CHECK.dir/
|
||||
/bin/
|
||||
/build-*/
|
||||
/build/
|
||||
/cmake-build*/
|
||||
/conda/environment.yml
|
||||
/ALL_BUILD.dir/
|
||||
/doc/
|
||||
/lib/
|
||||
/src/Tools/offlinedoc/*.txt
|
||||
/Mod/
|
||||
/ZERO_CHECK.dir/
|
||||
/build/
|
||||
/src/Tools/offlinedoc/localwiki/
|
||||
/src/Tools/offlinedoc/*.txt
|
||||
OpenSCAD_rc.py
|
||||
.subuser-dev
|
||||
/\.idea/
|
||||
.tags
|
||||
tags
|
||||
/CMakeUserPresets.json
|
||||
Testing
|
||||
compile_commands.json
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
/\.vscode/
|
||||
|
||||
# crowdin file
|
||||
files_to_translate.txt
|
||||
src/Tools/freecad.zip
|
||||
tsupdate_stderr.log
|
||||
tsupdate_stdout.log
|
||||
# pixi environments
|
||||
*.egg-info
|
||||
.pixi
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
[submodule "src/3rdParty/OndselSolver"]
|
||||
path = src/3rdParty/OndselSolver
|
||||
url = https://github.com/FreeCAD/OndselSolver.git
|
||||
[submodule "tests/lib"]
|
||||
path = tests/lib
|
||||
url = https://github.com/google/googletest
|
||||
[submodule "src/3rdParty/GSL"]
|
||||
path = src/3rdParty/GSL
|
||||
url = https://github.com/microsoft/GSL
|
||||
[submodule "src/Mod/AddonManager"]
|
||||
path = src/Mod/AddonManager
|
||||
url = https://github.com/FreeCAD/AddonManager.git
|
||||
@@ -0,0 +1,3 @@
|
||||
Wrn:
|
||||
Err:
|
||||
Cannot find icon:
|
||||
@@ -1,68 +0,0 @@
|
||||
specfile_path: package/fedora/freecad.spec
|
||||
files_to_sync:
|
||||
- .packit.yaml
|
||||
actions:
|
||||
post-upstream-clone:
|
||||
- bash -c '/usr/bin/python3 package/scripts/write_version_info.py freecad_version.txt'
|
||||
- rm -f freecad-sources.tar.gz
|
||||
changelog-entry:
|
||||
- bash -c 'git log --no-merges --pretty="format:- %s (%an)" $(git describe --tags --abbrev=0 )..HEAD -- |sed 's/%/%%/g''
|
||||
create-archive:
|
||||
- git submodule update --init
|
||||
- bash -c 'git ls-files --recurse-submodules | tar -caf freecad-sources.tar.gz -T-'
|
||||
- echo -n 'freecad-sources.tar.gz'
|
||||
downstream_package_name: freecad
|
||||
additional_packages:
|
||||
- python3
|
||||
|
||||
jobs:
|
||||
- job: copr_build
|
||||
identifier: pull_request
|
||||
trigger: pull_request
|
||||
notifications:
|
||||
pull_request:
|
||||
successful_build: True
|
||||
branch: main
|
||||
additional_repos:
|
||||
- copr://bpostle/IfcOpenShell
|
||||
manual_trigger: true
|
||||
targets:
|
||||
fedora-stable:
|
||||
without_opts:
|
||||
- debug_info
|
||||
fedora-development:
|
||||
without_opts:
|
||||
- debug_info
|
||||
|
||||
- job: tests
|
||||
identifier: pull_request
|
||||
trigger: pull_request
|
||||
branch: main
|
||||
manual_trigger: true
|
||||
targets:
|
||||
fedora-latest-stable:
|
||||
without_opts:
|
||||
- debug_info
|
||||
fmf_path: package/fedora/tests
|
||||
|
||||
- job: copr_build
|
||||
identifier: main
|
||||
trigger: commit
|
||||
manual_trigger: true
|
||||
branch: main
|
||||
additional_repos:
|
||||
- copr://bpostle/IfcOpenShell
|
||||
owner: freecad
|
||||
project: nightly
|
||||
|
||||
- job: copr_build
|
||||
identifier: release
|
||||
trigger: release
|
||||
owner: freecad
|
||||
project: freecad
|
||||
additional_repos:
|
||||
- copr://bpostle/IfcOpenShell
|
||||
targets:
|
||||
fedora-all:
|
||||
without_opts:
|
||||
- tests
|
||||
@@ -1,80 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
files: |
|
||||
(?x)^(
|
||||
.github|
|
||||
src/Base|
|
||||
src/Gui|
|
||||
src/Main|
|
||||
src/Tools|
|
||||
src/Mod/Assembly|
|
||||
src/Mod/BIM|
|
||||
src/Mod/CAM|
|
||||
src/Mod/Cloud|
|
||||
src/Mod/Draft|
|
||||
src/Mod/Fem|
|
||||
src/Mod/Help|
|
||||
src/Mod/Import|
|
||||
src/Mod/Inspection|
|
||||
src/Mod/JtReader|
|
||||
src/Mod/Measure|
|
||||
src/Mod/MeshPart|
|
||||
src/Mod/Mesh|
|
||||
src/Mod/PartDesign|
|
||||
src/Mod/Part|
|
||||
src/Mod/Plot|
|
||||
src/Mod/Points|
|
||||
src/Mod/ReverseEngineering|
|
||||
src/Mod/Robot|
|
||||
src/Mod/Show|
|
||||
src/Mod/Sketcher|
|
||||
src/Mod/Spreadsheet|
|
||||
src/Mod/Start|
|
||||
src/Mod/Surface|
|
||||
src/Mod/Test|
|
||||
src/Mod/Tux|
|
||||
src/Mod/Web|
|
||||
tests/src
|
||||
)
|
||||
exclude: |
|
||||
(?x)^(
|
||||
.*vcproj.*|
|
||||
.*vcxproj.*|
|
||||
src/App/ExpressionParser.tab.c|
|
||||
src/App/ExpressionParser.tab.h|
|
||||
src/App/ExpressionParser.y|
|
||||
src/App/lex.ExpressionParser.c|
|
||||
src/Doc/ThirdPartyLibraries.html.cmake|
|
||||
src/Gui/3Dconnexion/navlib|
|
||||
src/Gui/QSint|
|
||||
src/Gui/Quarter|
|
||||
src/Mod/Fem/femexamples|
|
||||
src/Mod/Import/App/SCL|
|
||||
src/Mod/Import/App/SCL_output|
|
||||
src/Mod/Mesh/App/TestData|
|
||||
src/Mod/Mesh/App/WildMagic4|
|
||||
src/Mod/Robot/App/kdl_cp|
|
||||
src/Mod/Robot/Lib|
|
||||
.*\.ts$|
|
||||
.*\.brep$
|
||||
)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- id: mixed-line-ending
|
||||
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||
rev: 2892f1f81088477370d4fbc56545c05d33d2493f # frozen: 25.11.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: ['--line-length', '100']
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: 317810f3c6a0ad3572367dc86cb6e41863e16e08 # frozen: v21.1.5
|
||||
hooks:
|
||||
- id: clang-format
|
||||
@@ -1,610 +0,0 @@
|
||||
[MAIN]
|
||||
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=yes
|
||||
|
||||
# Load and enable all available extensions. Use --list-extensions to see a list
|
||||
# all available extensions.
|
||||
#enable-all-extensions=
|
||||
|
||||
# In error mode, messages with a category besides ERROR or FATAL are
|
||||
# suppressed, and no reports are done by default. Error mode is compatible with
|
||||
# disabling specific errors.
|
||||
#errors-only=
|
||||
|
||||
# Always return a 0 (non-error) status code, even if lint errors are found.
|
||||
# This is primarily useful in continuous integration scripts.
|
||||
#exit-zero=
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code.
|
||||
extension-pkg-allow-list=
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
|
||||
# for backward compatibility.)
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Return non-zero exit code if any of these messages/categories are detected,
|
||||
# even if score is above --fail-under value. Syntax same as enable. Messages
|
||||
# specified are enabled, while categories only check already-enabled messages.
|
||||
fail-on=
|
||||
|
||||
# Specify a score threshold to be exceeded before program exits with error.
|
||||
fail-under=10
|
||||
|
||||
# Interpret the stdin as a python script, whose filename needs to be passed as
|
||||
# the module_or_package argument.
|
||||
#from-stdin=
|
||||
|
||||
# Files or directories to be skipped. They should be base names, not paths.
|
||||
ignore=CVS
|
||||
|
||||
# Add files or directories matching the regex patterns to the ignore-list. The
|
||||
# regex matches against paths and can be in Posix or Windows format.
|
||||
ignore-paths=
|
||||
|
||||
# Files or directories matching the regex patterns are skipped. The regex
|
||||
# matches against base names, not paths. The default value ignores Emacs file
|
||||
# locks
|
||||
ignore-patterns=^\.#
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis). It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=FreeCAD,FreeCADGui
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
|
||||
# number of processors available to use, and will cap the count on Windows to
|
||||
# avoid hangs.
|
||||
jobs=1
|
||||
|
||||
# Control the amount of potential inferred values when inferring a single
|
||||
# object. This can help the performance when dealing with large functions or
|
||||
# complex, nested conditions.
|
||||
limit-inference-results=100
|
||||
|
||||
# List of plugins (as comma separated values of python module names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# Minimum Python version to use for version dependent checks. Will default to
|
||||
# the version used to run pylint.
|
||||
py-version=3.10
|
||||
|
||||
# Discover python modules and packages in the file system subtree.
|
||||
recursive=no
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
# In verbose mode, extra non-checker-related info will be displayed.
|
||||
#verbose=
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Python expression which should return a score less than or equal to 10. You
|
||||
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
|
||||
# 'convention', and 'info' which contain the number of messages in each
|
||||
# category, as well as 'statement' which is the total number of statements
|
||||
# analyzed. This score is used by the global evaluation report (RP0004).
|
||||
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details.
|
||||
msg-template=
|
||||
|
||||
# Set the output format. Available formats are text, parseable, colorized, json
|
||||
# and msvs (visual studio). You can also give a reporter class, e.g.
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
#output-format=
|
||||
|
||||
# Tells whether to display a full report or only the messages.
|
||||
reports=yes
|
||||
|
||||
# Activate the evaluation score.
|
||||
score=yes
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
|
||||
# UNDEFINED.
|
||||
confidence=HIGH,
|
||||
CONTROL_FLOW,
|
||||
INFERENCE,
|
||||
INFERENCE_FAILURE,
|
||||
UNDEFINED
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once). You can also use "--disable=all" to
|
||||
# disable everything first and then re-enable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||
# --disable=W".
|
||||
disable=raw-checker-failed,
|
||||
bad-inline-option,
|
||||
locally-disabled,
|
||||
file-ignored,
|
||||
suppressed-message,
|
||||
useless-suppression,
|
||||
deprecated-pragma,
|
||||
use-symbolic-message-instead,
|
||||
invalid-name,
|
||||
wrong-import-order,
|
||||
import-error,
|
||||
undefined-variable
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once). See also the "--disable" option for examples.
|
||||
enable=c-extension-no-member
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Naming style matching correct argument names.
|
||||
argument-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct argument names. Overrides argument-
|
||||
# naming-style. If left empty, argument names will be checked with the set
|
||||
# naming style.
|
||||
#argument-rgx=
|
||||
|
||||
# Naming style matching correct attribute names.
|
||||
attr-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||
# style. If left empty, attribute names will be checked with the set naming
|
||||
# style.
|
||||
#attr-rgx=
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma.
|
||||
bad-names=foo,
|
||||
bar,
|
||||
baz,
|
||||
toto,
|
||||
tutu,
|
||||
tata
|
||||
|
||||
# Bad variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be refused
|
||||
bad-names-rgxs=
|
||||
|
||||
# Naming style matching correct class attribute names.
|
||||
class-attribute-naming-style=any
|
||||
|
||||
# Regular expression matching correct class attribute names. Overrides class-
|
||||
# attribute-naming-style. If left empty, class attribute names will be checked
|
||||
# with the set naming style.
|
||||
#class-attribute-rgx=
|
||||
|
||||
# Naming style matching correct class constant names.
|
||||
class-const-naming-style=UPPER_CASE
|
||||
|
||||
# Regular expression matching correct class constant names. Overrides class-
|
||||
# const-naming-style. If left empty, class constant names will be checked with
|
||||
# the set naming style.
|
||||
#class-const-rgx=
|
||||
|
||||
# Naming style matching correct class names.
|
||||
class-naming-style=PascalCase
|
||||
|
||||
# Regular expression matching correct class names. Overrides class-naming-
|
||||
# style. If left empty, class names will be checked with the set naming style.
|
||||
#class-rgx=
|
||||
|
||||
# Naming style matching correct constant names.
|
||||
const-naming-style=UPPER_CASE
|
||||
|
||||
# Regular expression matching correct constant names. Overrides const-naming-
|
||||
# style. If left empty, constant names will be checked with the set naming
|
||||
# style.
|
||||
#const-rgx=
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=4
|
||||
|
||||
# Naming style matching correct function names.
|
||||
function-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct function names. Overrides function-
|
||||
# naming-style. If left empty, function names will be checked with the set
|
||||
# naming style.
|
||||
#function-rgx=
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma.
|
||||
good-names=i,
|
||||
j,
|
||||
k,
|
||||
ex,
|
||||
Run,
|
||||
_
|
||||
|
||||
# Good variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be accepted
|
||||
good-names-rgxs=
|
||||
|
||||
# Include a hint for the correct naming format with invalid-name.
|
||||
include-naming-hint=no
|
||||
|
||||
# Naming style matching correct inline iteration names.
|
||||
inlinevar-naming-style=any
|
||||
|
||||
# Regular expression matching correct inline iteration names. Overrides
|
||||
# inlinevar-naming-style. If left empty, inline iteration names will be checked
|
||||
# with the set naming style.
|
||||
#inlinevar-rgx=
|
||||
|
||||
# Naming style matching correct method names.
|
||||
method-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct method names. Overrides method-naming-
|
||||
# style. If left empty, method names will be checked with the set naming style.
|
||||
#method-rgx=
|
||||
|
||||
# Naming style matching correct module names.
|
||||
module-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct module names. Overrides module-naming-
|
||||
# style. If left empty, module names will be checked with the set naming style.
|
||||
#module-rgx=
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
name-group=
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=^_
|
||||
|
||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||
# to this list to register other decorators that produce valid properties.
|
||||
# These decorators are taken in consideration only for invalid-name.
|
||||
property-classes=abc.abstractproperty
|
||||
|
||||
# Regular expression matching correct type variable names. If left empty, type
|
||||
# variable names will be checked with the set naming style.
|
||||
#typevar-rgx=
|
||||
|
||||
# Naming style matching correct variable names.
|
||||
variable-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct variable names. Overrides variable-
|
||||
# naming-style. If left empty, variable names will be checked with the set
|
||||
# naming style.
|
||||
#variable-rgx=
|
||||
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# Warn about protected attribute access inside special methods
|
||||
check-protected-access-in-special-methods=no
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,
|
||||
__new__,
|
||||
setUp,
|
||||
__post_init__
|
||||
|
||||
# List of member names, which should be excluded from the protected access
|
||||
# warning.
|
||||
exclude-protected=_asdict,
|
||||
_fields,
|
||||
_replace,
|
||||
_source,
|
||||
_make
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
# List of valid names for the first argument in a metaclass class method.
|
||||
valid-metaclass-classmethod-first-arg=cls
|
||||
|
||||
|
||||
[REFACTORING]
|
||||
|
||||
# Maximum number of nested blocks for function / method body
|
||||
max-nested-blocks=5
|
||||
|
||||
# Complete name of functions that never returns. When checking for
|
||||
# inconsistent-return-statements if a never returning function is called then
|
||||
# it will be considered as an explicit return statement and no message will be
|
||||
# printed.
|
||||
never-returning-functions=sys.exit,argparse.parse_error
|
||||
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# List of regular expressions of class ancestor names to ignore when counting
|
||||
# public methods (see R0903)
|
||||
exclude-too-few-public-methods=
|
||||
|
||||
# List of qualified class names to ignore when counting class parents (see
|
||||
# R0901)
|
||||
ignored-parents=
|
||||
|
||||
# Maximum number of arguments for function / method.
|
||||
max-args=5
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=15
|
||||
|
||||
# Maximum number of boolean expressions in an if statement (see R0916).
|
||||
max-bool-expr=5
|
||||
|
||||
# Maximum number of branch for function / method body.
|
||||
max-branches=12
|
||||
|
||||
# Maximum number of locals for function / method body.
|
||||
max-locals=15
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
# Maximum number of return / yield for function / method body.
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of statements in function / method body.
|
||||
max-statements=50
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=1
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when caught.
|
||||
overgeneral-exceptions=builtins.BaseException,
|
||||
builtins.Exception
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||
expected-line-ending-format=
|
||||
|
||||
# Regexp for a line that is allowed to be longer than the limit.
|
||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=4
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
indent-string=' '
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=120
|
||||
|
||||
# Maximum number of lines in a module.
|
||||
max-module-lines=1000
|
||||
|
||||
# Allow the body of a class to be on the same line as the declaration if body
|
||||
# contains single statement.
|
||||
single-line-class-stmt=no
|
||||
|
||||
# Allow the body of an if to be on the same line as the test if there is no
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
|
||||
# List of modules that can be imported at any level, not just the top level
|
||||
# one.
|
||||
allow-any-import-level=
|
||||
|
||||
# Allow wildcard imports from modules that define __all__.
|
||||
allow-wildcard-with-all=no
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma.
|
||||
deprecated-modules=PySide2
|
||||
|
||||
# Output a graph (.gv or any supported image format) of external dependencies
|
||||
# to the given file (report RP0402 must not be disabled).
|
||||
ext-import-graph=
|
||||
|
||||
# Output a graph (.gv or any supported image format) of all (i.e. internal and
|
||||
# external) dependencies to the given file (report RP0402 must not be
|
||||
# disabled).
|
||||
import-graph=
|
||||
|
||||
# Output a graph (.gv or any supported image format) of internal dependencies
|
||||
# to the given file (report RP0402 must not be disabled).
|
||||
int-import-graph=
|
||||
|
||||
# Force import order to recognize a module as part of the standard
|
||||
# compatibility libraries.
|
||||
known-standard-library=
|
||||
|
||||
# Force import order to recognize a module as part of a third party library.
|
||||
known-third-party=enchant
|
||||
|
||||
# Couples of modules and preferred modules, separated by a comma.
|
||||
preferred-modules=
|
||||
|
||||
|
||||
[LOGGING]
|
||||
|
||||
# The type of string formatting that logging methods do. `old` means using %
|
||||
# formatting, `new` is for `{}` formatting.
|
||||
logging-format-style=old
|
||||
|
||||
# Logging modules to check that the string format arguments are in logging
|
||||
# function parameter format.
|
||||
logging-modules=logging
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,
|
||||
XXX,
|
||||
TODO
|
||||
|
||||
# Regular expression of note tags to take in consideration.
|
||||
notes-rgx=
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Comments are removed from the similarity computation
|
||||
ignore-comments=yes
|
||||
|
||||
# Docstrings are removed from the similarity computation
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Imports are removed from the similarity computation
|
||||
ignore-imports=yes
|
||||
|
||||
# Signatures are removed from the similarity computation
|
||||
ignore-signatures=yes
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
|
||||
[SPELLING]
|
||||
|
||||
# Limits count of emitted suggestions for spelling mistakes.
|
||||
max-spelling-suggestions=4
|
||||
|
||||
# Spelling dictionary name. Available dictionaries: none. To make it work,
|
||||
# install the 'python-enchant' package.
|
||||
spelling-dict=
|
||||
|
||||
# List of comma separated words that should be considered directives if they
|
||||
# appear at the beginning of a comment and should not be checked.
|
||||
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
|
||||
|
||||
# List of comma separated words that should not be checked.
|
||||
spelling-ignore-words=
|
||||
|
||||
# A path to a file that contains the private dictionary; one word per line.
|
||||
spelling-private-dict-file=
|
||||
|
||||
# Tells whether to store unknown words to the private dictionary (see the
|
||||
# --spelling-private-dict-file option) instead of raising a message.
|
||||
spelling-store-unknown-words=no
|
||||
|
||||
|
||||
[STRING]
|
||||
|
||||
# This flag controls whether inconsistent-quotes generates a warning when the
|
||||
# character used as a quote delimiter is used inconsistently within a module.
|
||||
check-quote-consistency=no
|
||||
|
||||
# This flag controls whether the implicit-str-concat should generate a warning
|
||||
# on implicit string concatenation in sequences defined over several lines.
|
||||
check-str-concat-over-line-jumps=no
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
# List of decorators that produce context managers, such as
|
||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||
# produce valid context managers.
|
||||
contextmanager-decorators=contextlib.contextmanager
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=
|
||||
|
||||
# Tells whether to warn about missing members when the owner of the attribute
|
||||
# is inferred to be None.
|
||||
ignore-none=yes
|
||||
|
||||
# This flag controls whether pylint should warn about no-member and similar
|
||||
# checks whenever an opaque object is returned when inferring. The inference
|
||||
# can return multiple potential results while evaluating a Python object, but
|
||||
# some branches might not be evaluated, which results in partial inference. In
|
||||
# that case, it might be useful to still emit no-member and other checks for
|
||||
# the rest of the inferred objects.
|
||||
ignore-on-opaque-inference=yes
|
||||
|
||||
# List of symbolic message names to ignore for Mixin members.
|
||||
ignored-checks-for-mixins=no-member,
|
||||
not-async-context-manager,
|
||||
not-context-manager,
|
||||
attribute-defined-outside-init
|
||||
|
||||
# List of class names for which member attributes should not be checked (useful
|
||||
# for classes with dynamically set attributes). This supports the use of
|
||||
# qualified names.
|
||||
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
|
||||
|
||||
# Show a hint with possible names when a member name was not found. The aspect
|
||||
# of finding the hint is based on edit distance.
|
||||
missing-member-hint=yes
|
||||
|
||||
# The minimum edit distance a name should have in order to be considered a
|
||||
# similar match for a missing member name.
|
||||
missing-member-hint-distance=1
|
||||
|
||||
# The total number of similar names that should be taken in consideration when
|
||||
# showing a hint for a missing member.
|
||||
missing-member-max-choices=1
|
||||
|
||||
# Regex pattern to define which classes are considered mixins.
|
||||
mixin-class-rgx=.*[Mm]ixin
|
||||
|
||||
# List of decorators that change the signature of a decorated function.
|
||||
signature-mutators=
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid defining new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
# Tells whether unused global variables should be treated as a violation.
|
||||
allow-global-unused-variables=yes
|
||||
|
||||
# List of names allowed to shadow builtins
|
||||
allowed-redefined-builtins=
|
||||
|
||||
# List of strings which can identify a callback function by name. A callback
|
||||
# name must start or end with one of those strings.
|
||||
callbacks=cb_,
|
||||
_cb
|
||||
|
||||
# A regular expression matching the name of dummy variables (i.e. expected to
|
||||
# not be used).
|
||||
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore.
|
||||
ignored-argument-names=_.*|^ignored_|^unused_
|
||||
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# List of qualified module names which can have objects that can redefine
|
||||
# builtins.
|
||||
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
|
||||
@@ -0,0 +1 @@
|
||||
{"image-sources-dir": "./subuser"}
|
||||
@@ -0,0 +1,252 @@
|
||||
####
|
||||
# Travis-CI configuration file for FreeCAD.
|
||||
#
|
||||
# This build configuration will build and test FreeCAD on both Linux
|
||||
# and Mac OS X. For Mac OS X, this configuration will also package
|
||||
# and deploy the build to GitHub provided the following prerequisites
|
||||
# are satisfied:
|
||||
#
|
||||
# GH_TOKEN is defined as a secure environment variable and contains a
|
||||
# a valid GitHub OAUTH token with repo_deployment scope.
|
||||
# NOTE: Define this env using the Travis-CI Repo Settings UI
|
||||
#
|
||||
# FREECAD_RELEASE: A GitHub Release with this identifier exists in the
|
||||
# repo. The Travis job will deploy the OS X build to this
|
||||
# GitHub release name as a release asset.
|
||||
#
|
||||
# DEPLOY: Repo setting to deploy (defaults to no deploy to reduce
|
||||
# Travis build times. Set DEPLOY=1 to enable in repo settings.
|
||||
##
|
||||
env:
|
||||
global:
|
||||
- FREECAD_RELEASE="0.18"
|
||||
- DEPLOY_RELEASE=${DEPLOY_RELEASE:-$FREECAD_RELEASE}
|
||||
- CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release}
|
||||
- OSX_PORTS_CACHE=${OSX_PORTS_CACHE:-FreeCAD/FreeCAD-ports-cache}
|
||||
- DEPLOY=${DEPLOY:-0}
|
||||
matrix:
|
||||
# chunk.io key (if needed, obtain it with Yorik, PrzemoF, Kunda1)
|
||||
secure: MJu0ZU/9Yqut6bUkHoSrXTV/c/WhCLR0KnHKCsnEU081PYoukzH6ngzgKk7/trAH2In080d/ra4B2OmTNl/LAgV6DXKFY9dO1aG8QwcrHgaMPf0pHYUy/OfwQSFYFByQDV2OEMAHcIWc/dtNkzK2QUi44Kn7d0GtSEiN4s816lriWtjg0vmEGAU8MjvcAGss4gKyn05Xm1NUCYPKgpgIHsywLbpE76lv0eOYoosEuKv5Q9Pb4FMQts02+JUlqE8eY4ZZ3nV8iQbgIDdseOSA7Ixn05zWjU/ZRZ74TrYxMnzfUAwQcJe9OcqoESq+pPWQt5HYG66VmeVxQim1gmsiDASH51U/nswKt0Q4bISj3tVk0YZMFV8Ax+SzPvLEmFZJQGfgO1mg7HdNcz9N9G5JHPawrV19DwYIEFbAw8MCSAoIXFOcPQZUWXCbtjm7NO9vCjMrqyVJMDD9L8omvQajHoajuHbOT8KB250gFokeLj3z8yu++Tz+IrZX5inUMrXsARVt/ALXpi8rJPXmoFMpMUjyWmDPqPWlnqUhLtTtEtKpuOWP8ZnWVwkg4QYOUhCy95C1okJSGkG+ylHWncWfY4mS+UBT525laoh+GOhH+sRW+p2xkI21xGFRqg1oHjjgY1yIYF6nnSHPzxMBRYmZwagyXsjkFG5FPMWR2oYk0Yg
|
||||
cache:
|
||||
ccache: true
|
||||
|
||||
language: cpp
|
||||
python:
|
||||
- 2.7
|
||||
- 3.4
|
||||
|
||||
# Inject osx build into matrix - needed to specify image/dist
|
||||
matrix:
|
||||
allow_failures:
|
||||
- python: 3.7
|
||||
- os: osx
|
||||
fast_finish: true # https://blog.travis-ci.com/2013-11-27-fast-finishing-builds
|
||||
include:
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang
|
||||
env:
|
||||
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=ON"
|
||||
- PYTHON_MAJOR_VERSION=2
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: gcc
|
||||
env:
|
||||
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=ON"
|
||||
- PYTHON_MAJOR_VERSION=2
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: gcc
|
||||
env:
|
||||
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=ON"
|
||||
- PYTHON_MAJOR_VERSION=3
|
||||
|
||||
- language: python
|
||||
python: 3.7
|
||||
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
|
||||
before_install: true
|
||||
install: python3 -m pip install flake8
|
||||
# fail the build if there are Python syntax errors or undefined names
|
||||
script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
||||
|
||||
# macOS build is failing. See: https://forum.freecadweb.org/viewtopic.php?f=10&t=32272
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env:
|
||||
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=ON" QT=Qt5
|
||||
- PYTHON_MAJOR_VERSION=2
|
||||
|
||||
git:
|
||||
depth: 5000
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/479456663cdf5c84e4d8
|
||||
on_success: always
|
||||
on_failure: always
|
||||
on_start: change
|
||||
|
||||
before_install:
|
||||
- eval "$(curl -fsSL "https://raw.githubusercontent.com/${OSX_PORTS_CACHE}/v${FREECAD_RELEASE}/travis-helpers.sh")"
|
||||
- |
|
||||
case "${TRAVIS_OS_NAME}" in
|
||||
|
||||
"linux")
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
doxygen \
|
||||
libboost1.55-dev \
|
||||
libboost-filesystem1.55-dev \
|
||||
libboost-program-options1.55-dev \
|
||||
libboost-python1.55-dev \
|
||||
libboost-regex1.55-dev \
|
||||
libboost-signals1.55-dev \
|
||||
libboost-system1.55-dev \
|
||||
libboost-thread1.55-dev \
|
||||
libcoin80 \
|
||||
libcoin80-dev \
|
||||
liboce-foundation-dev \
|
||||
liboce-modeling-dev \
|
||||
liboce-ocaf-dev \
|
||||
liboce-ocaf-lite-dev \
|
||||
liboce-visualization-dev \
|
||||
libpyside-dev \
|
||||
libqtcore4 \
|
||||
libshiboken-dev \
|
||||
libxerces-c-dev \
|
||||
libxmu-dev \
|
||||
libxmu-headers \
|
||||
libxmu6 \
|
||||
libxmuu-dev \
|
||||
libxmuu1 \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
oce-draw \
|
||||
pyside-tools \
|
||||
python-dev \
|
||||
python-pyside \
|
||||
python-matplotlib \
|
||||
python3-dev \
|
||||
python3-pyside \
|
||||
python3-matplotlib \
|
||||
qt4-dev-tools \
|
||||
qt4-qmake \
|
||||
libqt4-opengl-dev \
|
||||
shiboken \
|
||||
swig \
|
||||
libvtk6-dev \
|
||||
libmed-dev \
|
||||
libmedc-dev \
|
||||
asciidoc
|
||||
|
||||
# Make sure dpkg is upgraded for Ubuntu 14.04 (required for eigen3)
|
||||
sudo apt-get install -y dpkg
|
||||
|
||||
# Use latest Eigen3 package
|
||||
curl -L http://security.ubuntu.com/ubuntu/pool/universe/e/eigen3/libeigen3-dev_3.3.4-4_all.deb -o libeigen3.deb \
|
||||
&& sudo dpkg -i libeigen3.deb
|
||||
|
||||
# Install ccache to reduce successive build times (use newer version to minimize issues)
|
||||
# XXX: ccache <=3.4.3 always builds manuals, requiring asciidoc/xsltproc
|
||||
# XXX: 3.4.4 might have --disable-man (at least its present in their git)
|
||||
sudo apt install -y xsltproc
|
||||
curl -L "https://codeload.github.com/ccache/ccache/tar.gz/v3.4.3" | tar xvz && cd ccache-*
|
||||
./autogen.sh && ./configure CC=gcc && sudo make install
|
||||
cd ${TRAVIS_BUILD_DIR}
|
||||
|
||||
export DISPLAY=:99.0
|
||||
sh -e /etc/init.d/xvfb start
|
||||
|
||||
export CCACHE_CPP2=YES
|
||||
if [[ ${PYTHON_MAJOR_VERSION} == 2 ]]
|
||||
then
|
||||
export CMAKE_ARGS="${CMAKE_OPTS} -DPYTHON_EXECUTABLE=/usr/bin/python"
|
||||
else
|
||||
export CMAKE_ARGS="${CMAKE_OPTS} -DPYTHON_EXECUTABLE=/usr/bin/python3.4 -DPYTHON_BASENAME=.cpython-34m \
|
||||
-DPYTHON_SUFFIX=.cpython-34m"
|
||||
fi
|
||||
export INSTALLED_APP_PATH="/usr/local/bin/FreeCAD"
|
||||
;;
|
||||
|
||||
"osx")
|
||||
xcodebuild -version -sdk
|
||||
brew --config
|
||||
if [ "${OSX_PORTS_CACHE}X" != "X" ]; then
|
||||
brew install jq
|
||||
cacheContext=$(create_helper_context repo=${OSX_PORTS_CACHE} auth_token=${GH_TOKEN} release=${FREECAD_RELEASE})
|
||||
travis_wait prime_local_ports_cache $cacheContext
|
||||
fi
|
||||
brew update >/dev/null
|
||||
brew --config
|
||||
|
||||
brew tap FreeCAD/freecad
|
||||
|
||||
brew install --verbose --only-dependencies freecad --with-packaging-utils
|
||||
pip install six
|
||||
# Qt5: Set Qt5 build flag and CMAKE_PREFIX
|
||||
QT5_CMAKE_PREFIX=$(ls -d $(brew --cellar)/qt/*/lib/cmake)
|
||||
QT5_WEBKIT_CMAKE_PREFIX=$(ls -d $(brew --cellar)/qtwebkit/*/lib/cmake)
|
||||
CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_QT5=ON -DCMAKE_PREFIX_PATH=${QT5_CMAKE_PREFIX};${QT5_WEBKIT_CMAKE_PREFIX}"
|
||||
|
||||
#Install the 3DConnexion frameworks
|
||||
if [ "${DEPLOY}" == "1" ]; then
|
||||
if [ ! -d /Library/Frameworks/3DconnexionClient.framework ]; then
|
||||
curl -o /tmp/3dFW.dmg -L 'http://www.3dconnexion.com/index.php?eID=sdl&ext=tx_iccsoftware&oid=a273bdbc-c289-e10d-816b-567043331c9e&filename=3DxWareMac_v10-4-1_r2428.dmg'
|
||||
hdiutil attach -readonly /tmp/3dFW.dmg
|
||||
sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target /
|
||||
diskutil eject /Volumes/3Dconnexion\ Software
|
||||
fi
|
||||
export CMAKE_OPTS="${CMAKE_OPTS} -DFREECAD_CREATE_MAC_APP=ON"
|
||||
export INSTALLED_APP_PATH="/usr/local/FreeCAD.app/Contents/MacOS/FreeCAD"
|
||||
else
|
||||
export INSTALLED_APP_PATH="/usr/local/MacOS/FreeCAD"
|
||||
fi
|
||||
|
||||
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_USE_EXTERNAL_KDL=ON"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid or unsupported operating system ${TRAVIS_OS_NAME}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
install:
|
||||
####
|
||||
# Build FreeCAD with cmake options set above for each platform
|
||||
##
|
||||
- mkdir build && cd build && cmake ${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../
|
||||
|
||||
script:
|
||||
####
|
||||
# Install FreeCAD and run unit tests. Test failures will fail the build
|
||||
##
|
||||
- sudo make -j2 install
|
||||
- ${INSTALLED_APP_PATH} --console --run-test 0
|
||||
- ${INSTALLED_APP_PATH} --log-file /tmp/FreeCAD_installed.log &
|
||||
- sleep 10 && pkill FreeCAD
|
||||
- cat /tmp/FreeCAD_installed.log
|
||||
- grep --file=../.log_errors /tmp/FreeCAD_installed.log ; [ $? == 1 ] && echo "No errors from .log_errors file found in the log after start from /usr/local/bin" || ( echo "Error from .log_errors found!" && false )
|
||||
|
||||
after_success:
|
||||
####
|
||||
# Package and deploy the build to GitHub. This will only run for builds on
|
||||
# master (i.e. pull requests are only built and tested but not deployed).
|
||||
#
|
||||
# GH_TOKEN must be set in order to deploy releases to GitHub
|
||||
##
|
||||
- |
|
||||
if [ "${TRAVIS_OS_NAME}" == "osx" -a "${TRAVIS_PULL_REQUEST}" == "false" -a "${DEPLOY}" == "1" ]; then
|
||||
brew ls --versions jq || brew install jq
|
||||
npm install -g appdmg
|
||||
export VSN=$(python ${TRAVIS_BUILD_DIR}/src/Tools/ArchiveNameFromVersionHeader.py ${TRAVIS_BUILD_DIR}/build/src/Build/Version.h)
|
||||
export DEPLOYMENT_ARCHIVE=${VSN}-${QT}.dmg
|
||||
appdmg ${TRAVIS_BUILD_DIR}/src/MacAppBundle/DiskImage/layout.json "${DEPLOYMENT_ARCHIVE}"
|
||||
deployContext=$(create_helper_context repo=${TRAVIS_REPO_SLUG} auth_token=${GH_TOKEN} release=${DEPLOY_RELEASE})
|
||||
gitHub_deploy_asset_to_release_named $deployContext ${DEPLOYMENT_ARCHIVE}
|
||||
gitHub_prune_assets_for_release_named $deployContext "-${QT}" 1
|
||||
fi
|
||||
@@ -1,446 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 16,
|
||||
"patch": 3
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "common",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_JOB_POOL_COMPILE": {
|
||||
"type": "STRING",
|
||||
"value": "compile_jobs"
|
||||
},
|
||||
"CMAKE_JOB_POOL_LINK": {
|
||||
"type": "STRING",
|
||||
"value": "link_jobs"
|
||||
},
|
||||
"CMAKE_POLICY_VERSION_MINIMUM": {
|
||||
"type": "STRING",
|
||||
"value": "3.5"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "debug",
|
||||
"displayName": "Debug",
|
||||
"description": "Default debug profile",
|
||||
"binaryDir": "${sourceDir}/build/debug",
|
||||
"inherits": [
|
||||
"common"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": {
|
||||
"type": "STRING",
|
||||
"value": "Debug"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"displayName": "Release",
|
||||
"description": "Default release profile",
|
||||
"binaryDir": "${sourceDir}/build/release",
|
||||
"inherits": [
|
||||
"common"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": {
|
||||
"type": "STRING",
|
||||
"value": "Release"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conda",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"BUILD_FEM_NETGEN": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"BUILD_WITH_CONDA": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"ENABLE_DEVELOPER_TESTS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"FREECAD_LIBPACK_USE": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"FREECAD_USE_EXTERNAL_FMT": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"FREECAD_USE_EXTERNAL_SMESH": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"FREECAD_USE_PCH": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"FREECAD_USE_PCL": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"FREECAD_USE_PYBIND11": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"OCCT_CMAKE_FALLBACK": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"QT_HOST_PATH": {
|
||||
"type": "PATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conda-linux",
|
||||
"hidden": true,
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": {
|
||||
"type": "STRING",
|
||||
"value": "clang"
|
||||
},
|
||||
"CMAKE_CXX_COMPILER": {
|
||||
"type": "STRING",
|
||||
"value": "clang++"
|
||||
},
|
||||
"CMAKE_EXE_LINKER_FLAGS": {
|
||||
"type": "STRING",
|
||||
"value": "-fuse-ld=mold"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_SHARED_LINKER_FLAGS": {
|
||||
"type": "STRING",
|
||||
"value": "-fuse-ld=mold"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conda-macos",
|
||||
"hidden": true,
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_IGNORE_PREFIX_PATH": {
|
||||
"type": "STRING",
|
||||
"value": "/opt/homebrew;/usr/local/homebrew"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"FREECAD_3DCONNEXION_SUPPORT": {
|
||||
"type": "STRING",
|
||||
"value": "Both"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conda-windows",
|
||||
"hidden": true,
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library"
|
||||
},
|
||||
"FREECAD_3DCONNEXION_SUPPORT": {
|
||||
"type": "STRING",
|
||||
"value": "Both"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conda-debug",
|
||||
"hidden": true,
|
||||
"displayName": "Conda Debug",
|
||||
"description": "Conda debug profile",
|
||||
"inherits": [
|
||||
"debug",
|
||||
"conda"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "conda-release",
|
||||
"hidden": true,
|
||||
"displayName": "Conda Release",
|
||||
"description": "Conda release profile",
|
||||
"inherits": [
|
||||
"release",
|
||||
"conda"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "conda-linux-debug",
|
||||
"displayName": "Conda Debug",
|
||||
"description": "Conda debug profile",
|
||||
"inherits": [
|
||||
"conda-debug",
|
||||
"conda-linux"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "conda-linux-release",
|
||||
"displayName": "Conda Release",
|
||||
"description": "Conda release profile",
|
||||
"inherits": [
|
||||
"conda-release",
|
||||
"conda-linux"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "conda-macos-debug",
|
||||
"displayName": "Conda Debug",
|
||||
"description": "Conda debug profile",
|
||||
"inherits": [
|
||||
"conda-debug",
|
||||
"conda-macos"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "conda-macos-release",
|
||||
"displayName": "Conda Release",
|
||||
"description": "Conda release profile",
|
||||
"inherits": [
|
||||
"conda-release",
|
||||
"conda-macos"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "conda-windows-debug",
|
||||
"displayName": "Conda Debug",
|
||||
"description": "Conda debug profile",
|
||||
"inherits": [
|
||||
"conda-debug",
|
||||
"conda-windows"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": {
|
||||
"type": "STRING",
|
||||
"value": "RelWithDebInfo"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conda-windows-release",
|
||||
"displayName": "Conda Release",
|
||||
"description": "Conda release profile",
|
||||
"inherits": [
|
||||
"conda-release",
|
||||
"conda-windows"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"FREECAD_RELEASE_PDB": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rpm",
|
||||
"description": "Settings like rpm build",
|
||||
"displayName": "rpm",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/rpm",
|
||||
"cacheVariables": {
|
||||
"CMAKE_INSTALL_DATAROOTDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/share"
|
||||
},
|
||||
"CMAKE_C_FLAGS_RELEASE": {
|
||||
"type": "STRING",
|
||||
"value": "-DNDEBUG"
|
||||
},
|
||||
"CMAKE_CXX_FLAGS_RELEASE": {
|
||||
"type": "STRING",
|
||||
"value": "-DNDEBUG"
|
||||
},
|
||||
"CMAKE_Fortran_FLAGS_RELEASE": {
|
||||
"type": "STRING",
|
||||
"value": "-DNDEBUG"
|
||||
},
|
||||
"CMAKE_VERBOSE_MAKEFILE": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_INSTALL_DO_STRIP": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/lib64/freecad"
|
||||
},
|
||||
"CMAKE_INSTALL_FULL_SBINDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/bin"
|
||||
},
|
||||
"CMAKE_INSTALL_SBINDIR": {
|
||||
"type": "PATH",
|
||||
"value": "bin"
|
||||
},
|
||||
"INCLUDE_INSTALL_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/include"
|
||||
},
|
||||
"LIB_INSTALL_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/lib64"
|
||||
},
|
||||
"SYSCONF_INSTALL_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/etc"
|
||||
},
|
||||
"SHARE_INSTALL_PREFIX": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/share"
|
||||
},
|
||||
"LIB_SUFFIX": {
|
||||
"type": "STRING",
|
||||
"value": "64"
|
||||
},
|
||||
"BUILD_SHARED_LIBS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_INSTALL_DOCDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/share/doc/freecad"
|
||||
},
|
||||
"CMAKE_INSTALL_INCLUDEDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/include"
|
||||
},
|
||||
"RESOURCEDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/share/freecad"
|
||||
},
|
||||
"FREECAD_USE_EXTERNAL_PIVY": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"FREECAD_USE_EXTERNAL_FMT": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"FREECAD_USE_PCL": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"FREECAD_QT_VERSION": {
|
||||
"type": "STRING",
|
||||
"value": "6"
|
||||
},
|
||||
"OpenGL_GL_PREFERENCE": {
|
||||
"type": "STRING",
|
||||
"value": "GLVND"
|
||||
},
|
||||
"USE_OCC": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"PYCXX_INCLUDE_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/include"
|
||||
},
|
||||
"PYCXX_SOURCE_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/src/CXX"
|
||||
},
|
||||
"ENABLE_DEVELOPER_TESTS": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"FREECAD_USE_EXTERNAL_GTEST": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"ONDSELSOLVER_BUILD_EXE": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"BUILD_GUI": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
}
|
||||
},
|
||||
"environment": {
|
||||
"CC": "gcc",
|
||||
"CXX": "g++",
|
||||
"LT_SYS_LIBRARY_PATH": "/usr/lib64:",
|
||||
"CCACHE_PROGRAM": "/usr/bin/ccache",
|
||||
"CFLAGS": "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer",
|
||||
"CXXFLAGS": "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer",
|
||||
"LDFLAGS": "-Wl,--as-needed -Wl,--no-undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
# FreeCAD Project Code of Conduct
|
||||
|
||||
## Statement
|
||||
|
||||
The FreeCAD Project community covers people from a wide variety of countries,
|
||||
backgrounds and positions. This global diversity is a great strength of the
|
||||
project, but can also lead to communication issues, which may in turn cause
|
||||
unhappiness. To maximise happiness of the project community taken as a whole,
|
||||
all members (whether users, contributors or committers) are expected to abide
|
||||
by the project's code of conduct. At a high level the code can be summarized
|
||||
as *"be excellent to each other"*. Expanding on this:
|
||||
|
||||
* **Be respectful**: disagreements between people are to be expected and are
|
||||
usually the sign of healthy debate and engagement. Disagreements can lead to
|
||||
frustration and even anger for some members. Turning to personal insults,
|
||||
intimidation or threatening behaviour does not improve the situation though.
|
||||
Participants should thus take care to ensure all communications /
|
||||
interactions stay professional at all times.
|
||||
|
||||
* **Be considerate**: remember that the community has members with a diverse
|
||||
background many of whom have English as a second language. What might appear
|
||||
impolite, may simply be a result of a lack of knowledge of the English
|
||||
language. Bear in mind that actions will have an impact on other community
|
||||
members and the project as a whole, so take potential consequences into
|
||||
account before pursuing a course of action.
|
||||
|
||||
* **Be forgiving**: humans are fallible and as such prone to make mistakes and
|
||||
inexplicably change their positions at times. Don't assume that other members
|
||||
are acting with malicious intent. Be prepared to forgive people who make
|
||||
mistakes and assist each other in learning from them. Playing a blame game
|
||||
doesn't help anyone.
|
||||
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting any of the community admins or moderators at
|
||||
https://forum.freecad.org/memberlist.php?mode=team . All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
and the [libvirt Code of Conduct][libvirtcoc], available at https://libvirt.org/governance.html.
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[libvirtcoc]: https://libvirt.org/governance.html
|
||||
|
||||
For answers to common questions about the Contributor Covenant, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
@@ -1,113 +0,0 @@
|
||||
# FreeCAD Contribution Process (FCP)
|
||||
|
||||
FreeCAD's contribution process is inspired by the Collective Code Construction Contract which itself is an evolution of the github.com Fork and Pull Model.
|
||||
|
||||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
|
||||
|
||||
|
||||
## 0. Status
|
||||
|
||||
FreeCAD is in a transition period. The following are to be regarded as GUIDELINES for contribution submission and acceptance. For historical reasons, the actual process MAY diverge from this process during the transition. Such deviations SHOULD be noted and discussed whenever possible.
|
||||
|
||||
## 1. Goals
|
||||
|
||||
The FreeCAD Contribution Process is expressed here with the following specific goals in mind:
|
||||
|
||||
1. To provide transparency and fairness in the contribution process.
|
||||
2. To allow contributions to be included as quickly as possible.
|
||||
3. To preserve and improve the code quality while encouraging appropriate experimentation and risk-taking.
|
||||
4. To minimize dependence on individual Contributors by encouraging a large pool of active Contributors.
|
||||
5. To be inclusive of many viewpoints and to harness a diverse set of skills.
|
||||
6. To provide an encouraging environment where Contributors learn and improve their skills.
|
||||
7. To protect the free and open nature of the FreeCAD project.
|
||||
|
||||
## 2. Fundamentals
|
||||
|
||||
1. FreeCAD uses the git distributed revision control system.
|
||||
2. Source code for the main application and related subprojects is hosted on github.com in the FreeCAD organization.
|
||||
3. Problems are discrete, well-defined limitations or bugs.
|
||||
4. FreeCAD uses GitHub's issue-tracking system to track problems and contributions. For help requests and general discussions, use the project forum.
|
||||
5. Contributions are sets of code changes that resolve a single problem.
|
||||
6. FreeCAD uses the Pull Request workflow for evaluating and accepting contributions.
|
||||
|
||||
## 3. Roles
|
||||
1. "User": A member of the wider FreeCAD community who uses the software.
|
||||
2. "Contributor": A person who submits a contribution that resolves a previously identified problem. Contributors do not have commit access to the repository unless they are also Maintainers. Everyone, without distinction or discrimination, SHALL have an equal right to become a Contributor.
|
||||
3. "Maintainer": A person who merges contributions. Maintainers may or may not be Contributors. Their role is to enforce the process. Maintainers have commit access to the repository.
|
||||
4. "Administrator": Administrators have additional authority to maintain the list of designated Maintainers.
|
||||
|
||||
## 4. Licensing, Ownership, and Credit
|
||||
1. FreeCAD is distributed under the Lesser General Public License, version 2, or superior (LGPL2+). Additional details can be found in the LICENSE file.
|
||||
2. All contributions to FreeCAD MUST use a compatible license.
|
||||
3. All contributions are owned by their authors unless assigned to another.
|
||||
4. FreeCAD does not have a mandatory copyright assignment policy.
|
||||
5. A Contributor who wishes to be identified in the Credits section of the application "About" dialog is responsible for identifying themselves. They should modify the Contributors file and submit a PR with a single commit for this modification only. The contributors file is found at https://github.com/FreeCAD/FreeCAD/blob/main/src/Doc/CONTRIBUTORS
|
||||
6. A contributor who does not wish to assume the copyright of their contribution MAY choose to assign it to the [FreeCAD project association](https://fpa.freecad.org) by mentioning **Copyright (c) 2022 The FreeCAD project association <fpa@freecad.org>** in the file's license code block.
|
||||
|
||||
## 5. Contribution Requirements
|
||||
|
||||
1. Contributions are submitted in the form of Pull Requests (PR).
|
||||
2. Maintainers and Contributors MUST have a GitHub account and SHOULD use their real names or a well-known alias.
|
||||
3. If the GitHub username differs from the username on the FreeCAD Forum, effort SHOULD be taken to avoid confusion.
|
||||
4. A PR SHOULD be a minimal and accurate answer to exactly one identified and agreed-on problem.
|
||||
5. A PR SHOULD refrain from adding additional dependencies to the FreeCAD project unless no other option is available.
|
||||
6. Code submissions MUST adhere to the code style guidelines of the project if these are defined.
|
||||
7. If a PR contains multiple commits, each commit MUST compile cleanly when merged with all previous commits of the same PR. Each commit SHOULD add value to the history of the project. Checkpoint commits SHOULD be squashed.
|
||||
8. A PR SHALL NOT include non-trivial code from other projects unless the Contributor is the original author of that code.
|
||||
9. A PR MUST compile cleanly and pass project self-tests on all target platforms.
|
||||
10. Changes that break python API used by extensions SHALL be avoided. If it is not possible to avoid breaking changes, the amount of them MUST be minimized and PR MUST clearly describe all breaking changes with clear description on how to replace no longer working solution with newer one. Contributor SHOULD search for addons that will be broken and list them in the PR.
|
||||
11. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
|
||||
12. The PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
|
||||
13. If a PR contains the work of another author (for example, if it is cherry-picked from a fork by someone other than the PR-submitter):
|
||||
1. the PR description MUST contain proper attribution as the first line, for example: "This is work of XYZ cherry-picked from <link>";
|
||||
2. all commits MUST have proper authorship, i.e. be authored by the original author and committed by the author of the PR;
|
||||
3. if changes to cherry-picked commits are necessary they SHOULD be done as follow-up commits. If it is not possible to do so, then the modified commits MUST contain a `Co-Authored-By` trailer in their commit message.
|
||||
14. Contributions must meet existing quality standards. Raw AI output is not accepted under any circumstances. AI may be used only as an assistive tool; in all cases, the resulting content must be reviewed, validated, and justifiable by the contributor. The contributor should be able to explain design and code decisions, answer reviewers’ questions, and ensure that AI use does not waste reviewers’ time during review. That being said, the use of AI is not recommended under any circumstances or in any manner.
|
||||
15. The contributor provides reasonable assurance that the contribution does not infringe third-party copyrights or license terms.
|
||||
16. A “Valid PR” is one which satisfies the above requirements.
|
||||
|
||||
## 6. Process
|
||||
|
||||
1. Change on the project follows the pattern of accurately identifying problems and applying minimal, accurate solutions to these problems.
|
||||
2. To request changes, a User logs an issue on the project GitHub issue tracker.
|
||||
3. The User or Contributor SHOULD write the issue by describing the problem they face or observe. Links to the forum or other resources are permitted but the issue SHOULD be complete and accurate and SHOULD NOT require the reader to visit the forum or any other platform to understand what is being described.
|
||||
4. Issue authors SHOULD strive to describe the minimum acceptable condition.
|
||||
5. Issue authors SHOULD focus on User tasks and avoid comparisons to other software solutions.
|
||||
6. The User or Contributor SHOULD seek consensus on the accuracy of their observation and the value of solving the problem.
|
||||
7. To submit a solution to a problem, a Contributor SHALL create a pull request back to the project.
|
||||
8. Contributors and Maintainers SHALL NOT commit changes directly to the target branch.
|
||||
9. To discuss a proposed solution, Users MAY comment on the Pull Request in GitHub. Forum conversations regarding the solution SHOULD be discouraged and conversation redirected to the Pull Request or the related issue.
|
||||
10. To accept or reject a Pull Request, a Maintainer SHALL use GitHub's interface.
|
||||
11. Maintainers SHOULD NOT merge their own PRs except:
|
||||
1. in exceptional cases, such as non-responsiveness from other Maintainers for an extended period.
|
||||
2. If the Maintainer is also the primary developer of the workbench or subsystem.
|
||||
|
||||
12. Maintainers SHALL merge valid PRs from other Contributors rapidly.
|
||||
13. Maintainers MAY, at their discretion merge PRs that have not met all criteria to be considered valid to:
|
||||
1. end fruitless discussions
|
||||
2. capture toxic contributions in the historical record
|
||||
3. engage with the Contributor on improving their contribution quality.
|
||||
14. Maintainers SHALL NOT make value judgments on correct contributions.
|
||||
15. If a PR requires significant further work before merging, the PR SHOULD be moved to draft status.
|
||||
16. If a PR is complete, but should not be merged yet (for example, because it depends on another in-process PR), the "On hold" label SHOULD be applied.
|
||||
17. Any Contributor who has value judgments on a PR SHOULD express these via their own PR.
|
||||
18. The User who created an issue SHOULD close the issue after checking the PR is successful.
|
||||
19. Maintainers SHOULD close issues that are left open without action or update for an unreasonable period.
|
||||
|
||||
## 7. Branches and Releases
|
||||
|
||||
1. The project SHALL have one branch (“main”) that always holds the latest in-progress version and SHOULD always build.
|
||||
2. The project SHALL NOT use topic branches for any reason. Personal forks MAY use topic branches.
|
||||
3. To make a stable release a Maintainer SHALL tag the repository. Stable releases SHALL always be released from the repository main branch.
|
||||
|
||||
## 8. Project Administration
|
||||
|
||||
1. Project Administrators are those individuals who are members of the FreeCAD Github organization and have the role of 'owner'. They have the task of administering the organization including adding and removing individuals from various teams.
|
||||
2. Project Administrator is a technical role necessitated by the GitHub platform. Except for the specific exceptions listed below, the Project Administrators do not make the decision about individual team members. Rather, they carry out the collective wishes of the Maintainers team. Project Administrators will be selected from the Maintainers team by the Maintainers themselves.
|
||||
3. To ensure continuity there SHALL be at least four Project Administrators at all times.
|
||||
4. The project Administrators will manage the set of project Maintainers. They SHALL maintain a sufficiently large pool of Maintainers to ensure their succession and permit timely review of contributions. If the pool of Maintainers is insufficient, the Project Administrators will request that the Maintainers select additional individuals to add.
|
||||
5. Contributors who have a history of successful PRs and have demonstrated continued professionalism should be invited to be Maintainers.
|
||||
6. Administrators SHOULD remove Maintainers who are inactive for an extended period, or who repeatedly fail to apply this process accurately.
|
||||
7. The list of Maintainers SHALL be publicly accessible and reflective of current activity on the project.
|
||||
8. Administrators SHALL act expediently to protect the FreeCAD infrastructure and resources.
|
||||
9. Administrators SHOULD block or ban “bad actors” who cause stress, animosity, or confusion to others in the project. This SHOULD be done after public discussion, with a chance for all parties to speak. A bad actor is someone who repeatedly ignores the rules and culture of the project, who is hostile or offensive, who impedes the productive exchange of information, and who is unable to self-correct their behavior when asked to do so by others.
|
||||
@@ -1,125 +1,113 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street - Fifth Floor
|
||||
Boston, MA 02110-1301, USA.
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
@@ -146,7 +134,7 @@ such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
@@ -158,7 +146,7 @@ Library.
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
@@ -216,7 +204,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@@ -267,8 +255,8 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
@@ -295,31 +283,23 @@ of these things:
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
@@ -329,7 +309,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@@ -368,9 +348,9 @@ Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@@ -411,7 +391,7 @@ excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
@@ -422,7 +402,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@@ -432,7 +412,7 @@ decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
@@ -455,9 +435,8 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
END OF TERMS AND CONDITIONS
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
@@ -476,7 +455,7 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@@ -485,8 +464,7 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@@ -495,8 +473,7 @@ school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random
|
||||
Hacker.
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef LIBRARY_VERSIONS_H
|
||||
#define LIBRARY_VERSIONS_H
|
||||
|
||||
/* LibraryVersions.h. Generated from LibraryVersions.h.cmake by cmake. */
|
||||
|
||||
#cmakedefine HAVE_OCC_VERSION
|
||||
|
||||
#if defined(HAVE_OCC_VERSION)
|
||||
# include <${OCC_INCLUDE_DIR}/Standard_Version.hxx>
|
||||
#endif
|
||||
|
||||
#endif // LIBRARY_VERSIONS_H
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# FreeCAD Privacy Policy
|
||||
|
||||
The FreeCAD application does not collect, transmit, share or use any Personal Data.
|
||||
|
||||
FreeCAD is community-developed Free Software. The community does not condone the unauthorized usage of private data, so our software does not gather or send personal data.
|
||||
|
||||
The FreeCAD website is mostly static, it does not contain any trackers, neither ours nor third-party. The website uses cookies to remember logged in status, timezone and other data related to navigating the site. The website does not contain advertisements.
|
||||
|
||||
The software does not contain advertisements or trackers either.
|
||||
|
||||
## Caveats
|
||||
|
||||
FreeCAD is able to load or save files to/from remote servers (for some protocols and platforms). If you choose to load or save a remote file, your IP or other private data might be shared as part of the normal connection flow for the given protocol. This is out of our control and it is up to you to decide whether you trust a remote host.
|
||||
|
||||
The FreeCAD eco system includes user developed workbenches. These workbenches can be installed/updated using the Add-on Manager. The Add-on Manager retrieves workbenches from remote servers across the internet. Add-on workbenches are not checked for malicious content. It is your responsibility to decide whether you trust an add-on workbench.
|
||||
|
||||
FreeCAD is meant to manipulate CAD files which may contain metadata. It is your responsibility to verify the metadata contained in your files before you share them with others. These files may contain local directory paths which could reveal user names if the user name forms part of the path - as in “C:\MrsCAD\Documents\myFreeCADFile.FCstd”.
|
||||
|
||||
FreeCAD can also be used to create and run macros. These are Python scripts that can perform any action that the user can perform on a system. When running a macro from an outside source, it is your responsibility to ensure you trust the author.
|
||||
|
||||
While running and for subsequent runs, FreeCAD uses local persistent storage for logs, configuration files, cache, thumbnails, recently accessed files and other information which may contain private data. This stays on local storage.
|
||||
|
||||
When reading the online version of the User Manual within FreeCAD, manual contents is requested through HTTPS connections.
|
||||
|
||||
FreeCAD is Free Software and therefore may be packaged by other people, who may include additional software or modify the source code. We do not vouch for these third-party packages and cannot tell you what they contain and what they do regarding your privacy. The official packages are explicitly listed in our download page.
|
||||
|
||||
|
||||
*The above privacy policy is based on the [GIMP privacy policy](https://www.gimp.org/about/privacy.html).*
|
||||
@@ -1,113 +1,85 @@
|
||||
<a href="https://freecad.org"><img src="/src/Gui/Icons/freecad.svg" height="100px" width="100px"></a>
|
||||
FreeCAD
|
||||
-------
|
||||
|
||||
### Your own 3D Parametric Modeler
|
||||

|
||||
|
||||
[Website](https://www.freecad.org) •
|
||||
[Documentation](https://wiki.freecad.org) •
|
||||
[Forum](https://forum.freecad.org/) •
|
||||
[Bug tracker](https://github.com/FreeCAD/FreeCAD/issues) •
|
||||
[Git repository](https://github.com/FreeCAD/FreeCAD) •
|
||||
[Blog](https://blog.freecad.org)
|
||||
FreeCAD is a general purpose feature-based, parametric 3D modeler for
|
||||
CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering
|
||||
and product design but also fits a wider range of uses in engineering,
|
||||
such as architecture or other engineering specialties. It is 100% Open
|
||||
Source (LGPL2+ license) and extremely modular, allowing for very
|
||||
advanced extension and customization.
|
||||
|
||||
FreeCAD is based on OpenCASCADE, a powerful geometry kernel, features an
|
||||
Open Inventor-compliant 3D scene representation model provided by the
|
||||
Coin 3D library, and a broad Python API. The interface is built with Qt.
|
||||
FreeCAD runs exactly the same way on Windows, Mac OSX, BSD and Linux
|
||||
platforms.
|
||||
|
||||
[](https://github.com/freecad/freecad/releases/latest) [](https://crowdin.com/project/freecad)
|
||||
|
||||
<img src="/.github/images/partdesign.png" width="800"/>
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
* **Freedom to build what you want** FreeCAD is an open-source parametric 3D
|
||||
modeler made primarily to design real-life objects of any size.
|
||||
Parametric modeling allows you to easily modify your design by going back into
|
||||
your model history to change its parameters.
|
||||
|
||||
* **Create 3D from 2D and back** FreeCAD lets you sketch geometry-constrained
|
||||
2D shapes and use them as a base to build other objects.
|
||||
It contains many components to adjust dimensions or extract design details from
|
||||
3D models to create high quality production-ready drawings.
|
||||
|
||||
* **Designed for your needs** FreeCAD is designed to fit a wide range of uses
|
||||
including product design, mechanical engineering and architecture,
|
||||
whether you are a hobbyist, programmer, experienced CAD user, student or teacher.
|
||||
|
||||
* **Cross platform** FreeCAD runs on Windows, macOS and Linux operating systems.
|
||||
|
||||
* **Underlying technology**
|
||||
* **OpenCASCADE** A powerful geometry kernel, the most important component of FreeCAD
|
||||
* **Coin3D library** Open Inventor-compliant 3D scene representation model
|
||||
* **Python** FreeCAD offers a broad Python API
|
||||
* **Qt** Graphical user interface built with Qt
|
||||
|
||||
- [Home page](http://www.freecadweb.org)
|
||||
- [Documentation wiki](http://www.freecadweb.org/wiki/)
|
||||
- [Forum](http://forum.freecadweb.org/)
|
||||
- [Bug tracker](http://www.freecadweb.org/tracker/)
|
||||
- [Git repository](https://github.com/FreeCAD/FreeCAD)
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
Precompiled packages for stable releases are available for Windows, macOS and Linux on the
|
||||
[latest releases page](https://github.com/FreeCAD/FreeCAD/releases/latest).
|
||||
Precompiled (installable) packages are available for Windows and Mac on the
|
||||
[Releases page](https://github.com/FreeCAD/FreeCAD/releases).
|
||||
|
||||
On most Linux distributions, FreeCAD is also directly installable from the
|
||||
On most Linux distributions, FreeCAD is directly installable from the
|
||||
software center application.
|
||||
|
||||
For weekly development releases visit the [releases page](https://github.com/FreeCAD/FreeCAD/releases/).
|
||||
Other options are described at the [wiki Download page](http://www.freecadweb.org/wiki/Download).
|
||||
|
||||
Other options are described on the [wiki Download page](https://wiki.freecad.org/Download).
|
||||
Build Status <img src="https://blog.travis-ci.com/images/travis-mascot-200px.png" height="30"/>
|
||||
------------
|
||||
|
||||
| Master | 0.17 | Translation |
|
||||
|:------:|:----:|:-----------:|
|
||||
|[![Master][freecad-master-status]][travis-branches]|[![0.17][freecad-0.17-status]][travis-branches]|[](https://crowdin.com/project/freecad)|
|
||||
|
||||
[freecad-0.17-status]: https://travis-ci.org/FreeCAD/FreeCAD.svg?branch=releases/FreeCAD-0-17
|
||||
[freecad-master-status]: https://travis-ci.org/FreeCAD/FreeCAD.svg?branch=master
|
||||
[travis-branches]: https://travis-ci.org/FreeCAD/FreeCAD/branches
|
||||
[travis-builds]: https://travis-ci.org/FreeCAD/FreeCAD/builds
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
See the [Developers Handbook – Getting Started](https://freecad.github.io/DevelopersHandbook/gettingstarted/)
|
||||
for build instructions.
|
||||
Compiling FreeCAD requires installation of several libraries and their
|
||||
development files such as OpenCASCADe, Coin and Qt, listed in the
|
||||
pages below. Once this is done, FreeCAD can be simply compiled with
|
||||
cMake. On Windows, these libraries are bundled and offered by the
|
||||
FreeCAD team in a convenient package. On Linux, they are usually found
|
||||
in your distribution's repositories, and on Mac OSX and other platforms
|
||||
you will usually need to compile them yourself.
|
||||
|
||||
The pages below contain up-to-date build instructions:
|
||||
|
||||
Reporting Issues
|
||||
---------
|
||||
- [Linux](http://www.freecadweb.org/wiki/CompileOnUnix)
|
||||
- [Windows](http://www.freecadweb.org/wiki/CompileOnWindows)
|
||||
- [Mac OSX](http://www.freecadweb.org/wiki/CompileOnMac)
|
||||
- [Cygwin](http://www.freecadweb.org/wiki/CompileOnCygwin)
|
||||
- [MinGW](http://www.freecadweb.org/wiki/CompileOnMinGW)
|
||||
|
||||
To report an issue please:
|
||||
|
||||
- Consider posting to the [Forum](https://forum.freecad.org), [Discord](https://discord.com/invite/w2cTKGzccC) channel, or [Reddit](https://www.reddit.com/r/FreeCAD) to verify the issue;
|
||||
- Search the existing [issues](https://github.com/FreeCAD/FreeCAD/issues) for potential duplicates;
|
||||
- Use the most updated stable or [development versions](https://github.com/FreeCAD/FreeCAD/releases/) of FreeCAD;
|
||||
- Post version info from `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Restart FreeCAD in safe mode `Help > Restart in safe mode` and try to reproduce the issue again. If the issue is resolved it can be fixed by deleting the FreeCAD config files.
|
||||
- Start recording a macro `Macro > Macro recording...` and repeat all steps. Stop recording after the issue occurs and upload the saved macro or copy the macro code in the issue;
|
||||
- Post a Step-By-Step explanation on how to recreate the issue;
|
||||
- Upload an example file (FCStd as ZIP file) to demonstrate the problem;
|
||||
|
||||
For more details see:
|
||||
|
||||
- [Bug Tracker](https://github.com/FreeCAD/FreeCAD/issues)
|
||||
- [Reporting Issues and Requesting Features](https://github.com/FreeCAD/FreeCAD/issues/new/choose)
|
||||
- [Contributing](https://github.com/FreeCAD/FreeCAD/blob/main/CONTRIBUTING.md)
|
||||
- [Help Forum](https://forum.freecad.org/viewforum.php?f=3)
|
||||
|
||||
> [!NOTE]
|
||||
The [FPA](https://fpa.freecad.org) offers developers the opportunity
|
||||
to apply for a grant to work on projects of their choosing. Check
|
||||
[jobs and funding](https://blog.freecad.org/jobs/) to know more.
|
||||
|
||||
|
||||
Usage & Getting Help
|
||||
Usage & Getting help
|
||||
--------------------
|
||||
|
||||
[](https://gitter.im/freecad/freecad?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
The FreeCAD wiki contains documentation on
|
||||
general FreeCAD usage, Python scripting, and development.
|
||||
View these pages for more information:
|
||||
general FreeCAD usage, Python scripting, and development. These
|
||||
pages might help you get started:
|
||||
|
||||
- [Getting started](https://wiki.freecad.org/Getting_started)
|
||||
- [Features list](https://wiki.freecad.org/Feature_list)
|
||||
- [Frequent questions](https://wiki.freecad.org/FAQ/en)
|
||||
- [Workbenches](https://wiki.freecad.org/Workbenches)
|
||||
- [Scripting](https://wiki.freecad.org/Power_users_hub)
|
||||
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
|
||||
- [Getting started](http://www.freecadweb.org/wiki/Getting_started)
|
||||
- [Features list](http://www.freecadweb.org/wiki/Feature_list)
|
||||
- [Frequent questions](http://www.freecadweb.org/wiki/FAQ)
|
||||
- [Workbenches](http://www.freecadweb.org/wiki/Workbench_Concept)
|
||||
- [Scripting](http://www.freecadweb.org/wiki/Power_users_hub)
|
||||
- [Development](http://www.freecadweb.org/wiki/Developer_hub)
|
||||
|
||||
The [FreeCAD forum](https://forum.freecad.org) is a great place
|
||||
to find help and solve specific problems when learning to use FreeCAD.
|
||||
|
||||
---
|
||||
|
||||
<p>This project receives generous infrastructure support from
|
||||
<a href="https://www.digitalocean.com/">
|
||||
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="91px">
|
||||
</a> and <a href="https://www.kipro-pcb.com/">KiCad Services Corp.</a>
|
||||
</p>
|
||||
The [FreeCAD forum](http://forum.freecadweb.org) is also a great place
|
||||
to find help and solve specific problems you might encounter when
|
||||
learning to use FreeCAD.
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
The FreeCAD project is a FOSS (Free and Open-Source Software) project that has a community of thousands of users and
|
||||
hundreds of developers worldwide. We encourage responsible reporting of security vulnerabilities that may affect users
|
||||
of this software, and will endeavor to address these vulnerabilities when they are discovered.
|
||||
|
||||
## Bounties
|
||||
|
||||
FreeCAD does not have a program to pay bounties for security bugs. If you discover a vulnerability that affects a part
|
||||
of the FreeCAD project (either directly in FreeCAD, in a library it depends on, or in any of the various other
|
||||
subprojects such as our website, forums, etc.) we ask you to join the large community of volunteer contributors and
|
||||
file a report about the issue.
|
||||
|
||||
Note that funds may be available from the [FreeCAD Project Association (FPA)](https://fpa.freecad.org) to pursue
|
||||
security research and/or the development of fixes to any vulnerabilities discovered. However, vulnerabilities held as
|
||||
hostage in demands for "bounties" will not be entertained. Contact the FPA at fpa@freecad.org for more information.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
FreeCAD implements security fixes to the current release series, and to the current development on the main branch.
|
||||
|
||||
| Version | Supported |
|
||||
|---------| ------------------ |
|
||||
| 1.1dev | :white_check_mark: |
|
||||
| 1.0 | :white_check_mark: |
|
||||
| < 1.0 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability use GitHub's security reporting tool:
|
||||
https://github.com/FreeCAD/FreeCAD/security/advisories/new
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef SMESH_VERSION_H
|
||||
#define SMESH_VERSION_H
|
||||
|
||||
/* SMESH_Version.h. Generated from SMESH_Version.h.cmake by cmake. */
|
||||
|
||||
// SMESH version
|
||||
#define SMESH_VERSION_MAJOR ${SMESH_VERSION_MAJOR}
|
||||
#define SMESH_VERSION_MINOR ${SMESH_VERSION_MINOR}
|
||||
#define SMESH_VERSION_PATCH ${SMESH_VERSION_PATCH}
|
||||
#define SMESH_VERSION_TWEAK ${SMESH_VERSION_TWEAK}
|
||||
|
||||
#endif // SMESH_VERSION_H
|
||||
@@ -0,0 +1,65 @@
|
||||
#version:
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- generator: "Visual Studio 12 Win64"
|
||||
ARCH: "Win64"
|
||||
Compiler: "MSVC2013"
|
||||
- generator: "Visual Studio 12"
|
||||
ARCH: "Win32"
|
||||
Compiler: "MSVC2013"
|
||||
|
||||
#cache: #
|
||||
|
||||
configuration:
|
||||
#- Debug
|
||||
- Release
|
||||
|
||||
#branches:
|
||||
# only:
|
||||
|
||||
clone_depth: 1600
|
||||
|
||||
# scripts that are called at very beginning, before repo cloning
|
||||
#init:
|
||||
|
||||
#before_build:
|
||||
|
||||
# scripts that run after cloning repository
|
||||
#todo cleanup libpacks on the FreeCAD-ports-cache repo
|
||||
install:
|
||||
- cd C:\projects\freecad
|
||||
- if [%ARCH%] == [Win64] (appveyor DownloadFile https://github.com/FreeCAD/FreeCAD-ports-cache/releases/download/v0.17/FreeCADLibs_11.5.1_x64_VC12.7z)
|
||||
- if [%ARCH%] == [Win64] (
|
||||
powershell -Command 7z x FreeCADLibs_11.5.1_x64_VC12.7z > nul &&
|
||||
ren FreeCADLibs_11.5_x64_VC12 FreeCADLibs)
|
||||
- if [%ARCH%] == [Win32] (appveyor DownloadFile https://github.com/FreeCAD/FreeCAD-ports-cache/releases/download/v0.17/FreeCADLibs_11.5.1_x86_VC12.7z)
|
||||
- if [%ARCH%] == [Win32] (
|
||||
powershell -Command 7z x FreeCADLibs_11.5.1_x86_VC12.7z > nul &&
|
||||
ren FreeCADLibs_11.5_x86_VC12 FreeCADLibs)
|
||||
- dir
|
||||
|
||||
build_script:
|
||||
- cd C:\projects\freecad
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DFREECAD_LIBPACK_DIR=C:\projects\freecad\FreeCADLibs
|
||||
-DBUILD_FEM_NETGEN=OFF
|
||||
-G "%generator%" ..
|
||||
- mkdir bin
|
||||
- xcopy C:\projects\freecad\FreeCADLibs\bin C:\projects\freecad\build\bin /E /Q
|
||||
- msbuild /m FreeCAD_Trunk.sln
|
||||
|
||||
#after_build:
|
||||
- cd C:\projects\freecad\build\bin\
|
||||
- FreeCADCmd.exe --run-test 0
|
||||
|
||||
#artifacts:
|
||||
|
||||
test: off # to avoid discovering tests
|
||||
|
||||
#
|
||||
# The following section automatically uploads artifacts
|
||||
# whenever a tag is created on the master branch.
|
||||
#
|
||||
#deploy:
|
||||
@@ -9,8 +9,33 @@ include(CheckCSourceCompiles)
|
||||
include(CheckIncludeFileCXX)
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
#check_include_file(dlfcn.h HAVE_DLFCN_H)
|
||||
check_include_file(GL/gl.h HAVE_GL_GL_H)
|
||||
|
||||
#check_include_file(iomanip.h HAVE_IOMANIP_H)
|
||||
#check_include_file(limits.h HAVE_LIMITS_H)
|
||||
#check_include_file(values.h HAVE_VALUES_H)
|
||||
#check_include_file(float.h HAVE_FLOAT_H)
|
||||
#check_include_file(inttypes.h HAVE_INTTYPES_H)
|
||||
|
||||
#check_include_file(libc.h HAVE_LIBC_H)
|
||||
#check_include_file(memory.h HAVE_MEMORY_H)
|
||||
#check_include_file(stdint.h HAVE_STDINT_H)
|
||||
#check_include_file(stdlib.h HAVE_STDLIB_H)
|
||||
#check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
#check_include_file(strings.h HAVE_STRINGS_H)
|
||||
#check_include_file(string.h HAVE_STRING_H)
|
||||
|
||||
#check_include_file(bstring.h HAVE_BSTRING_H)
|
||||
#check_include_file(siginfo.h HAVE_SIGINFO_H)
|
||||
#check_include_file(bits/sigset.h HAVE_BITS_SIGSET_H)
|
||||
#check_include_file(sys/dir.h HAVE_SYS_DIR_H)
|
||||
#check_include_file(sys/filio.h HAVE_SYS_FILIO_H)
|
||||
#check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
|
||||
#check_include_file(sys/select.h HAVE_SYS_SELECT_H)
|
||||
#check_include_file(sys/stat.h HAVE_SYS_STAT_H)
|
||||
#check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
|
||||
# i/o streams
|
||||
check_include_file_cxx(istream HAVE_ISTREAM)
|
||||
check_include_file_cxx(ostream HAVE_OSTREAM)
|
||||
@@ -38,23 +63,3 @@ SET(HAVE_QT_KEYPAD_DEFINE 1)
|
||||
SET(HAVE_QWIDGET_SHOWFULLSCREEN 1)
|
||||
|
||||
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/backtrace.cpp
|
||||
"#include <cstddef>\n"
|
||||
"#include <execinfo.h>\n\n"
|
||||
"int main() {\n"
|
||||
" void *callstack[128];\n"
|
||||
" size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);\n"
|
||||
" size_t nFrames = backtrace(callstack, nMaxFrames);\n"
|
||||
" char **symbols = backtrace_symbols(callstack, nFrames);\n"
|
||||
" return 0;\n"
|
||||
"}"
|
||||
)
|
||||
|
||||
try_compile(
|
||||
RESULT_VAR
|
||||
${CMAKE_BINARY_DIR}
|
||||
SOURCES
|
||||
${CMAKE_BINARY_DIR}/backtrace.cpp
|
||||
)
|
||||
|
||||
SET(HAVE_BACKTRACE_SYMBOLS ${RESULT_VAR})
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
# Try to find Coin3D
|
||||
# Once done this will define
|
||||
#
|
||||
# COIN3D_FOUND - system has Coin3D - Open Inventor
|
||||
# COIN3D_INCLUDE_DIRS - where the Inventor include directory can be found
|
||||
# COIN3D_LIBRARIES - Link this to use Coin3D
|
||||
#
|
||||
|
||||
SET( COIN3D_FOUND "NO" )
|
||||
|
||||
IF (WIN32)
|
||||
IF (CYGWIN)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
${CMAKE_INCLUDE_PATH}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/include/coin
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
ELSE (CYGWIN)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY_DEBUG coin2d
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY_RELEASE
|
||||
NAMES
|
||||
coin2
|
||||
Coin4
|
||||
PATHS
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
IF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
SET(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
|
||||
debug ${COIN3D_LIBRARY_DEBUG})
|
||||
ELSE (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
IF (COIN3D_LIBRARY_DEBUG)
|
||||
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG})
|
||||
ENDIF (COIN3D_LIBRARY_DEBUG)
|
||||
IF (COIN3D_LIBRARY_RELEASE)
|
||||
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE})
|
||||
ENDIF (COIN3D_LIBRARY_RELEASE)
|
||||
ENDIF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
|
||||
IF (COIN3D_LIBRARIES)
|
||||
# ADD_DEFINITIONS ( -DCOIN_NOT_DLL )
|
||||
#ELSE (COIN3D_LIBRARIES)
|
||||
# SET (COIN3D_LIBRARIES coin2d CACHE STRING "Coin3D Library (Debug) - Open Inventor API")
|
||||
ENDIF (COIN3D_LIBRARIES)
|
||||
|
||||
ENDIF (CYGWIN)
|
||||
|
||||
ELSE (WIN32)
|
||||
IF(APPLE)
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
/Library/Frameworks/Inventor.framework/Headers
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
/Library/Frameworks/Inventor.framework/Libraries
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
SET(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
|
||||
ELSE(APPLE)
|
||||
# Try to use pkg-config first...
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(COIN3D Coin)
|
||||
# ... then fall back to manual lookup
|
||||
IF(NOT COIN3D_FOUND)
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
${CMAKE_INCLUDE_PATH}
|
||||
/usr/include/Coin3
|
||||
/usr/include
|
||||
/usr/include/coin
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
PATH_SUFFIXES Coin2 Coin3
|
||||
)
|
||||
ENDIF(NOT COIN3D_FOUND)
|
||||
ENDIF(APPLE)
|
||||
|
||||
ENDIF (WIN32)
|
||||
|
||||
|
||||
IF(COIN3D_LIBRARIES)
|
||||
SET( COIN3D_FOUND "YES" )
|
||||
ENDIF(COIN3D_LIBRARIES)
|
||||
|
||||
@@ -23,19 +23,18 @@ IF (COIN3D_FOUND)
|
||||
find_path(COIN3D_DOC_PATH index.html
|
||||
/usr/share/doc/libcoin80-doc/html
|
||||
/usr/share/doc/coin/html
|
||||
/usr/share/doc/Coin/html
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_PATH})
|
||||
message(STATUS "Coin3D doc is installed")
|
||||
find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag
|
||||
PATHS ${COIN3D_DOC_PATH}
|
||||
find_file(COIN3D_DOC_TAGFILE coin.tag Coin.tag
|
||||
${COIN3D_DOC_PATH}
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
SET( COIN3D_DOC_FOUND "YES"
|
||||
)
|
||||
ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz
|
||||
PATHS ${COIN3D_DOC_PATH}
|
||||
find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz Coin.tag.gz
|
||||
${COIN3D_DOC_PATH}
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})
|
||||
message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}")
|
||||
@@ -54,8 +53,28 @@ IF (COIN3D_FOUND)
|
||||
${CMAKE_BINARY_DIR}/src/Doc
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
SET( COIN3D_DOC_FOUND "YES" )
|
||||
SET( COIN3D_DOC_FOUND "YES"
|
||||
)
|
||||
#ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
# find_program(WGET_PROG wget
|
||||
# )
|
||||
# IF( EXISTS ${WGET_PROG})
|
||||
# execute_process(COMMAND ${WGET_PROG}
|
||||
# -P ${CMAKE_BINARY_DIR}/src/Doc
|
||||
# ${COIN3D_DOC_PATH}/coin.tag
|
||||
# )
|
||||
# find_file(COIN3D_DOC_TAGFILE coin.tag
|
||||
# ${CMAKE_BINARY_DIR}/src/Doc
|
||||
# )
|
||||
# IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
# SET( COIN3D_DOC_FOUND "YES"
|
||||
# )
|
||||
# ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
#
|
||||
# ENDIF( EXISTS ${WGET_PROG})
|
||||
|
||||
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
|
||||
ENDIF( EXISTS ${COIN3D_DOC_PATH})
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
@@ -66,5 +85,4 @@ if(COIN3D_DOC_FOUND)
|
||||
message(STATUS " Location: ${COIN3D_DOC_PATH}")
|
||||
endif(COIN3D_DOC_FOUND)
|
||||
|
||||
# export for others
|
||||
SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available")
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
# - Try to find Eigen2 lib
|
||||
# Once done this will define
|
||||
#
|
||||
# EIGEN2_FOUND - system has eigen lib with correct version
|
||||
# EIGEN2_INCLUDE_DIR - the eigen include directory
|
||||
# EIGEN2_VERSION - eigen version
|
||||
|
||||
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
|
||||
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
if(NOT EIGEN2_MIN_VERSION)
|
||||
if(NOT Eigen2_FIND_VERSION_MAJOR)
|
||||
set(Eigen2_FIND_VERSION_MAJOR 2)
|
||||
endif(NOT Eigen2_FIND_VERSION_MAJOR)
|
||||
if(NOT Eigen2_FIND_VERSION_MINOR)
|
||||
set(Eigen2_FIND_VERSION_MINOR 0)
|
||||
endif(NOT Eigen2_FIND_VERSION_MINOR)
|
||||
if(NOT Eigen2_FIND_VERSION_PATCH)
|
||||
set(Eigen2_FIND_VERSION_PATCH 0)
|
||||
endif(NOT Eigen2_FIND_VERSION_PATCH)
|
||||
|
||||
set(EIGEN2_MIN_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}")
|
||||
endif(NOT EIGEN2_MIN_VERSION)
|
||||
|
||||
macro(_eigen2_check_version)
|
||||
file(READ "${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header LIMIT 5000 OFFSET 1000)
|
||||
|
||||
string(REGEX MATCH "define *EIGEN_WORLD_VERSION ([0-9]*)" _eigen2_world_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_WORLD_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define *EIGEN_MAJOR_VERSION ([0-9]*)" _eigen2_major_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define *EIGEN_MINOR_VERSION ([0-9]*)" _eigen2_minor_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
|
||||
if(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
set(EIGEN2_VERSION_OK FALSE)
|
||||
else(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
set(EIGEN2_VERSION_OK TRUE)
|
||||
endif(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
|
||||
if(NOT EIGEN2_VERSION_OK)
|
||||
|
||||
message(STATUS "Eigen2 version ${EIGEN2_VERSION} found in ${EIGEN2_INCLUDE_DIR}, "
|
||||
"but at least version ${EIGEN2_MIN_VERSION} is required")
|
||||
endif(NOT EIGEN2_VERSION_OK)
|
||||
endmacro(_eigen2_check_version)
|
||||
|
||||
if (EIGEN2_INCLUDE_DIR)
|
||||
|
||||
# in cache already
|
||||
_eigen2_check_version()
|
||||
set(EIGEN2_FOUND ${EIGEN2_VERSION_OK})
|
||||
|
||||
else (EIGEN2_INCLUDE_DIR)
|
||||
|
||||
find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
|
||||
PATHS
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES eigen2
|
||||
)
|
||||
|
||||
if(EIGEN2_INCLUDE_DIR)
|
||||
_eigen2_check_version()
|
||||
endif(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)
|
||||
|
||||
mark_as_advanced(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
endif(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# - Try to find Eigen3 lib
|
||||
#
|
||||
# This module supports requiring a minimum version, e.g. you can do
|
||||
# find_package(Eigen3 3.4.0)
|
||||
# to require version 3.4.0 or newer of Eigen3.
|
||||
# find_package(Eigen3 3.1.2)
|
||||
# to require version 3.1.2 or newer of Eigen3.
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
@@ -16,47 +16,49 @@
|
||||
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
|
||||
|
||||
if(NOT Eigen3_FIND_VERSION)
|
||||
set(Eigen3_FIND_VERSION_MAJOR 3)
|
||||
set(Eigen3_FIND_VERSION_MINOR 4)
|
||||
set(Eigen3_FIND_VERSION_PATCH 0)
|
||||
if(NOT Eigen3_FIND_VERSION_MAJOR)
|
||||
set(Eigen3_FIND_VERSION_MAJOR 2)
|
||||
endif(NOT Eigen3_FIND_VERSION_MAJOR)
|
||||
if(NOT Eigen3_FIND_VERSION_MINOR)
|
||||
set(Eigen3_FIND_VERSION_MINOR 91)
|
||||
endif(NOT Eigen3_FIND_VERSION_MINOR)
|
||||
if(NOT Eigen3_FIND_VERSION_PATCH)
|
||||
set(Eigen3_FIND_VERSION_PATCH 0)
|
||||
endif(NOT Eigen3_FIND_VERSION_PATCH)
|
||||
|
||||
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
|
||||
endif(NOT Eigen3_FIND_VERSION)
|
||||
|
||||
macro(_eigen3_check_version)
|
||||
# file Version exists from Eigen3 5.0.0
|
||||
if (EXISTS "${EIGEN3_INCLUDE_DIR}/Eigen/Version")
|
||||
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/Version" _eigen3_version_header)
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_PATCH_VERSION[ \t]+([0-9]+)" _eigen3_patch_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_PATCH_VERSION "${CMAKE_MATCH_1}")
|
||||
set(EIGEN3_VERSION ${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}.${EIGEN3_PATCH_VERSION})
|
||||
else()
|
||||
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
|
||||
endif()
|
||||
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
|
||||
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
|
||||
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
|
||||
set(EIGEN3_VERSION_OK FALSE)
|
||||
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
|
||||
"but at least version ${Eigen3_FIND_VERSION} is required")
|
||||
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
|
||||
set(EIGEN3_VERSION_OK TRUE)
|
||||
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
|
||||
|
||||
if(NOT EIGEN3_VERSION_OK)
|
||||
|
||||
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
|
||||
"but at least version ${Eigen3_FIND_VERSION} is required")
|
||||
endif(NOT EIGEN3_VERSION_OK)
|
||||
endmacro(_eigen3_check_version)
|
||||
|
||||
if (EIGEN3_INCLUDE_DIR)
|
||||
|
||||
# in cache already
|
||||
_eigen3_check_version()
|
||||
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
|
||||
|
||||
else (EIGEN3_INCLUDE_DIR)
|
||||
|
||||
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
|
||||
@@ -69,8 +71,11 @@ else (EIGEN3_INCLUDE_DIR)
|
||||
if(EIGEN3_INCLUDE_DIR)
|
||||
_eigen3_check_version()
|
||||
endif(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Eigen3 REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK VERSION_VAR EIGEN3_VERSION)
|
||||
find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
|
||||
|
||||
mark_as_advanced(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
endif(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
|
||||
MESSAGE( STATUS "Detecting KDL" )
|
||||
|
||||
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/")
|
||||
MESSAGE( "Looking for KDL in: ${KDL_INSTALL}")
|
||||
PKGCONFIG( "orocos-kdl >= 1.4.0" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS )
|
||||
PKGCONFIG( "orocos-kdl >= 0.99" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS )
|
||||
|
||||
IF( KDL_FOUND )
|
||||
MESSAGE(" Includes in: ${KDL_INCLUDE_DIRS}")
|
||||
@@ -22,10 +22,13 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${KDL_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDL_LINK_DIRS})
|
||||
#OROCOS_PKGCONFIG_INCPATH("${KDLTK_INCLUDE_DIRS}")
|
||||
#OROCOS_PKGCONFIG_LIBS("${KDL_LIBS}")
|
||||
#OROCOS_PKGCONFIG_LIBPATH("${KDL_LINK_DIRS}")
|
||||
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig")
|
||||
MESSAGE( "Looking for KDL Toolkit in: ${PKG_CONFIG_PATH}")
|
||||
PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 1.4.0" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS )
|
||||
PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 0.99" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS )
|
||||
IF(KDLTK_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${KDLTK_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDLTK_LINK_DIRS})
|
||||
@@ -35,7 +38,7 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
IF(CORBA_ENABLED)
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig")
|
||||
MESSAGE("Looking for KDL Toolkit CORBA extension in ${PKG_CONFIG_PATH}")
|
||||
PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 1.4.0" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS )
|
||||
PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 0.99" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS )
|
||||
IF(KDLTKCORBA_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${KDLTKCORBA_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDLTKCORBA_LINK_DIRS})
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
# - Find the lark library
|
||||
# This module finds if lark is installed, and sets the following variables
|
||||
# indicating where it is.
|
||||
#
|
||||
# LARK_FOUND - was lark found
|
||||
# LARK_VERSION - the version of lark found as a string
|
||||
# LARK_VERSION_MAJOR - the major version number of lark
|
||||
# LARK_VERSION_MINOR - the minor version number of lark
|
||||
# LARK_VERSION_PATCH - the patch version number of lark
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(Python3_EXECUTABLE)
|
||||
message(STATUS "FindLark: Using Python3_EXECUTABLE = ${Python3_EXECUTABLE}")
|
||||
|
||||
# try to import lark into Python interpreter
|
||||
execute_process(
|
||||
COMMAND "${Python3_EXECUTABLE}" "-c"
|
||||
"import lark; print(lark.__version__)"
|
||||
RESULT_VARIABLE _LARK_SEARCH_SUCCESS
|
||||
OUTPUT_VARIABLE LARK_VERSION
|
||||
ERROR_VARIABLE _LARK_ERROR_VALUE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
message(DEBUG "FindLark: Result = ${_LARK_SEARCH_SUCCESS}")
|
||||
message(DEBUG "FindLark: Version = ${LARK_VERSION}")
|
||||
message(DEBUG "FindLark: Error = ${_LARK_ERROR_VALUE}")
|
||||
|
||||
if(_LARK_SEARCH_SUCCESS MATCHES 0)
|
||||
# extract version components
|
||||
string(REGEX REPLACE "\\." ";" _LARK_VERSION_LIST ${LARK_VERSION})
|
||||
list(LENGTH _LARK_VERSION_LIST _LARK_VERSION_LIST_LEN)
|
||||
if(_LARK_VERSION_LIST_LEN GREATER_EQUAL 1)
|
||||
list(GET _LARK_VERSION_LIST 0 LARK_VERSION_MAJOR)
|
||||
endif()
|
||||
if(_LARK_VERSION_LIST_LEN GREATER_EQUAL 2)
|
||||
list(GET _LARK_VERSION_LIST 1 LARK_VERSION_MINOR)
|
||||
endif()
|
||||
if(_LARK_VERSION_LIST_LEN GREATER_EQUAL 3)
|
||||
list(GET _LARK_VERSION_LIST 2 LARK_VERSION_PATCH)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "The BIM workbench requires the lark python package / module to be installed")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "FindLark: Python3_EXECUTABLE not set")
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(LARK
|
||||
REQUIRED_VARS LARK_VERSION
|
||||
VERSION_VAR LARK_VERSION
|
||||
)
|
||||
@@ -5,7 +5,6 @@
|
||||
# MEDFILE_LIBRARIES
|
||||
# MEDFILE_C_LIBRARIES
|
||||
# MEDFILE_F_LIBRARIES
|
||||
# MEDFILE_VERSION
|
||||
#
|
||||
# The CMake (or environment) variable MEDFILE_ROOT_DIR can be set to
|
||||
# guide the detection and indicate a root directory to look into.
|
||||
@@ -57,14 +56,3 @@ ENDIF(MEDFILE_F_LIBRARIES)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MEDFile REQUIRED_VARS MEDFILE_INCLUDE_DIRS MEDFILE_LIBRARIES)
|
||||
|
||||
IF(meddotH)
|
||||
FILE(READ "${meddotH}" _med_h)
|
||||
STRING(REGEX MATCH "define[ \t]+MED_MAJOR_NUM[ \t]+([0-9?])" _med_major_version_match "${_med_h}")
|
||||
SET(MED_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
STRING(REGEX MATCH "define[ \t]+MED_MINOR_NUM[ \t]+([0-9?])" _med_minor_version_match "${_med_h}")
|
||||
SET(MED_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
STRING(REGEX MATCH "define[ \t]+MED_RELEASE_NUM[ \t]+([0-9?])" _med_release_version_match "${_med_h}")
|
||||
SET(MED_RELEASE_VERSION "${CMAKE_MATCH_1}")
|
||||
SET(MEDFILE_VERSION "${MED_MAJOR_VERSION}.${MED_MINOR_VERSION}.${MED_RELEASE_VERSION}")
|
||||
ENDIF()
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
# MATPLOTLIB_VERSION_PATCH - the patch version number of matplotlib
|
||||
# MATPLOTLIB_PATH_DIRS - path to the matplotlib include files
|
||||
|
||||
IF(Python3_Interpreter_FOUND)
|
||||
IF(PYTHONINTERP_FOUND)
|
||||
# Try to import matplotlib into Python interpreter. Python
|
||||
# interpreter was found previously as required package, so
|
||||
# don't take care about this.
|
||||
execute_process(COMMAND "${Python3_EXECUTABLE}" "-c"
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
|
||||
"import matplotlib as m; print(m.__version__); print(m.__path__[0]);"
|
||||
RESULT_VARIABLE _MATPLOTLIB_SEARCH_SUCCESS
|
||||
OUTPUT_VARIABLE _MATPLOTLIB_VALUES
|
||||
|
||||
@@ -13,138 +13,159 @@
|
||||
# See also: http://git.salome-platform.org/gitweb/?p=NETGENPLUGIN_SRC.git;a=summary
|
||||
|
||||
|
||||
find_package(Netgen CONFIG QUIET)
|
||||
IF (Netgen_FOUND)
|
||||
set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIRS})
|
||||
set(NGLIB_LIBRARIES nglib)
|
||||
# for external smesh only the following two variables are needed:
|
||||
set(NETGEN_FOUND True)
|
||||
set(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS})
|
||||
ELSE ()
|
||||
find_package(Netgen CONFIG)
|
||||
if(Netgen_FOUND)
|
||||
set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIRS})
|
||||
set(NGLIB_LIBRARIES nglib)
|
||||
set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
# for external smesh only the following two variables are needed:
|
||||
set(NETGEN_FOUND True)
|
||||
set(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS})
|
||||
|
||||
IF (WIN32)
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR})
|
||||
SET(NETGEN_LIBS nglib mesh occ interface)
|
||||
SET(NGLIB_LIBRARIES "")
|
||||
FOREACH (it ${NETGEN_LIBS})
|
||||
FIND_LIBRARY(NGLIB ${it} PATHS ${NETGEN_LIBDIR})
|
||||
FIND_LIBRARY(NGLIBD ${it}d PATHS ${NETGEN_LIBDIR})
|
||||
IF (NGLIBD AND NGLIB)
|
||||
SET(NG_LIB optimized ${NGLIB}
|
||||
debug ${NGLIBD})
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NG_LIB})
|
||||
UNSET(NGLIB CACHE)
|
||||
UNSET(NGLIBD CACHE)
|
||||
ELSEIF (NGLIB)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB})
|
||||
UNSET(NGLIB CACHE)
|
||||
ENDIF ()
|
||||
ENDFOREACH ()
|
||||
else(Netgen_FOUND)
|
||||
|
||||
IF (NOT NETGENDATA)
|
||||
SET(NETGENDATA netgen)
|
||||
ENDIF (NOT NETGENDATA)
|
||||
|
||||
ELSEIF (DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
IF (NETGEN_ROOT)
|
||||
SET(NETGEN_INCLUDEDIR ${NETGEN_ROOT}/include)
|
||||
SET(NETGEN_LIBDIR ${NETGEN_ROOT}/lib)
|
||||
# allow to customize if NETGEN_ROOT is used
|
||||
IF (NOT NETGENDATA)
|
||||
SET(NETGENDATA ${NETGEN_ROOT}/libsrc)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
SET(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR} /usr/include /usr/include/netgen-mesher)
|
||||
FIND_LIBRARY(NGLIB_LIBNGLIB nglib PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB})
|
||||
FIND_LIBRARY(NGLIB_LIBMESH NAMES mesh ngmesh PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF (NGLIB_LIBMESH)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBMESH})
|
||||
ENDIF ()
|
||||
FIND_LIBRARY(NGLIB_LIBOCC NAMES occ ngocc PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF (NGLIB_LIBOCC)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBOCC})
|
||||
ENDIF ()
|
||||
FIND_LIBRARY(NGLIB_LIBINTERFACE NAMES interface nginterface PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF (NGLIB_LIBINTERFACE)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBINTERFACE})
|
||||
ENDIF ()
|
||||
IF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
# We haven't supported Netgen prior to 5.3.1 on MacOS, and the current
|
||||
# plan is for the next Netgen version to be 6.1 (currently unreleased).
|
||||
IF(DEFINED HOMEBREW_PREFIX)
|
||||
SET(NGLIB_PREFIX ${HOMEBREW_PREFIX})
|
||||
ELSE(DEFINED HOMEBREW_PREFIX)
|
||||
SET(NGLIB_PREFIX ${MACPORTS_PREFIX})
|
||||
ENDIF(DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
IF (NOT NETGENDATA)
|
||||
SET(NETGENDATA /usr/share/netgen/libsrc)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR nglib.h ${NGLIB_PREFIX}/include)
|
||||
|
||||
FIND_PATH(NETGEN_DIR_include NAMES mydefs.hpp NO_DEFAULT_PATH PATHS ${NGLIB_INCLUDE_DIR}/include ${NETGENDATA}/include ${NETGEN_INCLUDEDIR} ${NGLIB_INCLUDE_DIR})
|
||||
FIND_LIBRARY(NGLIB_LIBNGLIB nglib ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBMESH mesh ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBOCC occ ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBINTERFACE interface ${NGLIB_PREFIX}/lib)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB} ${NGLIB_LIBMESH}
|
||||
${NGLIB_LIBOCC} ${NGLIB_LIBINTERFACE})
|
||||
|
||||
IF (NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include)
|
||||
MESSAGE(STATUS "Cannot find NETGEN header files.")
|
||||
ELSEIF (NOT NETGEN_VERSION)
|
||||
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION REGEX "#define PACKAGE_VERSION.*")
|
||||
ENDIF ()
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA ${NGLIB_PREFIX}/include/netgen)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
IF (NOT NGLIB_LIBRARIES)
|
||||
MESSAGE(STATUS "Cannot find NETGEN library.")
|
||||
ENDIF ()
|
||||
ELSEIF(WIN32)
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR})
|
||||
SET(NETGEN_LIBS nglib mesh occ interface)
|
||||
SET(NGLIB_LIBRARIES "")
|
||||
FOREACH(it ${NETGEN_LIBS})
|
||||
FIND_LIBRARY(NGLIB ${it} PATHS ${NETGEN_LIBDIR})
|
||||
FIND_LIBRARY(NGLIBD ${it}d PATHS ${NETGEN_LIBDIR})
|
||||
IF(NGLIBD AND NGLIB)
|
||||
SET(NG_LIB optimized ${NGLIB}
|
||||
debug ${NGLIBD})
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NG_LIB})
|
||||
UNSET(NGLIB CACHE)
|
||||
UNSET(NGLIBD CACHE)
|
||||
ELSEIF(NGLIB)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB})
|
||||
UNSET(NGLIB CACHE)
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
IF (NGLIB_INCLUDE_DIR AND NGLIB_LIBRARIES)
|
||||
SET(Netgen_FOUND TRUE)
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_DIR_include} ${NGLIB_INCLUDE_DIR})
|
||||
LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS)
|
||||
ELSE ()
|
||||
SET(Netgen_FOUND FALSE)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA netgen)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
ELSE(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
IF(NETGEN_ROOT)
|
||||
SET(NETGEN_INCLUDEDIR ${NETGEN_ROOT}/include)
|
||||
SET(NETGEN_LIBDIR ${NETGEN_ROOT}/lib)
|
||||
# allow to customize if NETGEN_ROOT is used
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA ${NETGEN_ROOT}/libsrc)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR} /usr/include /usr/include/netgen-mesher)
|
||||
FIND_LIBRARY(NGLIB_LIBNGLIB nglib PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB})
|
||||
FIND_LIBRARY(NGLIB_LIBMESH NAMES mesh ngmesh PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBMESH)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBMESH})
|
||||
ENDIF()
|
||||
FIND_LIBRARY(NGLIB_LIBOCC NAMES occ ngocc PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBOCC)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBOCC})
|
||||
ENDIF()
|
||||
FIND_LIBRARY(NGLIB_LIBINTERFACE NAMES interface nginterface PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBINTERFACE)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBINTERFACE})
|
||||
ENDIF()
|
||||
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA /usr/share/netgen/libsrc)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
ENDIF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
FIND_PATH(NETGEN_DIR_include NAMES mydefs.hpp NO_DEFAULT_PATH PATHS ${NGLIB_INCLUDE_DIR}/include ${NETGENDATA}/include ${NETGEN_INCLUDEDIR} ${NGLIB_INCLUDE_DIR})
|
||||
|
||||
IF(NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include)
|
||||
MESSAGE(STATUS "Cannot find NETGEN header files.")
|
||||
ELSE()
|
||||
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION
|
||||
REGEX "#define PACKAGE_VERSION.*"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT NGLIB_LIBRARIES)
|
||||
MESSAGE(STATUS "Cannot find NETGEN library.")
|
||||
ENDIF()
|
||||
|
||||
IF(NGLIB_INCLUDE_DIR AND NGLIB_LIBRARIES)
|
||||
SET(Netgen_FOUND TRUE)
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_DIR_include} ${NGLIB_INCLUDE_DIR})
|
||||
LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS)
|
||||
ELSE()
|
||||
SET(Netgen_FOUND FALSE)
|
||||
ENDIF()
|
||||
endif(Netgen_FOUND)
|
||||
|
||||
# Package-provided cMake file is not enough
|
||||
IF (Netgen_FOUND)
|
||||
IF (NOT NETGEN_VERSION_MAJOR)
|
||||
IF (NETGEN_VERSION)
|
||||
string(REGEX MATCHALL "[0-9]+" NETGEN_VERSION_expr ${NETGEN_VERSION})
|
||||
list(LENGTH NETGEN_VERSION_expr NETGEN_VERSION_COUNT)
|
||||
list(GET NETGEN_VERSION_expr 0 NETGEN_VERSION_MAJOR)
|
||||
IF (NETGEN_VERSION_COUNT GREATER 1)
|
||||
list(GET NETGEN_VERSION_expr 1 NETGEN_VERSION_MINOR)
|
||||
ELSE ()
|
||||
set(NETGEN_VERSION_MINOR 0)
|
||||
ENDIF ()
|
||||
ELSE () # workaround for netgen 6.2 and newer. currently there is no easy way to detect the version
|
||||
# better use "find_package(netgen CONFIG REQUIRED)"
|
||||
set(NETGEN_VERSION_MAJOR 6)
|
||||
set(NETGEN_VERSION_MINOR 2)
|
||||
ENDIF ()
|
||||
set(NETGEN_VERSION_PATCH 0)
|
||||
ENDIF ()
|
||||
IF(Netgen_FOUND)
|
||||
IF(NETGEN_VERSION)
|
||||
string(REGEX MATCHALL "[0-9]+" NETGEN_VERSION_expr ${NETGEN_VERSION})
|
||||
list(LENGTH NETGEN_VERSION_expr NETGEN_VERSION_COUNT)
|
||||
list(GET NETGEN_VERSION_expr 0 NETGEN_VERSION_MAJOR)
|
||||
IF(NETGEN_VERSION_COUNT GREATER 1)
|
||||
list(GET NETGEN_VERSION_expr 1 NETGEN_VERSION_MINOR)
|
||||
ELSE()
|
||||
set(NETGEN_VERSION_MINOR 0)
|
||||
ENDIF()
|
||||
ELSE() # workaround for netgen 6.2 and newer. currently there is no easy way to detect the version
|
||||
# better use "find_package(netgen CONFIG REQUIRED)"
|
||||
set(NETGEN_VERSION_MAJOR 6)
|
||||
set(NETGEN_VERSION_MINOR 2)
|
||||
ENDIF()
|
||||
|
||||
MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8) + (${NETGEN_VERSION_PATCH})")
|
||||
MATH(EXPR NETGEN_VERSION_62 "(6 << 16) + (2 << 8)")
|
||||
MATH(EXPR NETGEN_VERSION_62_2004 "(6 << 16) + (2 << 8) + (2004)")
|
||||
IF (NOT NETGEN_VERSION_C LESS NETGEN_VERSION_62) # Version >= 6.2
|
||||
IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# Clang sometimes fails to include <cstdio>
|
||||
include(CMakePushCheckState)
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${NETGEN_CXX_FLAGS}")
|
||||
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY1)
|
||||
IF (NOT CSTDIO_INCLUDE_TRY1)
|
||||
# Ugly hack to make <stdio.h> building gets function
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -U__cplusplus -D__cplusplus=201103L")
|
||||
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY2)
|
||||
IF (NOT CSTDIO_INCLUDE_TRY2)
|
||||
message(FATAL_ERROR "Cannot #include <cstdio>.")
|
||||
ELSE ()
|
||||
set(NETGEN_CXX_FLAGS "${NETGEN_CXX_FLAGS} -U__cplusplus -D__cplusplus=201103L")
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
cmake_pop_check_state()
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
MESSAGE(STATUS "Found NETGEN version ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}, calculated: ${NETGEN_VERSION_C}")
|
||||
LIST(APPEND NETGEN_DEFINITIONS -DNETGEN_VERSION=${NETGEN_VERSION_C})
|
||||
ENDIF ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(NETGEN
|
||||
REQUIRED_VARS NGLIB_INCLUDE_DIR NGLIB_LIBRARIES NETGEN_INCLUDE_DIRS
|
||||
VERSION_VAR NETGEN_VERSION)
|
||||
MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8)")
|
||||
MATH(EXPR NETGEN_VERSION_62 "(6 << 16) + (2 << 8)")
|
||||
IF(NOT NETGEN_VERSION_C LESS NETGEN_VERSION_62) # Version >= 6.2
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# Clang sometimes fails to include <cstdio>
|
||||
include(CMakePushCheckState)
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${NETGEN_CXX_FLAGS}")
|
||||
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY1)
|
||||
IF(NOT CSTDIO_INCLUDE_TRY1)
|
||||
# Ugly hack to make <stdio.h> building gets function
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -U__cplusplus -D__cplusplus=201103L")
|
||||
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY2)
|
||||
IF(NOT CSTDIO_INCLUDE_TRY2)
|
||||
message(FATAL_ERROR "Cannot #include <cstdio>.")
|
||||
ELSE()
|
||||
set(NETGEN_CXX_FLAGS "${NETGEN_CXX_FLAGS} -U__cplusplus -D__cplusplus=201103L")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
cmake_pop_check_state()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
MESSAGE(STATUS "Found NETGEN version ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}, calculated: ${NETGEN_VERSION_C}")
|
||||
LIST(APPEND NETGEN_DEFINITIONS -DNETGEN_VERSION=${NETGEN_VERSION_C})
|
||||
ENDIF()
|
||||
|
||||