Skip to content

Commit

Permalink
Merge pull request #5670 from Web-eWorks/ci-fixes
Browse files Browse the repository at this point in the history
Improve CI Setup and Performance
  • Loading branch information
Webster Sheets authored Nov 22, 2023
2 parents bade25c + c410eb3 commit 0971009
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ env:
libassimp-dev
libsdl2-dev
libsdl2-image-dev
ninja-build
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -100,7 +101,7 @@ jobs:
- name: Setup CMake
run: |
cp scripts/CMakeBuildPresetsCI.json CMakeUserPresets.json
cmake --preset linux-x64-release
cmake -G Ninja --preset linux-x64-release
- name: Build GCC
run: cmake --build ./build --target all
Expand Down Expand Up @@ -134,7 +135,7 @@ jobs:
- name: Setup CMake
run: |
cp scripts/CMakeBuildPresetsCI.json CMakeUserPresets.json
cmake --preset linux-x64-release-avx
cmake -G Ninja --preset linux-x64-release-avx
- name: Build GCC
run: cmake --build ./build --target all
Expand Down Expand Up @@ -171,7 +172,7 @@ jobs:
run: |
cp scripts/CMakeBuildPresetsCI.json CMakeUserPresets.json
export CC=clang CXX=clang++
cmake --preset linux-x64-release
cmake -G Ninja --preset linux-x64-release
- name: Build Clang
run: cmake --build ./build --target all
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
clang-format-check:
timeout-minutes: 5

# Ubuntu 18.04 at the time of writing includes clang-format-9 as default
runs-on: [ubuntu-20.04]
runs-on: ubuntu-latest

# We want to check all changed files between the pull-request base and the head of the pull request
env:
Expand Down
8 changes: 1 addition & 7 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"configurePresets": [
{
"name": "x64-Debug",
Expand Down Expand Up @@ -73,7 +73,6 @@
"displayName": "Linux x64 Debug",
"description": "Use system compiler; Profiler=yes",
"binaryDir": "${sourceDir}/build/",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
Expand All @@ -93,7 +92,6 @@
"displayName": "Linux x64 Profiling",
"description": "Use system compiler; Profiler=yes",
"binaryDir": "${sourceDir}/build/",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
Expand All @@ -113,7 +111,6 @@
"displayName": "Linux x64 Release",
"description": "Use system compiler; Profiler=no",
"binaryDir": "${sourceDir}/build/",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
Expand All @@ -132,7 +129,6 @@
"displayName": "Linux x64 Debug (Clang)",
"description": "CC=clang CXX=clang++; Profiler=yes",
"binaryDir": "${sourceDir}/build/",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
Expand All @@ -154,7 +150,6 @@
"displayName": "Linux x64 Profiling (Clang)",
"description": "CC=clang CXX=clang++; Profiler=yes",
"binaryDir": "${sourceDir}/build/",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
Expand All @@ -176,7 +171,6 @@
"displayName": "Linux x64 Release (Clang)",
"description": "CC=clang CXX=clang++; Profiler=no",
"binaryDir": "${sourceDir}/build/",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
Expand Down
2 changes: 1 addition & 1 deletion src/editor/ModelViewerWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ void ModelViewerWidget::OnRender(Graphics::Renderer *r)
}

// Render any extra effects
PostRender();
m_extPostRender();

// helper rendering
if (m_options.showLandingPad) {
Expand Down
5 changes: 3 additions & 2 deletions src/editor/ModelViewerWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ namespace Editor

const matrix4x4f &GetModelViewMat() const { return m_modelViewMat; }

// Extend to render in-world using Graphics::Renderer
UIDelegate &GetUIExtPostRender() { return m_extPostRender; }
// Extend to render on top of the viewport surface using ImDrawList
UIDelegate &GetUIExtOverlay() { return m_extOverlay; }
// Extend to add additional viewport menu buttons
Expand All @@ -105,8 +107,7 @@ namespace Editor

bool OnCloseRequested() override { return true; };

virtual void PostRender() {};

UIDelegate m_extPostRender;
UIDelegate m_extOverlay;
UIDelegate m_extMenus;
UIDelegate m_extViewportControls;
Expand Down

0 comments on commit 0971009

Please sign in to comment.