Skip to content

Commit

Permalink
Initial commit - base lib
Browse files Browse the repository at this point in the history
  • Loading branch information
1runeberg committed Jul 6, 2024
0 parents commit a70c4a6
Show file tree
Hide file tree
Showing 39 changed files with 6,522 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# xrlib code style

AlignAfterOpenBracket: AlwaysBreak
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AlwaysBreakBeforeMultilineStrings: 'false'
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: 'false'
BreakConstructorInitializers: BeforeComma
ColumnLimit: '250'
ExperimentalAutoDetectBinPacking: 'false'
IndentCaseLabels: 'true'
IndentPPDirectives: BeforeHash
IndentWidth: '4'
IndentWrappedFunctionNames: 'true'
NamespaceIndentation: All
PointerAlignment: Right
SpaceBeforeCpp11BracedList: 'true'
SpaceInEmptyParentheses: 'false'
SpacesInAngles: 'true'
SpacesInCStyleCastParentheses: 'false'
SpaceAfterCStyleCast: 'true'
SpacesInContainerLiterals: 'true'
SpacesInParentheses: 'true'
SpacesInSquareBrackets: 'true'
TabWidth: '4'
UseTab: Always
77 changes: 77 additions & 0 deletions .github/workflows/all_platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# xrlib
# Vulkan is installed on the runner prior to compilation

name: All platform CI builds [ Linux|Windows, Debug|Release, g++|clang++|cl ]

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Debug, Release]
cpp_compiler: [g++, clang++, cl]
include:
- os: windows-latest
cpp_compiler: cl
- os: ubuntu-latest
cpp_compiler: g++
- os: ubuntu-latest
cpp_compiler: clang++
exclude:
- os: windows-latest
cpp_compiler: g++
- os: windows-latest
cpp_compiler: clang++
- os: ubuntu-latest
cpp_compiler: cl

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1

- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true

- name: Configure CMake on Linux
if: runner.os == 'Linux'
run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-S ${{ github.workspace }}
- name: Configure CMake on Windows
if: runner.os == 'Windows'
run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} `
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} `
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}
75 changes: 75 additions & 0 deletions .github/workflows/no_xrvk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# xrlib
# Vulkan is installed on the runner prior to compilation

name: Exclude optional module [ xrvk - pbr renderer ]

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
cpp_compiler: [g++, cl]
include:
- os: windows-latest
cpp_compiler: cl
- os: ubuntu-latest
cpp_compiler: g++
exclude:
- os: windows-latest
cpp_compiler: g++
- os: ubuntu-latest
cpp_compiler: cl

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1

- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true

- name: Configure CMake on Linux
if: runner.os == 'Linux'
run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DENABLE_XRVK=OFF \
-S ${{ github.workspace }}
- name: Configure CMake on Windows
if: runner.os == 'Windows'
run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} `
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} `
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
-DENABLE_XRVK=OFF `
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}
Loading

0 comments on commit a70c4a6

Please sign in to comment.