Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update workflow #42

Merged
merged 47 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9d39a3a
update workflow
takev Sep 7, 2023
ab77178
again
takev Sep 7, 2023
04759a6
again
takev Sep 7, 2023
561767e
again
takev Sep 7, 2023
dd793b8
again
takev Sep 7, 2023
db26a53
again
takev Sep 7, 2023
2cab6a5
again
takev Sep 7, 2023
566920c
again
takev Sep 7, 2023
569938a
again
takev Sep 7, 2023
4a5b378
again
takev Sep 7, 2023
7f182c5
again
takev Sep 7, 2023
706c6a9
again
takev Sep 7, 2023
4ced6c4
again
takev Sep 9, 2023
4414b69
again
takev Sep 9, 2023
bc7e591
again
takev Sep 9, 2023
9bc7657
Update build scripts
takev Sep 19, 2023
6ea8a20
again
takev Sep 19, 2023
3189637
again
takev Sep 19, 2023
9de5949
again
takev Sep 19, 2023
8000ad5
again
takev Sep 19, 2023
017a948
again
takev Sep 19, 2023
221fa7f
again
takev Sep 19, 2023
b0d5caf
again
takev Sep 19, 2023
d410cfb
again
takev Sep 19, 2023
967b60d
again
takev Sep 19, 2023
0690622
again
takev Sep 19, 2023
0536b1b
again
takev Sep 19, 2023
97c9cec
again
takev Sep 19, 2023
7d453bf
again
takev Sep 19, 2023
52afbf3
again
takev Sep 19, 2023
07adc13
again
takev Sep 19, 2023
c085d23
again
takev Sep 19, 2023
0ad2515
again
takev Sep 19, 2023
6b4fd1d
again
takev Sep 19, 2023
ae38819
again
takev Sep 19, 2023
709e125
again
takev Sep 19, 2023
8a71dcf
again
takev Sep 19, 2023
462d559
again
takev Sep 19, 2023
fb8f968
again
takev Sep 19, 2023
9732da2
again
takev Sep 19, 2023
0e7d515
again
takev Sep 19, 2023
c8a1d8a
again
takev Sep 19, 2023
e26d48d
again
takev Sep 20, 2023
7fd9bd4
again
takev Sep 20, 2023
2ad36cc
again
takev Sep 20, 2023
7542d12
again
takev Sep 20, 2023
5041a92
again
takev Sep 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AccessModifierOffset: -4
AlignArrayOfStructures: None
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
Expand All @@ -10,7 +11,7 @@ AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
Expand All @@ -21,22 +22,22 @@ AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
Expand All @@ -51,8 +52,10 @@ ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
IncludeBlocks: Preserve
IndentCaseBlocks: true
IndentCaseLabels: false
IndentGotoLabels: false
IndentPPDirectives: None
Expand All @@ -66,7 +69,10 @@ ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PointerAlignment: Right
#QualifierOrder: constexpr inline static type const volatile restrict
ReferenceAlignment: Left
ReflowComments: true
#RequiresClausePosition: WithPreceding
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
Expand All @@ -81,7 +87,7 @@ SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments : 1
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
Expand Down
44 changes: 44 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This file configures editors using the EditorConfig scheme.
# https://editorconfig.org/

# Guideline support for "Visual Studio 2022" IDE using extension: "PaulHarrington.EditorGuidelinesPreview"
# https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelinesPreview

# Editorconfig support for "VSCode" using extension: "editorconfig.editorconfig"
# https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

root = true

# "visual studio" specific
vc_generate_documentation_comments = doxygen_slash_star

