Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Ninja with ClangCL for CI builds #351

Merged
merged 10 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ jobs:
fail-fast: false # show all errors for each platform (vs. cancel jobs on error)
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-22.04
cmake_args: "-DCMAKE_CXX_COMPILER=g++-11"
- os: windows-2022
cmake_args: "-TClangCL -A x64"
cmake_gen: -G"Ninja Multi-Config"
cmake_args: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
- os: macos-13
cmake_args: "-DCMAKE_BUILD_TYPE=Release"

steps:
- name: Install Linux Deps
if: runner.os == 'Linux'
Expand All @@ -43,6 +44,18 @@ jobs:
with:
xcode-version: '15.2'

- name: Install Ninja
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-ninja@master

- name: Add msbuild to PATH
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v2

- name: Setup MSVC devcmd
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Get latest CMake
uses: lukka/get-cmake@latest

Expand Down Expand Up @@ -70,11 +83,10 @@ jobs:
path: modules/jai

- name: Configure
shell: bash
env:
CMAKE_ARGS: ${{ matrix.cmake_args }}
CONFIGURE_ADD_ONS_FLAG: "${{ github.event_name != 'pull_request' && '-DBYOD_BUILD_ADD_ON_MODULES=ON' || '' }}"
run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG $CMAKE_ARGS
shell: bash
run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG ${{ matrix.cmake_args }} ${{ matrix.cmake_gen }}

- name: Build
shell: bash
Expand Down
1 change: 1 addition & 0 deletions modules/cmake/WarningFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ if(WIN32)
-Wno-sign-conversion
-Wno-implicit-int-float-conversion
-Wno-implicit-const-int-float-conversion
-Wno-unsafe-buffer-usage
-Wno-header-hygiene
)
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"))
Expand Down
Loading