Revert enabling "warnings as errors" in the default build #83
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |