From e7d4768ed295eb0d010ef0aff9aec2037d245af8 Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 17:58:13 -0800 Subject: [PATCH 01/10] Using Ninja with ClangCL for CI builds --- .github/workflows/cmake.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c771ff32..bc554c81 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,10 +26,10 @@ jobs: - os: ubuntu-latest cmake_args: "-DCMAKE_CXX_COMPILER=g++-11" - os: windows-2022 - cmake_args: "-TClangCL -A x64" + cmake_args: "-G\"Ninja Multi-Config\" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl" - os: macos-13 cmake_args: "-DCMAKE_BUILD_TYPE=Release" - + steps: - name: Install Linux Deps if: runner.os == 'Linux' @@ -43,6 +43,14 @@ jobs: with: xcode-version: '15.2' + - 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 @@ -70,14 +78,12 @@ 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 - name: Build - shell: bash run: cmake --build build --config Release --parallel 4 --target BYOD_Standalone BYOD_VST3 BYOD_CLAP - name: Unit Tests From 4b7bf63d431e0aee658320a384d50030d40511c6 Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:06:08 -0800 Subject: [PATCH 02/10] Bringing back shell: bash --- .github/workflows/cmake.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index bc554c81..e4de7dd1 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -23,10 +23,10 @@ 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: "-G\"Ninja Multi-Config\" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl" + cmake_args: "-G\"Ninja Multi-Config\" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl" - os: macos-13 cmake_args: "-DCMAKE_BUILD_TYPE=Release" @@ -81,9 +81,11 @@ jobs: env: CMAKE_ARGS: ${{ matrix.cmake_args }} CONFIGURE_ADD_ONS_FLAG: "${{ github.event_name != 'pull_request' && '-DBYOD_BUILD_ADD_ON_MODULES=ON' || '' }}" + shell: bash run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG $CMAKE_ARGS - name: Build + shell: bash run: cmake --build build --config Release --parallel 4 --target BYOD_Standalone BYOD_VST3 BYOD_CLAP - name: Unit Tests From c52a71fc4674b76a3148dc4f93c68c48009e98c6 Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:09:17 -0800 Subject: [PATCH 03/10] Installing Ninja --- .github/workflows/cmake.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e4de7dd1..1346d691 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -43,6 +43,10 @@ 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 From 06d0270609dc15efef42d5bff37b357389af2a97 Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:16:38 -0800 Subject: [PATCH 04/10] Trying to fix quotations --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 1346d691..4e5171ec 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,7 +26,7 @@ jobs: - os: ubuntu-22.04 cmake_args: "-DCMAKE_CXX_COMPILER=g++-11" - os: windows-2022 - cmake_args: "-G\"Ninja Multi-Config\" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl" + cmake_args: -G"Ninja Multi-Config" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl - os: macos-13 cmake_args: "-DCMAKE_BUILD_TYPE=Release" From 96130c9db0aa71175c64320fec251665ef6039eb Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:21:59 -0800 Subject: [PATCH 05/10] Trying to fix arg quotes --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4e5171ec..66908938 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,7 +26,7 @@ jobs: - os: ubuntu-22.04 cmake_args: "-DCMAKE_CXX_COMPILER=g++-11" - os: windows-2022 - cmake_args: -G"Ninja Multi-Config" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl + cmake_args: -G\"Ninja Multi-Config\" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl - os: macos-13 cmake_args: "-DCMAKE_BUILD_TYPE=Release" @@ -86,7 +86,7 @@ jobs: CMAKE_ARGS: ${{ matrix.cmake_args }} CONFIGURE_ADD_ONS_FLAG: "${{ github.event_name != 'pull_request' && '-DBYOD_BUILD_ADD_ON_MODULES=ON' || '' }}" shell: bash - run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG $CMAKE_ARGS + run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG "$CMAKE_ARGS" - name: Build shell: bash From 4001d6dc88494c7388565adc47036e76de427da8 Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:29:59 -0800 Subject: [PATCH 06/10] Skipping escape chars --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 66908938..aa82e88d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,7 +26,7 @@ jobs: - os: ubuntu-22.04 cmake_args: "-DCMAKE_CXX_COMPILER=g++-11" - os: windows-2022 - cmake_args: -G\"Ninja Multi-Config\" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl + cmake_args: -G"Ninja Multi-Config" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl - os: macos-13 cmake_args: "-DCMAKE_BUILD_TYPE=Release" From 669b39f98f6e9f72dada5fd333a396f7c4e9cde6 Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:33:28 -0800 Subject: [PATCH 07/10] arg expansion --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index aa82e88d..c9708414 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -86,7 +86,7 @@ jobs: CMAKE_ARGS: ${{ matrix.cmake_args }} CONFIGURE_ADD_ONS_FLAG: "${{ github.event_name != 'pull_request' && '-DBYOD_BUILD_ADD_ON_MODULES=ON' || '' }}" shell: bash - run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG "$CMAKE_ARGS" + run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG ${CMAKE_ARGS} - name: Build shell: bash From 64877d825e83e2f97dc92e2a8fc008c0a33cae33 Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:38:41 -0800 Subject: [PATCH 08/10] Splitting up args --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c9708414..5a627272 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,7 +26,8 @@ jobs: - os: ubuntu-22.04 cmake_args: "-DCMAKE_CXX_COMPILER=g++-11" - os: windows-2022 - cmake_args: -G"Ninja Multi-Config" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl + cmake_gan: -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" @@ -83,10 +84,9 @@ jobs: - name: Configure env: - CMAKE_ARGS: ${{ matrix.cmake_args }} CONFIGURE_ADD_ONS_FLAG: "${{ github.event_name != 'pull_request' && '-DBYOD_BUILD_ADD_ON_MODULES=ON' || '' }}" shell: bash - run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG ${CMAKE_ARGS} + run: cmake -Bbuild $CONFIGURE_ADD_ONS_FLAG ${{ matrix.cmake_args }} ${{ matrix.cmake_gen }} - name: Build shell: bash From d2f83a07918a49130d68c86fd2fa7b74aec4c6b6 Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:41:12 -0800 Subject: [PATCH 09/10] Fixing typo --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 5a627272..10e2385b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,7 +26,7 @@ jobs: - os: ubuntu-22.04 cmake_args: "-DCMAKE_CXX_COMPILER=g++-11" - os: windows-2022 - cmake_gan: -G"Ninja Multi-Config" + 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" From e0c068d3af2754be4a4e6af45d80f971016d902f Mon Sep 17 00:00:00 2001 From: jatin Date: Sun, 25 Feb 2024 18:52:51 -0800 Subject: [PATCH 10/10] Fixing warning flags --- modules/cmake/WarningFlags.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/cmake/WarningFlags.cmake b/modules/cmake/WarningFlags.cmake index eab2290b..b657f7e6 100644 --- a/modules/cmake/WarningFlags.cmake +++ b/modules/cmake/WarningFlags.cmake @@ -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"))