diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f809e45..982ec5f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: # # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, windows-latest, macos-latest] build_type: [Release] c_compiler: [gcc, clang, cl] include: @@ -36,6 +36,9 @@ jobs: - os: ubuntu-latest c_compiler: clang cpp_compiler: clang++ + - os: macos-latest + c_compiler: clang + cpp_compiler: clang++ exclude: - os: windows-latest c_compiler: gcc @@ -43,6 +46,10 @@ jobs: c_compiler: clang - os: ubuntu-latest c_compiler: cl + - os: macos-latest + c_compiler: gcc + - os: macos-latest + c_compiler: cl steps: - uses: actions/checkout@v4 @@ -54,8 +61,14 @@ jobs: run: | echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - name: Install opengl - run: vcpkg install opengl + - name: Install dependencies on Ubuntu + if: runner.os == 'Linux' + run: > + sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev + xorg-dev libblocksruntime-dev + + - name: CMake Version + run: cmake --version - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. diff --git a/CMakeLists.txt b/CMakeLists.txt index faa3492f..fc86b134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ endif() if(CMAKE_C_COMPILER_ID STREQUAL "Clang") option(FORCE_CLANG_BLOCKS "Force enable Clang blocks" YES) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nan-infinity-disabled") endif() # sanity checks... diff --git a/VERSION.txt b/VERSION.txt index abc6c1e2..85f37824 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -16,7 +16,8 @@ What's new in NEXT: * BUG: Fixes bug in cpSpaceShapeQuery to not miss collisions (by alanmillard) * BUG: Fix for cpSpaceShapeQuery using cpSegmentShape with null body (by maniek2332) * MISC: Fix spelling of positive (by skitt) - +* MISC: Github actions that build on Windows/Linux/MacOS with MSVC/GCC/CLang +* MISC: Fix warning for INFINITY on CLang 18+ What's new in 7.0.3: diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index 2ce0a7e5..41b875dd 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -38,6 +38,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") list(APPEND chipmunk_demos_libraries BlocksRuntime) endif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + + +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + list(APPEND chipmunk_demos_libraries BlocksRuntime) + endif() +endif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + + include_directories(${chipmunk_demos_include_dirs}) link_directories(${chipmunk_demos_library_dirs}) add_executable(chipmunk_demos ${chipmunk_demos_source_files})