[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true

# "visual studio" specific
spelling_languages = en-us
guidelines = 80 dashed, 130

[CMakeLists.txt, *.{cmake}]
indent_size = 2

[*.cmake]
indent_size = 2

[*.{c,cc,cpp,h,hpp,hxx,inl}]
indent_size = 4
trim_trailing_whitespace = true

[*.{json,yaml,yml}]
indent_size = 2
insert_final_newline = false

[*.{md,markdown}]
indent_size = 4
trim_trailing_whitespace = false

[*.{clang-format}]
indent_size = 2
116 changes: 116 additions & 0 deletions .github/workflows/build-on-win64-vcpkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#
# .github/workflows/build-on-windows.yml
#
# Copyright 2021 Jens A. Koch.
# SPDX-License-Identifier: BSL-1.0
# This file is part of hikogui.
#

name: "Build on Windows (vcpkg)"
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
strategy:
fail-fast: false
matrix:
VCPKG_TARGET_TRIPLET: [x64-windows, x64-windows-static]
CMAKE_BUILD_TYPE: [Debug, Release]
VCPKG_TYPE: ["hikogui/vcpkg:head", hikogui/vcpkg, microsoft/vcpkg]

name: ${{matrix.VCPKG_TARGET_TRIPLET}} ${{matrix.CMAKE_BUILD_TYPE}} (${{matrix.VCPKG_TYPE}})

# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
runs-on: windows-2022

env:
BUILD_DIR: ${{github.workspace}}\build
INSTALL_DIR: ${{github.workspace}}\install
VCPKG_DIR: ${{github.workspace}}\external\vcpkg
PORT_FILE: ${{github.workspace}}\external\vcpkg\ports\hikogui\portfile.cmake


steps:
- name: 🔽 Checkout Code
uses: actions/checkout@v4 # https://github.com/actions/checkout

- name: 🔽 Checkout VCPKG Code (microsoft/vcpkg)
if: matrix.VCPKG_TYPE == 'microsoft/vcpkg'
uses: actions/checkout@v4 # https://github.com/actions/checkout
with:
repository: microsoft/vcpkg
path: ${{env.VCPKG_DIR}}

- name: 🔽 Checkout VCPKG Code (hikogui/vcpkg)
if: matrix.VCPKG_TYPE != 'microsoft/vcpkg'
uses: actions/checkout@v4 # https://github.com/actions/checkout
with:
repository: hikogui/vcpkg
ref: hikogui
path: ${{env.VCPKG_DIR}}

- name: 📝 Patch HikoGUI port file to use the main branch.
if: matrix.VCPKG_TYPE == 'hikogui/vcpkg:head'
shell: cmd
run: |
copy "${{env.PORT_FILE}}" "${{env.PORT_FILE}}.bak"
echo set(VCPKG_USE_HEAD_VERSION ON) >"${{env.PORT_FILE}}"
type "${{env.PORT_FILE}}.bak" >>"${{env.PORT_FILE}}"

- name: 📝 Get Vulkan SDK version number
id: vulkan-version
uses: hikogui/install-vulkan-sdk-action/sdk-version@v4

- name: 🎯 Cache VULKAN SDK & Runtime
id: cache-vulkan
uses: actions/cache@v3
with:
path: ${{steps.vulkan-version.outputs.VULKAN_SDK}}
key: cache-windows-vulkan-${{steps.vulkan-version.outputs.VULKAN_VERSION}}-2

- name: 🔽 Install Vulkan SDK
if: steps.cache-vulkan.outputs.cache-hit != 'true'
uses: hikogui/install-vulkan-sdk-action/install-sdk@v4
with:
VULKAN_VERSION: ${{steps.vulkan-version.outputs.VULKAN_VERSION}}
VULKAN_SDK: ${{steps.vulkan-version.outputs.VULKAN_SDK}}

- name: 🛠️ Setup Visual Studio Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1

- name: 🛠️ Setup VCPKG
working-directory: ${{env.VCPKG_DIR}}
shell: cmd
run: .\bootstrap-vcpkg.bat

- name: ✏ CMake ➔ Make Build Directory (Hello World)
shell: pwsh
run: mkdir "${{env.BUILD_DIR}}"

- name: ✏ CMake ➔ Configure (Hello World)
working-directory: ${{env.BUILD_DIR}}
env:
VULKAN_SDK: ${{steps.vulkan-version.outputs.VULKAN_SDK}}
shell: pwsh
run: >
cmake
-G Ninja
"-DCMAKE_BUILD_TYPE=${{matrix.CMAKE_BUILD_TYPE}}"
"-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}}"
"-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_DIR}}\scripts\buildsystems\vcpkg.cmake"
"-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}}"
..

- name: 🙏 CMake ➔ Build (Hello World)
working-directory: ${{env.BUILD_DIR}}
run: cmake --build . --parallel 1

- name: 📦 CMake ➔ Install (Hello World)
working-directory: ${{env.BUILD_DIR}}
run: cmake --install .
Loading
Loading