Skip to content

Commit

Permalink
Build and test with the system MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
demianmnave committed Nov 19, 2024
1 parent 2bb6c08 commit b053d86
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 161 deletions.
282 changes: 141 additions & 141 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,142 +1,142 @@
---
Language: Cpp
AccessModifierOffset: 0
AlignAfterOpenBracket: DontAlign
AlignArrayOfStructures: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: None
AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: MultiLine
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterAttributes: Leave
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeConceptDeclarations: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: false
ColumnLimit: 80
CompactNamespaces: false
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DeriveLineEnding: false
DerivePointerAlignment: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: ['foreach', 'Q_FOREACH', 'BOOST_FOREACH']
IncludeBlocks: Preserve
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: NoIndent
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentRequires: true
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: true
IntegerLiteralSeparator:
Binary: 4
Decimal: 0
Hex: 2
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
NamespaceMacros: []
PPIndentWidth: -1
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 2
PenaltyBreakComment: 2
PenaltyBreakFirstLessLess: 10
PenaltyBreakOpenParenthesis: 100
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 2
PenaltyExcessCharacter: 100000
PenaltyIndentedWhitespace: 100
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Left
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
SeparateDefinitionBlocks: Always
ShortNamespaceLines: 1
SortIncludes: Never
SortUsingDeclarations: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Latest
StatementAttributeLikeMacros: []
StatementMacros: []
TypenameMacros: []
TabWidth: 4
UseCRLF: false
UseTab: Never
---
Language: Cpp
AccessModifierOffset: 0
AlignAfterOpenBracket: DontAlign
AlignArrayOfStructures: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: None
AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: MultiLine
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterAttributes: Leave
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeConceptDeclarations: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: false
ColumnLimit: 80
CompactNamespaces: false
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DeriveLineEnding: false
DerivePointerAlignment: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: []
IncludeBlocks: Preserve
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: NoIndent
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentRequires: true
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: true
IntegerLiteralSeparator:
Binary: 4
Decimal: 0
Hex: 2
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
NamespaceMacros: []
PPIndentWidth: -1
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 2
PenaltyBreakComment: 2
PenaltyBreakFirstLessLess: 10
PenaltyBreakOpenParenthesis: 100
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 2
PenaltyExcessCharacter: 100000
PenaltyIndentedWhitespace: 100
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Left
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
SeparateDefinitionBlocks: Always
ShortNamespaceLines: 1
SortIncludes: Never
SortUsingDeclarations: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Latest
StatementAttributeLikeMacros: []
StatementMacros: []
TypenameMacros: []
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros: []
58 changes: 38 additions & 20 deletions .github/workflows/msvc17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,52 @@ name: msvc17
on: push

jobs:
job:
name: MSVC 17.10
msvc-latest:
name: MSVC Latest
runs-on: windows-2022
steps:
- name: Install MSVC 17.10
shell: pwsh
run: |
$vspath = 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise'
Test-Path -Path $vspath | Should -Be $true
$vsinstaller = 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe'
Test-Path -Path $vsinstaller | Should -Be $true
Start-Process -NoNewWindow -Wait -FilePath $vsinstaller -ArgumentList `
'modify', '--installPath', "`"$vspath`"", '--quiet', '--norestart', '--nocache', '--noUpdateInstaller', `
'--add', 'Microsoft.VisualStudio.Component.VC.14.40.17.10.x86.x64'
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.27.0"
cmakeVersion: "~3.29.0"
useCloudCache: true

- uses: actions/checkout@v4

- name: CMake configure-build-test
uses: lukka/run-cmake@v10
with:
configurePreset: "cml-ci-msvc17-mt-s"
configurePresetAdditionalArgs: "['-T version=14.40']"
buildPreset: "cml-ci-msvc17-mt-s-release"
testPreset: "cml-ci-msvc17-mt-s-release-test"
configurePreset: "cml-ci-ninja-msvc-mt-s"
buildPreset: "cml-ci-ninja-msvc-mt-s-release"
testPreset: "cml-ci-ninja-msvc-mt-s-release-test"

# msvc-17-10:
# name: MSVC 17.10
# runs-on: windows-2022
# steps:
# - name: Install MSVC 17.10
# shell: pwsh
# run: |
# $vspath = 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise'
# Test-Path -Path $vspath | Should -Be $true
#
# $vsinstaller = 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe'
# Test-Path -Path $vsinstaller | Should -Be $true
#
# Start-Process -NoNewWindow -Wait -FilePath $vsinstaller -ArgumentList `
# 'modify', '--installPath', "`"$vspath`"", '--quiet', '--norestart', '--nocache', '--noUpdateInstaller', `
# '--add', 'Microsoft.VisualStudio.Component.VC.14.40.17.10.x86.x64'
#
# - uses: lukka/get-cmake@latest
# with:
# cmakeVersion: "~3.29.0"
# useCloudCache: true
#
# - uses: actions/checkout@v4
#
# - name: CMake configure-build-test
# uses: lukka/run-cmake@v10
# with:
# configurePreset: "cml-ci-msvc17-mt-s"
# configurePresetAdditionalArgs: "['-T version=14.40']"
# buildPreset: "cml-ci-msvc17-mt-s-release"
# testPreset: "cml-ci-msvc17-mt-s-release-test"
15 changes: 15 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@
}
},

{
// Static Ninja+MSVC release build:
"name": "cml-ci-ninja-msvc-mt-s-release",
"inherits": [ ".cml-windows-build-only" ],
"configurePreset": "cml-ci-ninja-msvc-mt-s",
"inheritConfigureEnvironment": true,
"configuration": "Release"
},
{
// Static Ninja+ClangCl release build:
"name": "cml-ci-ninja-msvc-clangcl-mt-s-release",
Expand Down Expand Up @@ -222,6 +230,13 @@
}
},

{
"name": "cml-ci-ninja-msvc-mt-s-release-test",
"inherits": [ ".cml-windows-test-only" ],
"configurePreset": "cml-ci-ninja-msvc-mt-s",
"inheritConfigureEnvironment": true,
"configuration": "Release"
},
{
"name": "cml-ci-ninja-msvc-clangcl-mt-s-release-test",
"inherits": [ ".cml-windows-test-only" ],
Expand Down

0 comments on commit b053d86

Please sign in to comment.