|
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | +# |
| 4 | +# http://go.microsoft.com/fwlink/?LinkId=248926 |
| 5 | + |
| 6 | +name: 'CTest (Windows)' |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: [ "main" ] |
| 11 | + pull_request: |
| 12 | + branches: [ "main" ] |
| 13 | + paths-ignore: |
| 14 | + - '*.md' |
| 15 | + - LICENSE |
| 16 | + - '.nuget/*' |
| 17 | + - build/*.cmd |
| 18 | + - build/*.json |
| 19 | + - build/*.props |
| 20 | + - build/*.ps1 |
| 21 | + - build/*.targets |
| 22 | + - build/*.yml |
| 23 | + |
| 24 | +env: |
| 25 | + DIRECTXTEX_MEDIA_PATH: ${{ github.workspace }}/Media |
| 26 | + |
| 27 | +jobs: |
| 28 | + build: |
| 29 | + runs-on: ${{ matrix.os }} |
| 30 | + timeout-minutes: 40 |
| 31 | + |
| 32 | + strategy: |
| 33 | + fail-fast: false |
| 34 | + |
| 35 | + matrix: |
| 36 | + os: [windows-2019, windows-2022] |
| 37 | + build_type: [x64-Debug, x64-Release, x64-Debug-Clang, x64-Release-Clang] |
| 38 | + arch: [amd64] |
| 39 | + include: |
| 40 | + - os: windows-2019 |
| 41 | + build_type: x86-Debug |
| 42 | + arch: amd64_x86 |
| 43 | + - os: windows-2019 |
| 44 | + build_type: x86-Release |
| 45 | + arch: amd64_x86 |
| 46 | + - os: windows-2019 |
| 47 | + build_type: x86-Debug-Clang |
| 48 | + arch: amd64_x86 |
| 49 | + - os: windows-2019 |
| 50 | + build_type: x86-Release-Clang |
| 51 | + arch: amd64_x86 |
| 52 | + - os: windows-2022 |
| 53 | + build_type: x86-Debug |
| 54 | + arch: amd64_x86 |
| 55 | + - os: windows-2022 |
| 56 | + build_type: x86-Release |
| 57 | + arch: amd64_x86 |
| 58 | + - os: windows-2022 |
| 59 | + build_type: x86-Debug-Clang |
| 60 | + arch: amd64_x86 |
| 61 | + - os: windows-2022 |
| 62 | + build_type: x86-Release-Clang |
| 63 | + arch: amd64_x86 |
| 64 | + - os: windows-2022 |
| 65 | + build_type: arm64-Debug |
| 66 | + arch: amd64_arm64 |
| 67 | + - os: windows-2022 |
| 68 | + build_type: arm64-Release |
| 69 | + arch: amd64_arm64 |
| 70 | + - os: windows-2022 |
| 71 | + build_type: arm64ec-Debug |
| 72 | + arch: amd64_arm64 |
| 73 | + - os: windows-2022 |
| 74 | + build_type: arm64ec-Release |
| 75 | + arch: amd64_arm64 |
| 76 | + |
| 77 | + steps: |
| 78 | + - uses: actions/checkout@v4 |
| 79 | + |
| 80 | + - name: Clone test repository |
| 81 | + uses: actions/checkout@v4 |
| 82 | + with: |
| 83 | + repository: walbourn/directxtextest |
| 84 | + path: Tests |
| 85 | + ref: main |
| 86 | + |
| 87 | + - if: matrix.build_type == 'x64-Release' |
| 88 | + name: Clone media repository |
| 89 | + uses: actions/checkout@v4 |
| 90 | + with: |
| 91 | + repository: walbourn/directxtexmedia |
| 92 | + path: Media |
| 93 | + ref: main |
| 94 | + lfs: true |
| 95 | + |
| 96 | + - name: 'Install Ninja' |
| 97 | + run: choco install ninja |
| 98 | + |
| 99 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 100 | + with: |
| 101 | + arch: ${{ matrix.arch }} |
| 102 | + |
| 103 | + - name: 'Configure CMake' |
| 104 | + working-directory: ${{ github.workspace }} |
| 105 | + run: cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON |
| 106 | + |
| 107 | + - name: 'Build' |
| 108 | + working-directory: ${{ github.workspace }} |
| 109 | + run: cmake --build out\build\${{ matrix.build_type }} |
| 110 | + |
| 111 | + - if: (matrix.build_type == 'x64-Release') || (matrix.build_type == 'x86-Release') |
| 112 | + timeout-minutes: 30 |
| 113 | + name: 'Test (CPU only)' |
| 114 | + working-directory: ${{ github.workspace }} |
| 115 | + run: ctest --preset=${{ matrix.build_type }} -L ImageFormats,Library |
0 commit comments