Skip to content

Commit d4c43c0

Browse files
committed
Fix actions
1 parent e67ff2d commit d4c43c0

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
33
name: CMake on multiple platforms
44

5-
on:
6-
push:
7-
branches: [ "main" ]
8-
pull_request:
9-
branches: [ "main" ]
10-
115
jobs:
126
build:
137
runs-on: ${{ matrix.os }}
@@ -23,7 +17,7 @@ jobs:
2317
#
2418
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
2519
matrix:
26-
os: [ubuntu-latest, windows-latest]
20+
os: [ubuntu-latest, windows-latest, macos-latest]
2721
build_type: [Release]
2822
c_compiler: [gcc, clang, cl]
2923
include:
@@ -36,13 +30,20 @@ jobs:
3630
- os: ubuntu-latest
3731
c_compiler: clang
3832
cpp_compiler: clang++
33+
- os: macos-latest
34+
c_compiler: clang
35+
cpp_compiler: clang++
3936
exclude:
4037
- os: windows-latest
4138
c_compiler: gcc
4239
- os: windows-latest
4340
c_compiler: clang
4441
- os: ubuntu-latest
4542
c_compiler: cl
43+
- os: macos-latest
44+
c_compiler: cl
45+
- os: macos-latest
46+
c_compiler: gcc
4647

4748
steps:
4849
- uses: actions/checkout@v4
@@ -89,5 +90,5 @@ jobs:
8990

9091
- uses: actions/upload-artifact@v4
9192
with:
92-
name: 2d-minecraft-${{ matrix.os }}
93+
name: 2d-minecraft-${{ matrix.os }}-${{ matrix.c_compiler }}
9394
path: ${{ github.workspace }}/build/package

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,14 @@ endif()
287287

288288
# General flags
289289
if(MSVC)
290+
target_compile_options(${BUILD_NAME} PRIVATE /IGNORE:4244,4042,4996,4305)
291+
290292
if(DEBUG)
291293
# TODO: Find out the correct msvc flags
292-
target_compile_options(${BUILD_NAME} PRIVATE /W4 /WX /MDd /Zi /Ob0 /Od /RTC1 /W3 /GR /EHsc /utf-8 /IGNORE:4244)
294+
target_compile_options(${BUILD_NAME} PRIVATE /W4 /WX /MDd /Zi /Ob0 /Od /RTC1 /W3 /GR /EHsc /utf-8)
293295
target_compile_definitions(${BUILD_NAME} PRIVATE /DWIN32 /D__WINDOWS__ /DDEBUG /D_DEBUG)
294296
else()
295-
target_compile_options(${BUILD_NAME} PRIVATE /MD /O2 /Ob2 /utf-8 /IGNORE:4244)
297+
target_compile_options(${BUILD_NAME} PRIVATE /MD /O2 /Ob2 /utf-8)
296298
target_compile_definitions(${BUILD_NAME} PRIVATE /D__WINDOWS__ /DWIND32 /DEIGEN_NO_DEBUG /DNDEBUG)
297299
endif()
298300

0 commit comments

Comments
 (0)