Skip to content

Commit

Permalink
move to woodpecker ci (#11)
Browse files Browse the repository at this point in the history
- update makefile
- automatically build and deploy manual
- update docs

Reviewed-on: https://codeberg.org/meisam/slabcc/pulls/11
  • Loading branch information
meisam committed Jan 22, 2023
1 parent 43f2ec0 commit b9f95ca
Show file tree
Hide file tree
Showing 32 changed files with 647 additions and 2,473 deletions.
89 changes: 77 additions & 12 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
---
Language: Cpp
# BasedOnStyle: LLVM
# BasedOnStyle: LLVM (Ubuntu clang-format version 14.0.0-1ubuntu1)
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: true
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
Expand All @@ -22,12 +24,14 @@ AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
Expand All @@ -37,11 +41,14 @@ BraceWrapping:
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
Expand All @@ -52,76 +59,134 @@ BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: BinPack
BasedOnStyle: ''
ConstructorInitializerAllOnOneLineOrOnePerLine: false
AllowAllConstructorInitializersOnNextLine: true
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Right
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: true
SortIncludes: true
RemoveBracesLLVM: false
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...

14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# build artifacts
bin/slabcc
bin/slabcc_obj
bin/nlopt

# ci artifacts
utils/.env

# slabcc output
slabcc.log
slabcc.out

# dev tools
.vscode
118 changes: 0 additions & 118 deletions .travis.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .woodpecker/.build_slabcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
matrix:
TOOLCHAIN:
- ubuntu:16.04 gcc-5 g++-5 libopenblas-dev fftw3-dev
- ubuntu:18.04 gcc-8 g++-8 libopenblas-dev fftw3-dev
- ubuntu:22.04 gcc-9 g++-9 libopenblas-dev fftw3-dev
- ubuntu:22.04 gcc-11 g++-11 libopenblas-dev fftw3-dev
- almalinux:8.7 gcc gcc-c++:g++ gcc-gfortran blas-devel lapack-devel fftw-devel
- opensuse/leap:15.4 gcc10:gcc-10 gcc10-c++:g++-10 blas-devel lapack-devel fftw3-devel

pipeline:
build_minimal:
image: ${TOOLCHAIN%% *}
environment:
- VERBOSE=1
commands:
- ./utils/install_pkgs.sh && . ./.env
- cd ./bin/ && make --trace
- ldd ./slabcc
- ./slabcc -v

when:
path:
include: [ 'bin/*', 'src/**', '.woodpecker/.build_slabcc.yml', 'utils/install_pkgs.sh' ]

depends_on:
- validate
22 changes: 22 additions & 0 deletions .woodpecker/.update_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pipeline:

build:
image: python:3
environment:
- STAGE_PATH=docs/deploy
commands:
- pip3 install --no-cache-dir --requirement=docs/requirements.txt
- ./utils/build_pages.sh

deploy:
image: quay.io/meisam/charliecloud:latest ## todo: replace with ci tools container
environment:
- STAGE_PATH=docs/deploy
commands:
- ./utils/deploy_pages.sh #--verbose
secrets: [ pages_pass ]

when:
path:
include: [ 'docs/*', 'utils/deploy_pages.sh', '.woodpecker/.update_docs.yml' ]
branch: master
Loading

0 comments on commit b9f95ca

Please sign in to comment.