From 78ca9628e2ada5c36514ac42efd5d8d364537d58 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 29 Jul 2024 20:13:36 -0700 Subject: [PATCH] Added GitHub Actions for build and security analysis (#491) --- .github/workflows/codeql.yml | 61 +++++++++++++++ .github/workflows/main.yml | 99 +++++++++++++++++++++++ .github/workflows/msbuild.yml | 62 +++++++++++++++ .github/workflows/msvc.yml | 76 ++++++++++++++++++ .github/workflows/test.yml | 100 ++++++++++++++++++++++++ CMakePresets.json | 24 +++--- Texassemble/texassemble.cpp | 1 + Texconv/texconv.cpp | 1 + Texdiag/texdiag.cpp | 1 + build/DirectXTex-GitHub-CMake-Dev17.yml | 4 +- build/DirectXTex-GitHub-CMake-Xbox.yml | 2 + build/DirectXTex-GitHub-CMake.yml | 4 +- build/DirectXTex-GitHub-Dev17.yml | 37 +-------- build/DirectXTex-GitHub-GDK.yml | 2 + build/DirectXTex-GitHub-MinGW.yml | 2 + build/DirectXTex-GitHub-Test-Dev17.yml | 2 +- build/DirectXTex-GitHub-Test.yml | 36 +-------- build/DirectXTex-GitHub-WSL.yml | 2 + build/DirectXTex-GitHub.yml | 39 ++------- build/DirectXTex-SDL.yml | 2 +- 20 files changed, 442 insertions(+), 115 deletions(-) create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/msbuild.yml create mode 100644 .github/workflows/msvc.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..a05a2df --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,61 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkId=248926 + +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths-ignore: + - '*.md' + - LICENSE + - '.nuget/*' + - build/*.cmd + - build/*.json + - build/*.props + - build/*.ps1 + - build/*.targets + - build/*.yml + schedule: + - cron: '43 3 * * 3' + +jobs: + analyze: + name: Analyze (C/C++) + runs-on: windows-latest + timeout-minutes: 360 + permissions: + security-events: write + packages: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: 'Install Ninja' + run: choco install ninja + + - uses: ilammy/msvc-dev-cmd@v1 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: c-cpp + build-mode: manual + + - name: 'Configure CMake' + working-directory: ${{ github.workspace }} + run: cmake --preset=x64-Debug + + - name: 'Build' + working-directory: ${{ github.workspace }} + run: cmake --build out\build\x64-Debug + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:c-cpp" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d652480 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,99 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkId=248926 + +name: 'CMake (Windows)' + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths-ignore: + - '*.md' + - LICENSE + - '.nuget/*' + - build/*.cmd + - build/*.json + - build/*.props + - build/*.ps1 + - build/*.targets + - build/*.yml + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + + matrix: + os: [windows-2019, windows-2022] + build_type: [x64-Debug, x64-Release, x64-Debug-Clang, x64-Release-Clang] + arch: [amd64] + include: + - os: windows-2019 + build_type: x86-Debug + arch: amd64_x86 + - os: windows-2019 + build_type: x86-Release + arch: amd64_x86 + - os: windows-2019 + build_type: x86-Debug-Clang + arch: amd64_x86 + - os: windows-2019 + build_type: x86-Release-Clang + arch: amd64_x86 + - os: windows-2022 + build_type: x86-Debug + arch: amd64_x86 + - os: windows-2022 + build_type: x86-Release + arch: amd64_x86 + - os: windows-2022 + build_type: x86-Debug-Clang + arch: amd64_x86 + - os: windows-2022 + build_type: x86-Release-Clang + arch: amd64_x86 + - os: windows-2022 + build_type: arm64-Debug + arch: amd64_arm64 + - os: windows-2022 + build_type: arm64-Release + arch: amd64_arm64 + - os: windows-2022 + build_type: arm64ec-Debug + arch: amd64_arm64 + - os: windows-2022 + build_type: arm64ec-Release + arch: amd64_arm64 + + steps: + - uses: actions/checkout@v4 + + - name: 'Install Ninja' + run: choco install ninja + + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + + - name: 'Configure CMake' + working-directory: ${{ github.workspace }} + run: cmake --preset=${{ matrix.build_type }} + + - name: 'Build' + working-directory: ${{ github.workspace }} + run: cmake --build out\build\${{ matrix.build_type }} + + - if: matrix.arch != 'amd64_arm64' + name: 'Configure CMake (Spectre)' + working-directory: ${{ github.workspace }} + run: cmake --preset=${{ matrix.build_type }} -DENABLE_SPECTRE_MITIGATION=ON + + - if: matrix.arch != 'amd64_arm64' + name: 'Build (Spectre)' + working-directory: ${{ github.workspace }} + run: cmake --build out\build\${{ matrix.build_type }} diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml new file mode 100644 index 0000000..21efa54 --- /dev/null +++ b/.github/workflows/msbuild.yml @@ -0,0 +1,62 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkId=248926 + +name: MSBuild + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths-ignore: + - '*.md' + - LICENSE + - '.nuget/*' + - build/* + +permissions: + contents: read + +jobs: + build: + runs-on: windows-${{ matrix.vs }} + + strategy: + fail-fast: false + + matrix: + vs: [2019, 2022] + build_type: [Debug, Release] + platform: [x86, x64, ARM64] + + steps: + - uses: actions/checkout@v4 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - if: matrix.platform != 'ARM64' + name: Build + working-directory: ${{ github.workspace }} + run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}.sln + + - name: 'Build (Windows 10)' + working-directory: ${{ github.workspace }} + run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln + + - if: matrix.vs == '2022' + name: 'Build (UWP)' + working-directory: ${{ github.workspace }} + run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Windows10_2022.sln + + - if: matrix.platform != 'ARM64' + name: 'Build (Spectre)' + working-directory: ${{ github.workspace }} + run: msbuild /m /p:SpectreMitigation=Spectre /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}.sln + + - if: matrix.platform != 'ARM64' + name: 'Build (Spectre Windows 10)' + working-directory: ${{ github.workspace }} + run: msbuild /m /p:SpectreMitigation=Spectre /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml new file mode 100644 index 0000000..4540c8f --- /dev/null +++ b/.github/workflows/msvc.yml @@ -0,0 +1,76 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkId=248926 + +name: Microsoft C++ Code Analysis + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths-ignore: + - '*.md' + - LICENSE + - '.nuget/*' + - build/*.cmd + - build/*.json + - build/*.props + - build/*.ps1 + - build/*.targets + - build/*.yml + schedule: + - cron: '41 16 * * 1' + +permissions: + contents: read + +jobs: + analyze: + permissions: + contents: read + security-events: write + actions: read + name: Analyze + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: amd64 + + - name: Configure CMake + working-directory: ${{ github.workspace }} + run: cmake -B out -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON + + - name: 'Build Shaders (BC)' + shell: cmd + working-directory: ./DirectXTex/Shaders + run: CompileShaders.cmd + env: + CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled + + - name: 'Build Shaders (DDSVIEW)' + shell: cmd + working-directory: ./DDSView + run: hlsl.cmd + env: + CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled + + - name: Initialize MSVC Code Analysis + uses: microsoft/msvc-code-analysis-action@v0.1.1 + id: run-analysis + with: + cmakeBuildDirectory: ./out + buildConfiguration: Debug + ruleset: NativeRecommendedRules.ruleset + + # Upload SARIF file to GitHub Code Scanning Alerts + - name: Upload SARIF to GitHub + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: ${{ steps.run-analysis.outputs.sarif }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..dd65885 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,100 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkId=248926 + +name: 'CTest (Windows)' + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths-ignore: + - '*.md' + - LICENSE + - '.nuget/*' + - build/*.cmd + - build/*.json + - build/*.props + - build/*.ps1 + - build/*.targets + - build/*.yml + +env: + DIRECTXTEX_MEDIA_PATH: ${{ github.workspace }}/Media + +jobs: + build: + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + + strategy: + fail-fast: false + + matrix: + os: [windows-2019, windows-2022] + build_type: [x64-Debug, x64-Release, x64-Debug-Clang, x64-Release-Clang] + arch: [amd64] + include: + - os: windows-2019 + build_type: x86-Debug + arch: amd64_x86 + - os: windows-2019 + build_type: x86-Release + arch: amd64_x86 + - os: windows-2019 + build_type: x86-Debug-Clang + arch: amd64_x86 + - os: windows-2019 + build_type: x86-Release-Clang + arch: amd64_x86 + - os: windows-2022 + build_type: x86-Debug + arch: amd64_x86 + - os: windows-2022 + build_type: x86-Release + arch: amd64_x86 + - os: windows-2022 + build_type: x86-Debug-Clang + arch: amd64_x86 + - os: windows-2022 + build_type: x86-Release-Clang + arch: amd64_x86 + - os: windows-2022 + build_type: arm64-Debug + arch: amd64_arm64 + - os: windows-2022 + build_type: arm64-Release + arch: amd64_arm64 + - os: windows-2022 + build_type: arm64ec-Debug + arch: amd64_arm64 + - os: windows-2022 + build_type: arm64ec-Release + arch: amd64_arm64 + + steps: + - uses: actions/checkout@v4 + + - name: Clone test repository + uses: actions/checkout@v4 + with: + repository: walbourn/directxtextest + path: Tests + ref: main + + - name: 'Install Ninja' + run: choco install ninja + + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + + - name: 'Configure CMake' + working-directory: ${{ github.workspace }} + run: cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF + + - name: 'Build' + working-directory: ${{ github.workspace }} + run: cmake --build out\build\${{ matrix.build_type }} diff --git a/CMakePresets.json b/CMakePresets.json index 66866bd..386c237 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -240,12 +240,12 @@ "hidden": true }, - { "name": "x64-Debug" , "description": "MSVC for x64 (Debug) with DX12", "inherits": [ "base", "x64", "Debug", "MSVC" ] }, - { "name": "x64-Release" , "description": "MSVC for x64 (Release) with DX12", "inherits": [ "base", "x64", "Release", "MSVC" ] }, - { "name": "x86-Debug" , "description": "MSVC for x86 (Debug) with DX12", "inherits": [ "base", "x86", "Debug", "MSVC" ] }, - { "name": "x86-Release" , "description": "MSVC for x86 (Release) with DX12", "inherits": [ "base", "x86", "Release", "MSVC" ] }, - { "name": "arm64-Debug" , "description": "MSVC for ARM64 (Debug) with DX12", "inherits": [ "base", "ARM64", "Debug", "MSVC" ] }, - { "name": "arm64-Release", "description": "MSVC for ARM64 (Release) with DX12", "inherits": [ "base", "ARM64", "Release", "MSVC" ] }, + { "name": "x64-Debug" , "description": "MSVC for x64 (Debug) with DX12", "inherits": [ "base", "x64", "Debug", "MSVC" ] }, + { "name": "x64-Release" , "description": "MSVC for x64 (Release) with DX12", "inherits": [ "base", "x64", "Release", "MSVC" ] }, + { "name": "x86-Debug" , "description": "MSVC for x86 (Debug) with DX12", "inherits": [ "base", "x86", "Debug", "MSVC" ] }, + { "name": "x86-Release" , "description": "MSVC for x86 (Release) with DX12", "inherits": [ "base", "x86", "Release", "MSVC" ] }, + { "name": "arm64-Debug" , "description": "MSVC for ARM64 (Debug) with DX12", "inherits": [ "base", "ARM64", "Debug", "MSVC" ] }, + { "name": "arm64-Release" , "description": "MSVC for ARM64 (Release) with DX12", "inherits": [ "base", "ARM64", "Release", "MSVC" ] }, { "name": "arm64ec-Debug" , "description": "MSVC for ARM64EC (Debug) with DX12", "inherits": [ "base", "ARM64EC", "Debug", "MSVC" ], "environment": { "CXXFLAGS": "/arm64EC" } }, { "name": "arm64ec-Release", "description": "MSVC for ARM64EC (Release) with DX12", "inherits": [ "base", "ARM64EC", "Release", "MSVC" ], "environment": { "CXXFLAGS": "/arm64EC" } }, @@ -347,12 +347,12 @@ { "name": "x64-Fuzzing" , "description": "MSVC for x64 (Release) with ASan", "inherits": [ "base", "x64", "Release", "MSVC", "Fuzzing" ] } ], "testPresets": [ - { "name": "x64-Debug" , "configurePreset": "x64-Debug" }, - { "name": "x64-Release" , "configurePreset": "x64-Release" }, - { "name": "x86-Debug" , "configurePreset": "x86-Debug" }, - { "name": "x86-Release" , "configurePreset": "x86-Release" }, - { "name": "arm64-Debug" , "configurePreset": "arm64-Debug" }, - { "name": "arm64-Release", "configurePreset": "arm64-Release" }, + { "name": "x64-Debug" , "configurePreset": "x64-Debug" }, + { "name": "x64-Release" , "configurePreset": "x64-Release" }, + { "name": "x86-Debug" , "configurePreset": "x86-Debug" }, + { "name": "x86-Release" , "configurePreset": "x86-Release" }, + { "name": "arm64-Debug" , "configurePreset": "arm64-Debug" }, + { "name": "arm64-Release" , "configurePreset": "arm64-Release" }, { "name": "arm64ec-Debug" , "configurePreset": "arm64ec-Debug" }, { "name": "arm64ec-Release", "configurePreset": "arm64ec-Release" }, diff --git a/Texassemble/texassemble.cpp b/Texassemble/texassemble.cpp index 6a20f50..d3cf3f2 100644 --- a/Texassemble/texassemble.cpp +++ b/Texassemble/texassemble.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp index 360f28b..c896234 100644 --- a/Texconv/texconv.cpp +++ b/Texconv/texconv.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/Texdiag/texdiag.cpp b/Texdiag/texdiag.cpp index dc9c224..4a8d530 100644 --- a/Texdiag/texdiag.cpp +++ b/Texdiag/texdiag.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index bd575ac..2eff1c6 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -3,7 +3,7 @@ # # http://go.microsoft.com/fwlink/?LinkId=248926 -# Builds the library using CMake. +# Builds the library using CMake with VS Generator (GitHub Actions covers Ninja). schedules: - cron: "0 5 * * *" @@ -20,6 +20,7 @@ trigger: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json @@ -35,6 +36,7 @@ pr: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json diff --git a/build/DirectXTex-GitHub-CMake-Xbox.yml b/build/DirectXTex-GitHub-CMake-Xbox.yml index d9926be..c41f7b8 100644 --- a/build/DirectXTex-GitHub-CMake-Xbox.yml +++ b/build/DirectXTex-GitHub-CMake-Xbox.yml @@ -20,6 +20,7 @@ trigger: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json @@ -35,6 +36,7 @@ pr: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json diff --git a/build/DirectXTex-GitHub-CMake.yml b/build/DirectXTex-GitHub-CMake.yml index f749b12..5784b02 100644 --- a/build/DirectXTex-GitHub-CMake.yml +++ b/build/DirectXTex-GitHub-CMake.yml @@ -3,7 +3,7 @@ # # http://go.microsoft.com/fwlink/?LinkId=248926 -# Builds the library using CMake. +# Builds the library using CMake with VS Generator (GitHub Actions covers Ninja). schedules: - cron: "0 5 * * *" @@ -20,6 +20,7 @@ trigger: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json @@ -35,6 +36,7 @@ pr: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json diff --git a/build/DirectXTex-GitHub-Dev17.yml b/build/DirectXTex-GitHub-Dev17.yml index f396981..5a39c05 100644 --- a/build/DirectXTex-GitHub-Dev17.yml +++ b/build/DirectXTex-GitHub-Dev17.yml @@ -12,44 +12,15 @@ schedules: include: - main -trigger: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - CMake* - - '.nuget/*' - - build/*.cmake - - build/*.cmd - - build/*.in - - build/*.json - - build/*.props - - build/*.ps1 - - build/*.targets - - Auxiliary/* - +# GitHub Actions handles MSBuild for CI/PR +trigger: none pr: branches: include: - main paths: - exclude: - - '*.md' - - LICENSE - - CMake* - - '.nuget/*' - - build/*.cmake - - build/*.cmd - - build/*.in - - build/*.json - - build/*.props - - build/*.ps1 - - build/*.targets - - Auxiliary/* - drafts: false + include: + - build/DirectXTex-GitHub-Dev17.yml resources: repositories: diff --git a/build/DirectXTex-GitHub-GDK.yml b/build/DirectXTex-GitHub-GDK.yml index 28a7b9d..2456d43 100644 --- a/build/DirectXTex-GitHub-GDK.yml +++ b/build/DirectXTex-GitHub-GDK.yml @@ -23,6 +23,7 @@ trigger: - '*.md' - LICENSE - CMake* + - '.github/*' - '.nuget/*' - build/*.cmake - build/*.cmd @@ -39,6 +40,7 @@ pr: - '*.md' - LICENSE - CMake* + - '.github/*' - '.nuget/*' - build/*.cmake - build/*.cmd diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index f42d13f..996aaa3 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -20,6 +20,7 @@ trigger: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json @@ -35,6 +36,7 @@ pr: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json diff --git a/build/DirectXTex-GitHub-Test-Dev17.yml b/build/DirectXTex-GitHub-Test-Dev17.yml index 3f8509d..e02d00f 100644 --- a/build/DirectXTex-GitHub-Test-Dev17.yml +++ b/build/DirectXTex-GitHub-Test-Dev17.yml @@ -12,8 +12,8 @@ schedules: include: - main +# GitHub Actions handles test suite for CI/PR trigger: none - pr: branches: include: diff --git a/build/DirectXTex-GitHub-Test.yml b/build/DirectXTex-GitHub-Test.yml index 6af4fab..212322c 100644 --- a/build/DirectXTex-GitHub-Test.yml +++ b/build/DirectXTex-GitHub-Test.yml @@ -12,43 +12,15 @@ schedules: include: - main -trigger: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - CMake* - - '.nuget/*' - - build/*.cmake - - build/*.cmd - - build/*.in - - build/*.json - - build/*.props - - build/*.ps1 - - build/*.targets - - Auxiliary/* +# GitHub Actions handles test suite for CI/PR +trigger: none pr: branches: include: - main paths: - exclude: - - '*.md' - - LICENSE - - CMake* - - '.nuget/*' - - build/*.cmake - - build/*.cmd - - build/*.in - - build/*.json - - build/*.props - - build/*.ps1 - - build/*.targets - - Auxiliary/* - drafts: false + include: + - build/DirectXTex-GitHub-Test.yml resources: repositories: diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index 97fb182..71e7069 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -20,6 +20,7 @@ trigger: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json @@ -35,6 +36,7 @@ pr: exclude: - '*.md' - LICENSE + - '.github/*' - '.nuget/*' - build/*.cmd - build/*.json diff --git a/build/DirectXTex-GitHub.yml b/build/DirectXTex-GitHub.yml index 617e470..79f4f52 100644 --- a/build/DirectXTex-GitHub.yml +++ b/build/DirectXTex-GitHub.yml @@ -6,50 +6,21 @@ # Builds the library for Windows Desktop and UWP. schedules: -- cron: "0 3 * * *" +- cron: "5 3 * * *" displayName: 'Nightly build' branches: include: - main -trigger: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - CMake* - - '.nuget/*' - - build/*.cmake - - build/*.cmd - - build/*.in - - build/*.json - - build/*.props - - build/*.ps1 - - build/*.targets - - Auxiliary/* - +# GitHub Actions handles MSBuild for CI/PR +trigger: none pr: branches: include: - main paths: - exclude: - - '*.md' - - LICENSE - - CMake* - - '.nuget/*' - - build/*.cmake - - build/*.cmd - - build/*.in - - build/*.json - - build/*.props - - build/*.ps1 - - build/*.targets - - Auxiliary/* - drafts: false + include: + - build/DirectXTex-GitHub.yml resources: repositories: diff --git a/build/DirectXTex-SDL.yml b/build/DirectXTex-SDL.yml index 6b4ae3e..2a48637 100644 --- a/build/DirectXTex-SDL.yml +++ b/build/DirectXTex-SDL.yml @@ -12,8 +12,8 @@ schedules: include: - main +# GitHub Actions handles CodeQL and PREFAST for CI/PR trigger: none - pr: branches: include: