Repository navigation
Add Make-native test target across all examples
#170
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build ROCm Programming Guide VS | |
| on: | |
| push: | |
| branches: [ amd-staging, amd-mainline, release/** ] | |
| paths: | |
| - 'Programming-Guide/**' | |
| - '.github/workflows/**' | |
| - 'Scripts/VisualStudio/**' | |
| pull_request: | |
| branches: [ amd-staging, amd-mainline, release/** ] | |
| paths: | |
| - 'Programming-Guide/**' | |
| - '.github/workflows/**' | |
| - 'Scripts/VisualStudio/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| PLATFORM_TOOLSET_VERSION: 6.4 | |
| HIP_PATH: C:\Program Files\AMD\ROCm\6.4\ | |
| HIPSDK_INSTALLER_VERSION: 25.Q3 | |
| VULKAN_SDK: C:\VulkanSDK\1.4.313.2\ | |
| GLFW_DIR: C:\glfw-3.4.bin.WIN64\ | |
| jobs: | |
| build: | |
| name: "Build ROCm Programming Guide VS" | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: pwsh | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: microsoft/setup-msbuild@v2 | |
| - name: Install Python dependencies | |
| run: | | |
| python3 -m pip install rich | |
| - name: Check GUID | |
| run: | | |
| python3 Scripts/VisualStudio/check_vs_files.py | |
| - name: Install HIP SDK | |
| run: | | |
| $ProgressPreference = 'SilentlyContinue' | |
| Write-Host "Downloading installer https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-Win10-Win11-For-HIP.exe" | |
| Invoke-WebRequest -Uri https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-Win10-Win11-For-HIP.exe -OutFile HIPSDK.exe | |
| Write-Host "Installing HIP SDK" | |
| Start-Process HIPSDK.exe -ArgumentList '-install','-log',"$((Get-Location).Path)\installer_log.txt" -NoNewWindow -Wait | |
| Write-Host "Installer log:" | |
| Get-Content "installer_log.txt" | |
| if (Test-Path -Path "${{ env.HIP_PATH }}") { | |
| Write-Host "HIP_PATH directory exists: ${{ env.HIP_PATH }}" | |
| Write-Host "HIP SDK installed successfully" | |
| } else { | |
| Write-Host "HIP_PATH directory DOES NOT exist: ${{ env.HIP_PATH }}" | |
| Write-Host "HIP SDK installation failed" | |
| Exit 1 | |
| } | |
| - name: Build ${{ matrix.config }} x64 | |
| run: | | |
| Write-Host "Replace toolset $((Get-ChildItem -Recurse -File | Get-Content | Select-String -Pattern 'HIP clang .\..' | Select-Object -First 1).Matches.Value) with HIP clang ${{ env.PLATFORM_TOOLSET_VERSION }}" | |
| Get-ChildItem -Recurse -File | Where-Object { Select-String -Pattern 'HIP clang .\..' -Path $_ } | ForEach-Object { | |
| (Get-Content -Path $_.FullName) -replace 'HIP clang .\..', "HIP clang ${{ env.PLATFORM_TOOLSET_VERSION }}" | Set-Content -Path $_.FullName | |
| } | |
| msbuild Scripts\VisualStudio\build.proj -maxCpuCount -detailedSummary -property:"Category=Programming-Guide;Configuration=${{ matrix.config }};Platform=x64" | |
| Write-Host "msbuild returned: $LastExitCode" | |
| Exit $LastExitCode |