Skip to content

Commit

Permalink
GH Actions fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
viblo committed Jan 5, 2025
1 parent 2373129 commit 96d324e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -36,13 +36,20 @@ 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
- os: windows-latest
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
Expand All @@ -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.
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down
3 changes: 2 additions & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 96d324e

Please sign in to comment.