Skip to content

Commit

Permalink
Reorganize repo for better DX and linux builds (#28)
Browse files Browse the repository at this point in the history
Working on both MSVC under Windows, and Clang under Linux.
DX12 and DirectXMath are included by default.
Moved spdlog and imgui to submodules
Unified the inc directoriy layouts
Added submodules for deps
Linux builds and library management

Co-authored-by: Curle <[email protected]>
  • Loading branch information
dpeter99 and TheCurle authored Apr 5, 2024
1 parent c2ddeb4 commit 05efdf3
Show file tree
Hide file tree
Showing 281 changed files with 76,805 additions and 71,582 deletions.
138 changes: 69 additions & 69 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
name: Build and Test

on:
push:
branches: [ main, bazel-setup ]
paths-ignore:
- 'projs/docs/**'
- 'specs/**'

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive


- name: Install bazelisk
run: |
choco install bazelisk
- name: Add msbuild to PATH
uses: microsoft/[email protected]

- name: Build
run: |
bazel build //...
- name: use cache
uses: actions/cache@v2
with:
path: "./bazel-bin/projs"
key: ${{ runner.os }}-${{ github.run_id }}

- name: Upload shadow-engine artifact
uses: actions/upload-artifact@v3
with:
name: ${{ needs.update.outputs.old_version_name }}-${{ needs.update.outputs.new_version_name }}-patch
path: './bazel-bin/projs/shadow-engine/**/*'

test-sff:
runs-on: windows-latest
needs: build
permissions:
contents: read
issues: read
checks: write
pull-requests: write
steps:
- name: use cache
uses: actions/cache@v2
with:
path: "./bazel-bin/projs"
key: ${{ runner.os }}-${{ github.run_id }}

- name: Make output folder
run: mkdir ./test-results

- name: Test shadow-file-format
run: ./bazel-bin/projs/shadow-file-format/test.exe -r junit -o ./test-results/shadow-file-format-test.xml

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always()
with:
files: "test-results/**/*.xml"

name: Build and Test

on:
push:
branches: [ main, bazel-setup ]
paths-ignore:
- 'projs/docs/**'
- 'specs/**'

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive


- name: Install bazelisk
run: |
choco install bazelisk
- name: Add msbuild to PATH
uses: microsoft/[email protected]

- name: Build
run: |
bazel build //...
- name: use cache
uses: actions/cache@v2
with:
path: "./bazel-bin/projs"
key: ${{ runner.os }}-${{ github.run_id }}

- name: Upload shadow-engine artifact
uses: actions/upload-artifact@v3
with:
name: ${{ needs.update.outputs.old_version_name }}-${{ needs.update.outputs.new_version_name }}-patch
path: './bazel-bin/projs/shadow-engine/**/*'

test-sff:
runs-on: windows-latest
needs: build
permissions:
contents: read
issues: read
checks: write
pull-requests: write
steps:
- name: use cache
uses: actions/cache@v2
with:
path: "./bazel-bin/projs"
key: ${{ runner.os }}-${{ github.run_id }}

- name: Make output folder
run: mkdir ./test-results

- name: Test shadow-file-format
run: ./bazel-bin/projs/shadow-file-format/test.exe -r junit -o ./test-results/shadow-file-format-test.xml

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always()
with:
files: "test-results/**/*.xml"

30 changes: 14 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
bin/
obj/
/packages/
riderModule.iml
/_ReSharper.Caches/


test-results
cmake-build-vs-debug/
cmake-build-debug/
cmake-build-debug-msvc/
cmake-build-debug-msvc-vs/
out/
.vs/
/.idea/
/cmake-build-debug-mingw/
bin/
obj/
/packages/
riderModule.iml
/_ReSharper.Caches/


test-results
cmake-build-vs-debug/
cmake-build-debug/
cmake-build-debug-msvc/
cmake-build-debug-msvc-vs/
out/
.vs/
21 changes: 21 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[submodule "projs/shadow/extern/spdlog"]
path = projs/shadow/extern/spdlog
url = https://github.com/gabime/spdlog.git
[submodule "projs/shadow/extern/imgui"]
path = projs/shadow/extern/imgui
url = https://github.com/ocornut/imgui
[submodule "projs/shadow/extern/dxmath"]
path = projs/shadow/extern/dxmath
url = https://github.com/microsoft/DirectXMath.git
[submodule "projs/shadow/extern/catch2"]
path = projs/shadow/extern/catch2
url = https://github.com/catchorg/Catch2.git
[submodule "projs/shadow/extern/glm"]
path = projs/shadow/extern/glm
url = https://github.com/g-truc/glm.git
[submodule "projs/shadow/extern/dylib"]
path = projs/shadow/extern/dylib
url = https://github.com/martin-olivier/dylib
[submodule "projs/shadow/extern/vulkan_memory_allocator"]
path = projs/shadow/extern/vulkan_memory_allocator
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/cmake.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/customTargets.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/fileTemplates/Shadow Entitiy Header.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/fileTemplates/Shadow Entitiy.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/fileTemplates/internal/C++ Class Header.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/fileTemplates/internal/C++ Class.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/runConfigurations/test_game.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/test_game_EDITOR.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 05efdf3

Please sign in to comment.