Skip to content

Commit

Permalink
✨ Added option to blend using Mixbox
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Oct 13, 2023
1 parent abe9d45 commit 21e8255
Show file tree
Hide file tree
Showing 12 changed files with 1,759 additions and 158 deletions.
272 changes: 135 additions & 137 deletions .github/workflows/build_and_run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,216 +1,214 @@
name: Build and run tests

on:
on:
push:
branches: [ main ]
branches: [main, mixbox]

pull_request:
branches: [ main ]

branches: [main, mixbox]

env:
TARGET: imgui_gradient-tests # Should be the name of the target you created in your CMakeLists.txt and want to build and run


jobs:
#-----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
Windows_MSVC_Debug:
name: Windows MSVC Debug
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake .\tests -B ${{github.workspace}}\build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_C_COMPILER=cl -D CMAKE_CXX_COMPILER=cl
- name: Configure CMake
run: cmake .\tests -B ${{github.workspace}}\build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_C_COMPILER=cl -D CMAKE_CXX_COMPILER=cl

- name: Build
run: cmake --build ${{github.workspace}}\build --config Debug --target ${{env.TARGET}}
- name: Build
run: cmake --build ${{github.workspace}}\build --config Debug --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}\build\Debug\${{env.TARGET}} -nogpu
- name: Run
run: ${{github.workspace}}\build\Debug\${{env.TARGET}} -nogpu

#-----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
Windows_MSVC_Release:
name: Windows MSVC Release
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake .\tests -B ${{github.workspace}}\build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_C_COMPILER=cl -D CMAKE_CXX_COMPILER=cl
- name: Configure CMake
run: cmake .\tests -B ${{github.workspace}}\build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_C_COMPILER=cl -D CMAKE_CXX_COMPILER=cl

- name: Build
run: cmake --build ${{github.workspace}}\build --config Release --target ${{env.TARGET}}
- name: Build
run: cmake --build ${{github.workspace}}\build --config Release --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}\build\Release\${{env.TARGET}} -nogpu
#-----------------------------------------------------------------------------------------------
- name: Run
run: ${{github.workspace}}\build\Release\${{env.TARGET}} -nogpu
#-----------------------------------------------------------------------------------------------
Windows_Clang_Debug:
name: Windows Clang Debug
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake .\tests -B ${{github.workspace}}\build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -T ClangCL
- name: Configure CMake
run: cmake .\tests -B ${{github.workspace}}\build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -T ClangCL

- name: Build
run: cmake --build ${{github.workspace}}\build --config Debug --target ${{env.TARGET}}
- name: Build
run: cmake --build ${{github.workspace}}\build --config Debug --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}\build\Debug\${{env.TARGET}} -nogpu
- name: Run
run: ${{github.workspace}}\build\Debug\${{env.TARGET}} -nogpu

#-----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
Windows_Clang_Release:
name: Windows Clang Release
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake .\tests -B ${{github.workspace}}\build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -T ClangCL
- name: Configure CMake
run: cmake .\tests -B ${{github.workspace}}\build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -T ClangCL

- name: Build
run: cmake --build ${{github.workspace}}\build --config Release --target ${{env.TARGET}}
- name: Build
run: cmake --build ${{github.workspace}}\build --config Release --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}\build\Release\${{env.TARGET}} -nogpu
#-----------------------------------------------------------------------------------------------
Linux_GCC_Debug:
- name: Run
run: ${{github.workspace}}\build\Release\${{env.TARGET}} -nogpu
#-----------------------------------------------------------------------------------------------
Linux_GCC_Debug:
name: Linux GCC Debug
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Update package
run: sudo apt-get update -y

- name: Install glfw dependencies
run: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev

- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11

- name: Build
run: cmake --build ${{github.workspace}}/build --config Debug --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu
#-----------------------------------------------------------------------------------------------
Linux_GCC_Release:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Update package
run: sudo apt-get update -y

- name: Install glfw dependencies
run: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev

- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11

- name: Build
run: cmake --build ${{github.workspace}}/build --config Debug --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu

#-----------------------------------------------------------------------------------------------
Linux_GCC_Release:
name: Linux GCC Release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Update package
run: sudo apt-get update -y

- name: Update package
run: sudo apt-get update -y

- name: Install glfw dependencies
run: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev
- name: Install glfw dependencies
run: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev

- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11
- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release --target ${{env.TARGET}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config Release --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu
- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu

#-----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
Linux_Clang_Debug:
name: Linux Clang Debug
name: Linux Clang Debug
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Update package
run: sudo apt-get update -y

- name: Update package
run: sudo apt-get update -y

- name: Install glfw dependencies
run: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev
- name: Install glfw dependencies
run: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev

- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++
- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++

- name: Build
run: cmake --build ${{github.workspace}}/build --config Debug --target ${{env.TARGET}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config Debug --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu
- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu

#-----------------------------------------------------------------------------------------------
Linux_Clang_Release:
#-----------------------------------------------------------------------------------------------
Linux_Clang_Release:
name: Linux Clang Release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Update package
run: sudo apt-get update -y
- name: Install glfw dependencies
run: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev

- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu
#-----------------------------------------------------------------------------------------------
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Update package
run: sudo apt-get update -y

- name: Install glfw dependencies
run: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev

- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu

#-----------------------------------------------------------------------------------------------
MacOS_Clang_Debug:
name: MacOS Clang Debug
name: MacOS Clang Debug
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -D CMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++
- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -D CMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++

- name: Build
run: cmake --build ${{github.workspace}}/build --config Debug --target ${{env.TARGET}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config Debug --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu
- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu

#-----------------------------------------------------------------------------------------------
MacOS_Clang_Release:
#-----------------------------------------------------------------------------------------------
MacOS_Clang_Release:
name: MacOS Clang Release
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -D CMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++
- name: Configure CMake
run: cmake ./tests -B ${{github.workspace}}/build -DWARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -D CMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release --target ${{env.TARGET}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config Release --target ${{env.TARGET}}

- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu
- name: Run
run: ${{github.workspace}}/build/${{env.TARGET}} -nogpu
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ if(WARNINGS_AS_ERRORS_FOR_IMGUI_GRADIENT)
else()
target_compile_options(imgui_gradient PRIVATE -Werror)
endif()
endif()
endif()

# Mixbox
target_sources(imgui_gradient PRIVATE lib/mixbox/mixbox.cpp)
target_include_directories(imgui_gradient PRIVATE lib)
install(FILES "lib/mixbox/LICENSE" DESTINATION "license/mixbox")
Loading

0 comments on commit 21e8255

Please sign in to comment.