From: Juan Ramos Date: Wed, 20 Dec 2023 20:10:56 +0000 (-0700) Subject: Improve clang on Windows testing X-Git-Tag: upstream/1.3.296~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3798f68b738df9c16f1326f6a38d27b7365e2182;p=platform%2Fupstream%2FVulkan-Loader.git Improve clang on Windows testing Test both GNU clang and clang-cl Use Ninja for performance --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f784ff50..9bbed6bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -257,69 +257,28 @@ jobs: working-directory: ./build run: ctest --output-on-failure -C Release -E UnknownFunction - # Something about Github Actions + Windows + Ninja + Unicode doesn't play nicely together. - # https://github.com/KhronosGroup/Vulkan-Loader/pull/1188#issuecomment-1536659318 - # - # Disable testing explicitly for Ninja. But still ensure it builds properly. - windows_ninja: - runs-on: windows-2019 - strategy: - matrix: - arch: [ Win32, x64 ] - config: [ Debug, Release ] - exclude: - - arch: Win32 - config: release - - arch: x64 - config: debug - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.7' - - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.arch }} - - - name: Configure - run: cmake -S. -B build -DUPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=${{matrix.config}} -G "Ninja" -D ENABLE_WERROR=ON -D LOADER_USE_UNSAFE_FILE_SEARCH=ON - - - name: Build - run: cmake --build ./build - - - name: Install the loader - run: cmake --install build --prefix build/install - + # Test both clang and clang-cl # Make sure clang-cl builds still succeed - used by the chromium project - windows_clang_cl: + windows_clang: runs-on: windows-2022 strategy: matrix: - arch: [ x64 ] - config: [ Release ] - + compiler: [ clang, clang-cl ] + config: [ Debug, Release ] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.7' - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.arch }} - - - name: Configure - run: cmake -S. -B build -D UPDATE_DEPS=ON -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=${{matrix.config}} -T "ClangCL" -D ENABLE_WERROR=ON - - - name: Build - run: cmake --build ./build --config ${{matrix.config}} - - - name: Install the loader - run: cmake --install build --prefix build/install --config ${{matrix.config}} - - - name: Run regression tests - working-directory: ./build - run: ctest --output-on-failure -C ${{matrix.config}} + - run: | + cmake -S. -B build ` + -D CMAKE_C_COMPILER=${{matrix.compiler}} -D CMAKE_CXX_COMPILER=${{matrix.compiler}} ` + -D UPDATE_DEPS=ON ` + -D CMAKE_BUILD_TYPE=${{matrix.config}} ` + -D ENABLE_WERROR=ON ` + -D BUILD_TESTS=ON ` + -G Ninja + - run: cmake --build ./build + - run: ctest --output-on-failure --test-dir build/ + - run: cmake --install build --prefix build/install mac: runs-on: macos-12