|
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | +# |
| 4 | +# http://go.microsoft.com/fwlink/?LinkId=248929 |
| 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/*.cmd |
| 17 | + - build/*.json |
| 18 | + - build/*.props |
| 19 | + - build/*.ps1 |
| 20 | + - build/*.targets |
| 21 | + pull_request: |
| 22 | + branches: "main" |
| 23 | + paths-ignore: |
| 24 | + - '*.md' |
| 25 | + - LICENSE |
| 26 | + - '.azuredevops/**' |
| 27 | + - '.nuget/*' |
| 28 | + - build/*.cmd |
| 29 | + - build/*.json |
| 30 | + - build/*.props |
| 31 | + - build/*.ps1 |
| 32 | + - build/*.targets |
| 33 | + |
| 34 | +permissions: |
| 35 | + contents: read |
| 36 | + |
| 37 | +jobs: |
| 38 | + build: |
| 39 | + runs-on: windows-2022 |
| 40 | + |
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + |
| 44 | + matrix: |
| 45 | + build_type: [x64-Debug-Win10-Clang, x64-Release-Win10-Clang] |
| 46 | + arch: [amd64] |
| 47 | + include: |
| 48 | + - build_type: x86-Debug-Win10-Clang |
| 49 | + arch: amd64_x86 |
| 50 | + - build_type: x86-Release-Win10-Clang |
| 51 | + arch: amd64_x86 |
| 52 | + - build_type: arm64-Debug-Clang |
| 53 | + arch: amd64_arm64 |
| 54 | + - build_type: arm64-Release-Clang |
| 55 | + arch: amd64_arm64 |
| 56 | + |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 59 | + |
| 60 | + - name: Clone test repository |
| 61 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 62 | + with: |
| 63 | + repository: walbourn/directxtktest |
| 64 | + path: Tests |
| 65 | + ref: main |
| 66 | + |
| 67 | + - name: 'Install Ninja' |
| 68 | + run: choco install ninja |
| 69 | + |
| 70 | + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
| 71 | + with: |
| 72 | + arch: ${{ matrix.arch }} |
| 73 | + |
| 74 | + - name: 'Configure CMake' |
| 75 | + working-directory: ${{ github.workspace }} |
| 76 | + run: > |
| 77 | + cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON |
| 78 | +
|
| 79 | + - name: 'Build' |
| 80 | + working-directory: ${{ github.workspace }} |
| 81 | + run: cmake --build out\build\${{ matrix.build_type }} |
| 82 | + |
| 83 | + - name: 'Clean up' |
| 84 | + working-directory: ${{ github.workspace }} |
| 85 | + run: Remove-Item -Path out -Recurse -Force |
| 86 | + |
| 87 | + - name: 'Configure CMake (DLL)' |
| 88 | + working-directory: ${{ github.workspace }} |
| 89 | + run: > |
| 90 | + cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON |
| 91 | + -DBUILD_SHARED_LIBS=ON |
| 92 | +
|
| 93 | + - name: 'Build (DLL)' |
| 94 | + working-directory: ${{ github.workspace }} |
| 95 | + run: cmake --build out\build\${{ matrix.build_type }} |
| 96 | + |
| 97 | + build2026: |
| 98 | + runs-on: windows-2025-vs2026 |
| 99 | + |
| 100 | + strategy: |
| 101 | + fail-fast: false |
| 102 | + |
| 103 | + matrix: |
| 104 | + build_type: [x64-Debug-Win10-Clang, x64-Release-Win10-Clang] |
| 105 | + arch: [amd64] |
| 106 | + include: |
| 107 | + - build_type: x86-Debug-Win10-Clang |
| 108 | + arch: amd64_x86 |
| 109 | + - build_type: x86-Release-Win10-Clang |
| 110 | + arch: amd64_x86 |
| 111 | + - build_type: arm64-Debug-Clang |
| 112 | + arch: amd64_arm64 |
| 113 | + - build_type: arm64-Release-Clang |
| 114 | + arch: amd64_arm64 |
| 115 | + |
| 116 | + steps: |
| 117 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 118 | + |
| 119 | + - name: 'Install Ninja' |
| 120 | + run: choco install ninja |
| 121 | + |
| 122 | + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
| 123 | + with: |
| 124 | + arch: ${{ matrix.arch }} |
| 125 | + |
| 126 | + - name: 'Configure CMake' |
| 127 | + working-directory: ${{ github.workspace }} |
| 128 | + run: cmake --preset=${{ matrix.build_type }} |
| 129 | + |
| 130 | + - name: 'Build' |
| 131 | + working-directory: ${{ github.workspace }} |
| 132 | + run: cmake --build out\build\${{ matrix.build_type }} |
| 133 | + |
| 134 | + - name: 'Clean up' |
| 135 | + working-directory: ${{ github.workspace }} |
| 136 | + run: Remove-Item -Path out -Recurse -Force |
| 137 | + |
| 138 | + - name: 'Configure CMake (DLL)' |
| 139 | + working-directory: ${{ github.workspace }} |
| 140 | + run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON |
| 141 | + |
| 142 | + - name: 'Build (DLL)' |
| 143 | + working-directory: ${{ github.workspace }} |
| 144 | + run: cmake --build out\build\${{ matrix.build_type }} |
0 commit comments