|
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | +# |
| 4 | +# http://go.microsoft.com/fwlink/?LinkID=615560 |
| 5 | + |
| 6 | +name: 'CMake (clang-cl)' |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: "main" |
| 11 | + paths-ignore: |
| 12 | + - '*.md' |
| 13 | + - LICENSE |
| 14 | + - '.azuredevops/**' |
| 15 | + - '.nuget/*' |
| 16 | + - build/*.ps1 |
| 17 | + pull_request: |
| 18 | + branches: "main" |
| 19 | + paths-ignore: |
| 20 | + - '*.md' |
| 21 | + - LICENSE |
| 22 | + - '.azuredevops/**' |
| 23 | + - '.nuget/*' |
| 24 | + - build/*.ps1 |
| 25 | + |
| 26 | +permissions: |
| 27 | + contents: read |
| 28 | + |
| 29 | +jobs: |
| 30 | + build: |
| 31 | + runs-on: windows-2022 |
| 32 | + |
| 33 | + strategy: |
| 34 | + fail-fast: false |
| 35 | + |
| 36 | + matrix: |
| 37 | + build_type: [x64-Debug-Clang, x64-Release-Clang] |
| 38 | + arch: [amd64] |
| 39 | + include: |
| 40 | + - build_type: x86-Debug-Clang |
| 41 | + arch: amd64_x86 |
| 42 | + - build_type: x86-Release-Clang |
| 43 | + arch: amd64_x86 |
| 44 | + - build_type: arm64-Debug-Clang |
| 45 | + arch: amd64_arm64 |
| 46 | + - build_type: arm64-Release-Clang |
| 47 | + arch: amd64_arm64 |
| 48 | + |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 51 | + |
| 52 | + - name: Clone test repository |
| 53 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 54 | + with: |
| 55 | + repository: walbourn/directxmathtest |
| 56 | + path: Tests |
| 57 | + ref: main |
| 58 | + |
| 59 | + - name: 'Install Ninja' |
| 60 | + run: choco install ninja |
| 61 | + |
| 62 | + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
| 63 | + with: |
| 64 | + arch: ${{ matrix.arch }} |
| 65 | + |
| 66 | + - name: 'Configure CMake' |
| 67 | + working-directory: ${{ github.workspace }} |
| 68 | + run: cmake --preset=${{ matrix.build_type }} |
| 69 | + |
| 70 | + - name: 'Build' |
| 71 | + working-directory: ${{ github.workspace }} |
| 72 | + run: cmake --build out/build/${{ matrix.build_type }} -DBUILD_TESTING=ON |
| 73 | + |
| 74 | + - if: (matrix.build_type == 'x64-Release-Clang') || (matrix.build_type == 'x86-Release-Clang') |
| 75 | + timeout-minutes: 10 |
| 76 | + name: 'Test' |
| 77 | + working-directory: ${{ github.workspace }} |
| 78 | + run: ctest --preset=${{ matrix.build_type }} --output-on-failure |
| 79 | + |
| 80 | + build2026: |
| 81 | + runs-on: windows-2025-vs2026 |
| 82 | + |
| 83 | + strategy: |
| 84 | + fail-fast: false |
| 85 | + |
| 86 | + matrix: |
| 87 | + build_type: [x64-Debug-Clang, x64-Release-Clang] |
| 88 | + arch: [amd64] |
| 89 | + include: |
| 90 | + - build_type: x86-Debug-Clang |
| 91 | + arch: amd64_x86 |
| 92 | + - build_type: x86-Release-Clang |
| 93 | + arch: amd64_x86 |
| 94 | + - build_type: arm64-Debug-Clang |
| 95 | + arch: amd64_arm64 |
| 96 | + - build_type: arm64-Release-Clang |
| 97 | + arch: amd64_arm64 |
| 98 | + |
| 99 | + steps: |
| 100 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 101 | + |
| 102 | + - name: Clone test repository |
| 103 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 104 | + with: |
| 105 | + repository: walbourn/directxmathtest |
| 106 | + path: Tests |
| 107 | + ref: main |
| 108 | + |
| 109 | + - name: 'Install Ninja' |
| 110 | + run: choco install ninja |
| 111 | + |
| 112 | + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
| 113 | + with: |
| 114 | + arch: ${{ matrix.arch }} |
| 115 | + |
| 116 | + - name: 'Configure CMake' |
| 117 | + working-directory: ${{ github.workspace }} |
| 118 | + run: cmake --preset=${{ matrix.build_type }} |
| 119 | + |
| 120 | + - name: 'Build' |
| 121 | + working-directory: ${{ github.workspace }} |
| 122 | + run: cmake --build out/build/${{ matrix.build_type }} -DBUILD_TESTING=ON |
| 123 | + |
| 124 | + - if: (matrix.build_type == 'x64-Release-Clang') || (matrix.build_type == 'x86-Release-Clang') |
| 125 | + timeout-minutes: 10 |
| 126 | + name: 'Test' |
| 127 | + working-directory: ${{ github.workspace }} |
| 128 | + run: ctest --preset=${{ matrix.build_type }} --output-on-failure |
0 commit comments