diff --git a/.github/actions/install_sfml/action.yml b/.github/actions/install_sfml/action.yml deleted file mode 100644 index 5a9f90d..0000000 --- a/.github/actions/install_sfml/action.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: "Setup SFML" -description: "Setup SFML" -inputs: - sfml_version: - description: "SFML version" - required: true - used_env: - description: "Environment used with runs-on" - required: true -outputs: - sfml_install_dir: - description: "SFML install path" - value: ${{steps.configure.outputs.sfml_install_dir}} -runs: - using: "composite" - steps: - - name: Install SFML dependencies - shell: cmake -P {0} - run: | - if ("${{ runner.os }}" STREQUAL "Linux") - execute_process(COMMAND sudo apt-get update) - execute_process( - COMMAND sudo apt-get -y install mesa-common-dev libx11-dev libxcursor-dev libsfml-dev libudev-dev libopenal-dev libvorbis-dev libflac-dev libxrandr-dev freeglut3-dev libjpeg-dev libfreetype6-dev libxrandr-dev libglew-dev libsndfile1-dev libopenal-dev libfreetype6-dev - ) - endif() - - - name: Cache SFML install - id: cache - uses: actions/cache@v2 - with: - path: ${{github.workspace}}/SFML - key: SFML-${{inputs.sfml_version}}-${{inputs.used_env}} - - - name: Checkout SFML - if: ${{steps.cache.outputs.cache-hit != 'true'}} - uses: actions/checkout@v2 - with: - repository: SFML/SFML - submodules: recursive - path: SFML_repo - ref: ${{inputs.sfml_version}} - - - name: Install SFML - id: install - if: ${{steps.cache.outputs.cache-hit != 'true'}} - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - message(STATUS "Using host CMake version: ${CMAKE_VERSION}") - message(STATUS "Build SFML") - execute_process( - COMMAND ${CMAKE_COMMAND} - -S "${workspace}/SFML_repo" - -B "${workspace}/SFML_repo/build" - -D CMAKE_CONFIGURATION_TYPES=Release - -D CMAKE_BUILD_TYPE=Release - -D ENABLE_TESTING=OFF - -D SFML_BUILD_EXAMPLES=OFF - -D SFML_BUILD_DOC=OFF - -D SFML_BUILD_FRAMEWORKS=OFF - -D SFML_INSTALL_XCODE_TEMPLATES=OFF - -D SFML_DEPENDENCIES_INSTALL_PREFIX=${workspace}/SFML - -D CMAKE_INSTALL_PREFIX=${workspace}/SFML - -D CMAKE_INSTALL_FRAMEWORK_PREFIX=${workspace}/SFML - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "project configuration failed") - endif() - include(ProcessorCount) - ProcessorCount(N) - execute_process( - COMMAND ${CMAKE_COMMAND} - --build "${workspace}/SFML_repo/build" - --config Release - --parallel ${N} - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "project build failed") - endif() - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${workspace}/SFML") - execute_process( - COMMAND ${CMAKE_COMMAND} - --install "${workspace}/SFML_repo/build" - --prefix "${workspace}/SFML" - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "project installation failed") - endif() - - - name: Configure SFML - id: configure - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - message("::set-output name=sfml_install_dir::${workspace}/SFML") diff --git a/.github/actions/setup_ccache/action.yml b/.github/actions/setup_ccache/action.yml deleted file mode 100644 index 10e9f67..0000000 --- a/.github/actions/setup_ccache/action.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: "Setup ccache" -description: "Setup ccache" -inputs: - ccache_version: - description: "ccache version" - required: true - used_env: - description: "Environment used with runs-on" - required: true - cache_id: - description: "Cache id unique to the current config" - required: true -outputs: - ccache_binary: - description: "ccache binary path" - value: ${{steps.configure.outputs.ccache_binary}} -runs: - using: "composite" - steps: - - name: Cache ccache - id: cache - uses: actions/cache@v2 - with: - path: ${{github.workspace}}/ccache - key: ccache-${{inputs.ccache_version}}-${{inputs.used_env}} - - - name: Download and install ccache - id: download - if: ${{steps.cache.outputs.cache-hit != 'true'}} - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - message(STATUS "Using host CMake version: ${CMAKE_VERSION}") - set(ccache_url "https://github.com/ccache/ccache/releases/download/v${{inputs.ccache_version}}/ccache-${{inputs.ccache_version}}.tar.gz") - message(STATUS "Download from: ${ccache_url}") - file(DOWNLOAD "${ccache_url}" "${workspace}/ccache.tar.gz" SHOW_PROGRESS) - message(STATUS "Extract") - execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf "${workspace}/ccache.tar.gz") - message(STATUS "Build ccache") - execute_process( - COMMAND ${CMAKE_COMMAND} - -S "${workspace}/ccache-${{inputs.ccache_version}}" - -B "${workspace}/ccache-${{inputs.ccache_version}}/build" - -D CMAKE_CONFIGURATION_TYPES=Release - -D CMAKE_BUILD_TYPE=Release - -D ZSTD_FROM_INTERNET=ON - -D REDIS_STORAGE_BACKEND=OFF - -D ENABLE_TESTING=OFF - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "project configuration failed") - endif() - include(ProcessorCount) - ProcessorCount(N) - execute_process( - COMMAND ${CMAKE_COMMAND} - --build "${workspace}/ccache-${{inputs.ccache_version}}/build" - --target ccache - --config Release - --parallel ${N} - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "project build failed") - endif() - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${workspace}/ccache") - execute_process( - COMMAND ${CMAKE_COMMAND} - --install "${workspace}/ccache-${{inputs.ccache_version}}/build" - --prefix "${workspace}/ccache" - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "project installation failed") - endif() - if(NOT "${{runner.os}}" STREQUAL "Windows") - execute_process(COMMAND chmod +x "${workspace}/ccache/bin/ccache") - endif() - - - name: Configure ccache - id: configure - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - file(APPEND "$ENV{GITHUB_ENV}" "CCACHE_BASEDIR=${workspace}\n") - file(APPEND "$ENV{GITHUB_ENV}" "CCACHE_DIR=${workspace}/.ccache\n") - file(APPEND "$ENV{GITHUB_ENV}" "CCACHE_COMPRESS=true\n") - file(APPEND "$ENV{GITHUB_ENV}" "CCACHE_COMPRESSLEVEL=6\n") - file(APPEND "$ENV{GITHUB_ENV}" "CCACHE_MAXSIZE=400M\n") - set(ccache_binary "${workspace}/ccache/bin/ccache") - message(STATUS "ccache binary: ${ccache_binary}") - message("::set-output name=ccache_binary::${ccache_binary}") - execute_process(COMMAND ${ccache_binary} --zero-stats) - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - - name: Print ccache config - id: print - shell: cmake -P {0} - run: | - execute_process(COMMAND ${{steps.configure.outputs.ccache_binary}} --version) - execute_process(COMMAND ${{steps.configure.outputs.ccache_binary}} --show-config) - - - name: Cache ccache files - uses: actions/cache@v2 - with: - path: ${{env.CCACHE_DIR}} - key: ccache-cache-${{inputs.cache_id}}-${{steps.configure.outputs.timestamp}} - restore-keys: | - ccache-cache-${{inputs.cache_id}}- diff --git a/.github/actions/setup_cmake/action.yml b/.github/actions/setup_cmake/action.yml deleted file mode 100644 index 3013573..0000000 --- a/.github/actions/setup_cmake/action.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: "Setup CMake" -description: "Setup CMake" -inputs: - cmake_version: - description: "CMake version" - required: true - used_env: - description: "Environment used with runs-on" - required: true -outputs: - cmake_binary: - description: "CMake binary path" - value: ${{steps.configure.outputs.cmake_binary}} - ctest_binary: - description: "CTest binary path" - value: ${{steps.configure.outputs.ctest_binary}} -runs: - using: "composite" - steps: - - name: Cache CMake - id: cache - uses: actions/cache@v2 - with: - path: ${{github.workspace}}/cmake - key: cmake-${{inputs.cmake_version}}-${{inputs.used_env}} - - - name: Download CMake - id: download - if: ${{steps.cache.outputs.cache-hit != 'true'}} - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - message(STATUS "Using host CMake version: ${CMAKE_VERSION}") - if("${{runner.os}}" STREQUAL "Windows") - set(cmake_suffix "windows-x86_64.zip") - set(cmake_dir "cmake-${{inputs.cmake_version}}-windows-x86_64") - set(cmake_bin_dir "cmake-${{inputs.cmake_version}}-windows-x86_64/bin") - elseif("${{runner.os}}" STREQUAL "Linux") - set(cmake_suffix "linux-x86_64.tar.gz") - set(cmake_dir "cmake-${{inputs.cmake_version}}-linux-x86_64") - set(cmake_bin_dir "cmake-${{inputs.cmake_version}}-linux-x86_64/bin") - elseif("${{runner.os}}" STREQUAL "macOS") - set(cmake_suffix "macos-universal.tar.gz") - set(cmake_dir "cmake-${{inputs.cmake_version}}-macos-universal") - set(cmake_bin_dir "cmake-${{inputs.cmake_version}}-macos-universal/CMake.app/Contents/bin") - endif() - set(cmake_url "https://github.com/Kitware/CMake/releases/download/v${{inputs.cmake_version}}/cmake-${{inputs.cmake_version}}-${cmake_suffix}") - message(STATUS "Download from: ${cmake_url}") - file(DOWNLOAD "${cmake_url}" "${workspace}/cmake.zip" SHOW_PROGRESS) - message(STATUS "Extract") - execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf "${workspace}/cmake.zip") - file(COPY "${workspace}/${cmake_dir}" DESTINATION "${workspace}/cmake") - if(NOT "${{runner.os}}" STREQUAL "Windows") - execute_process(COMMAND chmod +x "${workspace}/cmake/${cmake_bin_dir}/cmake") - execute_process(COMMAND chmod +x "${workspace}/cmake/${cmake_bin_dir}/ctest") - endif() - - - name: Configure CMake - id: configure - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - if("${{runner.os}}" STREQUAL "Windows") - set(cmake_bin_dir "cmake-${{inputs.cmake_version}}-windows-x86_64/bin") - elseif("${{runner.os}}" STREQUAL "Linux") - set(cmake_bin_dir "cmake-${{inputs.cmake_version}}-linux-x86_64/bin") - elseif("${{runner.os}}" STREQUAL "macOS") - set(cmake_bin_dir "cmake-${{inputs.cmake_version}}-macos-universal/CMake.app/Contents/bin") - endif() - set(cmake_binary "${workspace}/cmake/${cmake_bin_dir}/cmake") - set(ctest_binary "${workspace}/cmake/${cmake_bin_dir}/ctest") - message(STATUS "CMake binary: ${cmake_binary}") - message("::set-output name=cmake_binary::${cmake_binary}") - message(STATUS "CTest binary: ${ctest_binary}") - message("::set-output name=ctest_binary::${ctest_binary}") - - - name: Print version - id: print - shell: cmake -P {0} - run: | - execute_process(COMMAND ${{steps.configure.outputs.cmake_binary}} --version RESULT_VARIABLE result) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - execute_process(COMMAND ${{steps.configure.outputs.ctest_binary}} --version RESULT_VARIABLE result) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6deaa6f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,101 @@ +name: CI + +on: [push, pull_request, workflow_dispatch] + +concurrency: + group: environment-${{github.ref}} + cancel-in-progress: true + +jobs: + build: + name: ${{matrix.platform.name}} ${{matrix.config.name}} ${{matrix.type.name}} + runs-on: ${{matrix.platform.os}} + defaults: + run: + shell: bash + + strategy: + fail-fast: false + matrix: + platform: + - { name: Windows MSVC, os: windows-2022 } + - { name: Windows ClangCL, os: windows-2022, flags: -T ClangCL } + - { name: Windows Clang, os: windows-2022, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } + - { name: Windows MinGW, os: windows-2022, flags: -GNinja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ } + - { name: Linux GCC, os: ubuntu-22.04, flags: -GNinja } + - { name: Linux Clang, os: ubuntu-22.04, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } + - { name: macOS Xcode, os: macos-12, flags: -GXcode } + config: + - { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE } + - { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE } + type: + - { name: Release } + - { name: Debug } + + steps: + - name: Install Linux Dependencies + if: runner.os == 'Linux' + run: | + sudo apt update + sudo apt install ninja-build llvm xorg-dev libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev + + - name: Install macOS Tools + if: runner.os == 'macOS' + run: brew install ninja + + - name: Checkout ImGui + uses: actions/checkout@v3 + with: + repository: ocornut/imgui + path: imgui + ref: v1.89.8 + + - name: Checkout SFML + uses: actions/checkout@v3 + with: + repository: SFML/SFML + path: sfml + ref: 2.6.0 + + - name: Configure SFML + run: | + ls -lh + cmake -S sfml -B sfml/build \ + -DCMAKE_INSTALL_PREFIX=sfml/install \ + -DCMAKE_BUILD_TYPE=${{matrix.type.name}} \ + ${{matrix.platform.flags}} \ + ${{matrix.config.flags}} + + - name: Build SFML + run: cmake --build sfml/build --config ${{matrix.type.name}} --target install + + - name: Checkout ImGui-SFML + uses: actions/checkout@v3 + with: + path: imgui-sfml + + - name: Configure ImGui-SFML + run: | + cmake -S imgui-sfml -B imgui-sfml/build \ + -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE=${{matrix.type.name}} \ + -DIMGUI_DIR=$GITHUB_WORKSPACE/imgui \ + -DSFML_ROOT=$GITHUB_WORKSPACE/sfml/install \ + ${{matrix.platform.flags}} \ + ${{matrix.config.flags}} + + - name: Build ImGui-SFML + run: cmake --build imgui-sfml/build --config ${{matrix.type.name}} --target install + + clang-format: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + - uses: DoozyX/clang-format-lint-action@v0.13 + with: + source: '.' + extensions: 'h,cpp' + clangFormatVersion: 13 + style: file diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml deleted file mode 100644 index 9d18fda..0000000 --- a/.github/workflows/clang-format.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: clang-format - -on: - - push - - pull_request - -jobs: - format-check: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: DoozyX/clang-format-lint-action@v0.13 - with: - source: '.' - extensions: 'h,cpp' - clangFormatVersion: 13 - style: file diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index f4ee567..0000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: macOS - -on: - - push - - pull_request - -env: - CMAKE_VERSION: 3.22.2 - SFML_VERSION: 2.5.1 - IMGUI_VERSION: 1.87 - -jobs: - build: - name: ${{matrix.config.os}} - Xcode ${{matrix.config.xcode}} - ${{matrix.build_type}} - runs-on: ${{matrix.config.os}} - strategy: - fail-fast: false - matrix: - config: [ - # {os: macos-10.15, xcode: 10.3}, - # {os: macos-10.15, xcode: 11.2.1}, - # {os: macos-10.15, xcode: 11.3.1}, - # {os: macos-10.15, xcode: 11.4.1}, - # {os: macos-10.15, xcode: 11.5}, - # {os: macos-10.15, xcode: 11.6}, - # {os: macos-10.15, xcode: 11.7}, - # {os: macos-10.15, xcode: 12.0.1}, - # {os: macos-10.15, xcode: 12.1}, - # {os: macos-10.15, xcode: 12.1.1}, - # {os: macos-10.15, xcode: 12.2}, - # {os: macos-10.15, xcode: 12.3}, - # {os: macos-10.15, xcode: 12.4}, - # {os: macos-11, xcode: 11.7}, - # {os: macos-11, xcode: 12.4}, - # {os: macos-11, xcode: 12.5.1}, - # {os: macos-11, xcode: 13.0}, - # {os: macos-11, xcode: 13.1}, - # {os: macos-11, xcode: 13.2}, - {os: macos-11, xcode: 13.2.1}, - ] - build_type: [Debug, Release] - - steps: - - name: Checkout ImGui-SFML - uses: actions/checkout@v2 - with: - submodules: recursive - path: imgui-sfml - - - name: Setup build environment - shell: cmake -P {0} - run: | - file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR=Xcode\n") - file(APPEND "$ENV{GITHUB_ENV}" "DEVELOPER_DIR=/Applications/Xcode_${{matrix.config.xcode}}.app/Contents/Developer\n") - - - name: Setup CMake - id: cmake - uses: ./imgui-sfml/.github/actions/setup_cmake - with: - cmake_version: ${{env.CMAKE_VERSION}} - used_env: ${{matrix.config.os}} - - - name: Install SFML - id: sfml - uses: ./imgui-sfml/.github/actions/install_sfml - with: - sfml_version: ${{env.SFML_VERSION}} - used_env: ${{matrix.config.os}} - - - name: Checkout Dear ImGui - uses: actions/checkout@v2 - with: - repository: ocornut/imgui - submodules: recursive - path: imgui - ref: v${{env.IMGUI_VERSION}} - - - name: Configure - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - execute_process( - COMMAND ${{steps.cmake.outputs.cmake_binary}} - -S "${workspace}/imgui-sfml" - -B "${workspace}/imgui-sfml/build" - -D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} - -D CMAKE_BUILD_TYPE=${{matrix.build_type}} - -D CMAKE_PREFIX_PATH=${{steps.sfml.outputs.sfml_install_dir}} - -D SFML_DIR=${{steps.sfml.outputs.sfml_install_dir}} - -D IMGUI_DIR=${workspace}/imgui - -D BUILD_SHARED_LIBS=ON - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - - - name: Build - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - include(ProcessorCount) - ProcessorCount(N) - execute_process( - COMMAND ${{steps.cmake.outputs.cmake_binary}} - --build "${workspace}/imgui-sfml/build" - --config ${{matrix.build_type}} - --parallel ${N} - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml deleted file mode 100644 index 4de7436..0000000 --- a/.github/workflows/ubuntu.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: Ubuntu - -on: - - push - - pull_request - -env: - CMAKE_VERSION: 3.22.2 - CCACHE_VERSION: 4.2.1 - SFML_VERSION: 2.5.1 - IMGUI_VERSION: 1.87 - -jobs: - build: - name: ${{matrix.config.os}} - ${{matrix.config.compiler_name}} - ${{matrix.build_type}} - runs-on: ${{matrix.config.os}} - strategy: - fail-fast: false - matrix: - config: [ - # {os: ubuntu-18.04, compiler_name: gcc-7, c_compiler: gcc-7, cxx_compiler: g++-7}, - # {os: ubuntu-18.04, compiler_name: gcc-9, c_compiler: gcc-9, cxx_compiler: g++-9}, - # {os: ubuntu-18.04, compiler_name: gcc-10, c_compiler: gcc-10, cxx_compiler: g++-10}, - # {os: ubuntu-18.04, compiler_name: clang-9, c_compiler: clang-9, cxx_compiler: clang++-9}, - {os: ubuntu-20.04, compiler_name: gcc-9, c_compiler: gcc-9, cxx_compiler: g++-9}, - # {os: ubuntu-20.04, compiler_name: gcc-10, c_compiler: gcc-10, cxx_compiler: g++-10}, - {os: ubuntu-20.04, compiler_name: clang-10, c_compiler: clang-10, cxx_compiler: clang++-10}, - # {os: ubuntu-20.04, compiler_name: clang-11, c_compiler: clang-11, cxx_compiler: clang++-11}, - # {os: ubuntu-20.04, compiler_name: clang-12, c_compiler: clang-12, cxx_compiler: clang++-12}, - ] - build_type: [Debug, Release] - - steps: - - name: Checkout ImGui-SFML - uses: actions/checkout@v2 - with: - submodules: recursive - path: imgui-sfml - - - name: Setup build environment - shell: cmake -P {0} - run: | - execute_process(COMMAND ${{matrix.config.c_compiler}} --version) - execute_process(COMMAND ${{matrix.config.cxx_compiler}} --version) - file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR=Unix Makefiles\n") - file(APPEND "$ENV{GITHUB_ENV}" "CC=${{matrix.config.c_compiler}}\n") - file(APPEND "$ENV{GITHUB_ENV}" "CXX=${{matrix.config.cxx_compiler}}\n") - - - name: Setup CMake - id: cmake - uses: ./imgui-sfml/.github/actions/setup_cmake - with: - cmake_version: ${{env.CMAKE_VERSION}} - used_env: ${{matrix.config.os}} - - - name: Setup ccache - id: ccache - uses: ./imgui-sfml/.github/actions/setup_ccache - with: - ccache_version: ${{env.CCACHE_VERSION}} - used_env: ${{matrix.config.os}} - cache_id: ${{matrix.config.os}}-${{matrix.config.compiler_name}}-${{matrix.build_type}} - - - name: Install SFML - id: sfml - uses: ./imgui-sfml/.github/actions/install_sfml - with: - sfml_version: ${{env.SFML_VERSION}} - used_env: ${{matrix.config.os}} - - - name: Checkout Dear ImGui - uses: actions/checkout@v2 - with: - repository: ocornut/imgui - submodules: recursive - path: imgui - ref: v${{env.IMGUI_VERSION}} - - - name: Configure - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - execute_process( - COMMAND ${{steps.cmake.outputs.cmake_binary}} - -S "${workspace}/imgui-sfml" - -B "${workspace}/imgui-sfml/build" - -D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} - -D CMAKE_BUILD_TYPE=${{matrix.build_type}} - -D CMAKE_C_COMPILER_LAUNCHER=${{steps.ccache.outputs.ccache_binary}} - -D CMAKE_CXX_COMPILER_LAUNCHER=${{steps.ccache.outputs.ccache_binary}} - -D CMAKE_PREFIX_PATH=${{steps.sfml.outputs.sfml_install_dir}} - -D SFML_DIR=${{steps.sfml.outputs.sfml_install_dir}} - -D IMGUI_DIR=${workspace}/imgui - -D BUILD_SHARED_LIBS=ON - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - - - name: Build - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - include(ProcessorCount) - ProcessorCount(N) - execute_process( - COMMAND ${{steps.cmake.outputs.cmake_binary}} - --build "${workspace}/imgui-sfml/build" - --config ${{matrix.build_type}} - --parallel ${N} - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - execute_process(COMMAND ${{steps.ccache.outputs.ccache_binary}} -s) diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml deleted file mode 100644 index 4856536..0000000 --- a/.github/workflows/windows-mingw.yml +++ /dev/null @@ -1,127 +0,0 @@ -name: Windows MinGW - -on: - - push - - pull_request - -env: - CMAKE_VERSION: 3.22.2 - CCACHE_VERSION: 4.2.1 - SFML_VERSION: 2.5.1 - IMGUI_VERSION: 1.87 - -jobs: - build: - name: Windows - MinGW - ${{matrix.config.compiler_name}} - ${{matrix.build_type}} - runs-on: ${{matrix.os}} - strategy: - fail-fast: false - matrix: - os: [windows-2022] - config: [ - { - compiler_name: gcc, - c_compiler_path: "C:/msys64/mingw64/bin/gcc.exe", - cxx_compiler_path: "C:/msys64/mingw64/bin/g++.exe" - }, - { - compiler_name: clang, - c_compiler_path: "C:/msys64/mingw64/bin/clang.exe", - cxx_compiler_path: "C:/msys64/mingw64/bin/clang++.exe" - } - ] - build_type: [Debug, Release] - - steps: - - name: Checkout ImGui-SFML - uses: actions/checkout@v2 - with: - submodules: recursive - path: imgui-sfml - - - name: Setup build environment - shell: cmake -P {0} - run: | - execute_process( - COMMAND "C:\msys64\usr\bin\bash" - -lc 'pacman --noconfirm --needed -S mingw-w64-x86_64-${{matrix.config.compiler_name}}' - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - execute_process(COMMAND ${{matrix.config.c_compiler_path}} --version) - execute_process(COMMAND ${{matrix.config.cxx_compiler_path}} --version) - file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR=MinGW Makefiles\n") - file(APPEND "$ENV{GITHUB_ENV}" "CC=${{matrix.config.c_compiler_path}}\n") - file(APPEND "$ENV{GITHUB_ENV}" "CXX=${{matrix.config.cxx_compiler_path}}\n") - - - name: Setup CMake - id: cmake - uses: ./imgui-sfml/.github/actions/setup_cmake - with: - cmake_version: ${{env.CMAKE_VERSION}} - used_env: ${{matrix.os}} - - - name: Setup ccache - id: ccache - uses: ./imgui-sfml/.github/actions/setup_ccache - with: - ccache_version: ${{env.CCACHE_VERSION}} - used_env: ${{matrix.os}} - cache_id: ${{matrix.os}}-mingw-${{matrix.config.compiler_name}}-${{matrix.build_type}} - - - name: Install SFML - id: sfml - uses: ./imgui-sfml/.github/actions/install_sfml - with: - sfml_version: ${{env.SFML_VERSION}} - used_env: ${{matrix.os}}-mingw - - - name: Checkout Dear ImGui - uses: actions/checkout@v2 - with: - repository: ocornut/imgui - submodules: recursive - path: imgui - ref: v${{env.IMGUI_VERSION}} - - - name: Configure - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - execute_process( - COMMAND ${{steps.cmake.outputs.cmake_binary}} - -S "${workspace}/imgui-sfml" - -B "${workspace}/imgui-sfml/build" - -D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} - -D CMAKE_BUILD_TYPE=${{matrix.build_type}} - -D CMAKE_C_COMPILER_LAUNCHER=${{steps.ccache.outputs.ccache_binary}} - -D CMAKE_CXX_COMPILER_LAUNCHER=${{steps.ccache.outputs.ccache_binary}} - -D CMAKE_PREFIX_PATH=${{steps.sfml.outputs.sfml_install_dir}} - -D SFML_DIR=${{steps.sfml.outputs.sfml_install_dir}} - -D IMGUI_DIR=${workspace}/imgui - -D BUILD_SHARED_LIBS=ON - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - - - name: Build - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - include(ProcessorCount) - ProcessorCount(N) - execute_process( - COMMAND ${{steps.cmake.outputs.cmake_binary}} - --build "${workspace}/imgui-sfml/build" - --config ${{matrix.build_type}} - --parallel ${N} - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - execute_process(COMMAND ${{steps.ccache.outputs.ccache_binary}} -s) diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml deleted file mode 100644 index a41385b..0000000 --- a/.github/workflows/windows-msvc.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Windows Visual Studio - -on: - - push - - pull_request - -env: - CMAKE_VERSION: 3.22.2 - SFML_VERSION: 2.5.1 - IMGUI_VERSION: 1.87 - -jobs: - build: - name: Windows - ${{matrix.config.generator_short}} - ${{matrix.build_type}} - runs-on: ${{matrix.config.os}} - strategy: - fail-fast: false - matrix: - config: [ - # {os: windows-2017, generator: "Visual Studio 15 2017", generator_short: VS2017, toolset: v141}, - {os: windows-2019, generator: "Visual Studio 16 2019", generator_short: VS2019, toolset: v142}, - # {os: windows-2019, generator: "Visual Studio 16 2019", generator_short: VS2019, toolset: ClangCL}, # SFML 2.5.1 doesn't compile, fixed on branch 2.6.x - {os: windows-2022, generator: "Visual Studio 17 2022", generator_short: VS2022, toolset: v143}, - # {os: windows-2022, generator: "Visual Studio 17 2022", generator_short: VS2022, toolset: ClangCL}, # SFML 2.5.1 doesn't compile, fixed on branch 2.6.x - ] - build_type: [Debug, Release] - - steps: - - name: Checkout ImGui-SFML - uses: actions/checkout@v2 - with: - submodules: recursive - path: imgui-sfml - - - name: Setup build environment - shell: cmake -P {0} - run: | - file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR=${{matrix.config.generator}}\n") - file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR_TOOLSET=${{matrix.config.toolset}}\n") - - - name: Setup CMake - id: cmake - uses: ./imgui-sfml/.github/actions/setup_cmake - with: - cmake_version: ${{env.CMAKE_VERSION}} - used_env: ${{matrix.config.os}} - - - name: Install SFML - id: sfml - uses: ./imgui-sfml/.github/actions/install_sfml - with: - sfml_version: ${{env.SFML_VERSION}} - used_env: ${{matrix.config.os}}-msvc - - - name: Checkout Dear ImGui - uses: actions/checkout@v2 - with: - repository: ocornut/imgui - submodules: recursive - path: imgui - ref: v${{env.IMGUI_VERSION}} - - - name: Configure - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - execute_process( - COMMAND ${{steps.cmake.outputs.cmake_binary}} - -S "${workspace}/imgui-sfml" - -B "${workspace}/imgui-sfml/build" - -D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} - -D CMAKE_BUILD_TYPE=${{matrix.build_type}} - -D CMAKE_PREFIX_PATH=${{steps.sfml.outputs.sfml_install_dir}} - -D SFML_DIR=${{steps.sfml.outputs.sfml_install_dir}} - -D IMGUI_DIR=${workspace}/imgui - -D BUILD_SHARED_LIBS=ON - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - - - name: Build - shell: cmake -P {0} - run: | - file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace) - include(ProcessorCount) - ProcessorCount(N) - execute_process( - COMMAND ${{steps.cmake.outputs.cmake_binary}} - --build "${workspace}/imgui-sfml/build" - --config ${{matrix.build_type}} - --parallel ${N} - RESULT_VARIABLE result - ) - if(NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif()