Skip to content

testing changes for windows sdk #1063

testing changes for windows sdk

testing changes for windows sdk #1063

Workflow file for this run

name: CodeQL (daily)
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
push:
branches:
- '**'
jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
security-events: write # for github/codeql-action/analyze to upload SARIF results
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Visual Studio Build Tools
uses: microsoft/setup-msbuild@v1
- name: Set up Windows SDK
uses: ilammy/msvc-dev-cmd@v1
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java, c-cpp
debug: true
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build native C++ code (Windows-specific)
shell: powershell
run: |
# Find the Windows SDK path and use it
$winSdkPath = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\include" | Select-Object -Last 1).FullName
Write-Host "Using Windows SDK from path: $winSdkPath"
# Set environment variables for Windows SDK and Visual Studio
$env:APPINSIGHTS_WIN10_SDK_PATH = "C:\Program Files (x86)\Windows Kits\10"
$env:APPINSIGHTS_VS_PATH = $env:VsInstallRoot
# Log environment for debugging
Write-Host "APPINSIGHTS_WIN10_SDK_PATH: $env:APPINSIGHTS_WIN10_SDK_PATH"
Write-Host "APPINSIGHTS_VS_PATH: $env:APPINSIGHTS_VS_PATH"
./gradlew "-Dai.etw.native.build=release" :etw:native:build --info
- name: Assemble
# skipping build cache is needed so that all modules will be analyzed
run: ./gradlew assemble --no-build-cache
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
scheduled-job-notification:
permissions:
issues: write
needs:
- analyze
if: always()
uses: ./.github/workflows/reusable-scheduled-job-notification.yml
with:
success: ${{ needs.analyze.result == 'success' }}