diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a17a1e36..a3f74474 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,12 +98,10 @@ jobs: - name: Create build directory run: cmake -E make_directory build - name: Run CMake (for Mac) - working-directory: build - run: cmake -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_SKIP_INSTALL_RPATH=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTESTS=1 -DDESKTOP=1 -DOPENAL_LIBRARY=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/OpenAL.tbd .. + run: cmake --preset MacOS-CI if: matrix.target_os == 'macos' - name: Build - working-directory: build - run: make -j `nproc` + run: cmake --build --preset MacOS-CI - name: Run tests # TODO: Maybe run Windows tests using wine as well? working-directory: build diff --git a/CMakePresets.json b/CMakePresets.json index a702f468..0741a880 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -47,6 +47,20 @@ "TESTS": true, "DESKTOP": true } + }, + { + "name": "MacOS-CI", + "description": "MacOS configuration for CI pipeline", + "inherits": ["CI"], + "cacheVariables": { + "CMAKE_SKIP_INSTALL_RPATH": true, + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "DEV_BUILD": true, + "PORTABLE": true, + "TESTS": true, + "DESKTOP": true, + "OPENAL_LIBRARY": "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/OpenAL.tbd" + } } ], "buildPresets": [ @@ -59,6 +73,11 @@ "name": "Linux-CI", "configurePreset": "Linux-CI", "configuration": "RelWithDebInfo" + }, + { + "name": "MacOS-CI", + "configurePreset": "MacOS-CI", + "configuration": "RelWithDebInfo" } ] }