|
21 | 21 | steps: |
22 | 22 | - name: Restore ripgrep host tool |
23 | 23 | id: cache-rg |
24 | | - uses: actions/cache@v4 |
| 24 | + uses: actions/cache@v5 |
25 | 25 | with: |
26 | 26 | path: ${{ runner.temp }}\ripgrep-14.1.1-x86_64-pc-windows-msvc |
27 | 27 | key: ripgrep-14.1.1-x86_64-pc-windows-msvc |
@@ -154,13 +154,13 @@ jobs: |
154 | 154 | "shouldPublishNscRelease=$shouldPublishNscRelease" >> $env:GITHUB_OUTPUT |
155 | 155 |
|
156 | 156 | - name: Checkout |
157 | | - uses: actions/checkout@v4 |
| 157 | + uses: actions/checkout@v6 |
158 | 158 | with: |
159 | 159 | submodules: 'recursive' |
160 | 160 |
|
161 | 161 | - name: Restore ripgrep host tool |
162 | 162 | id: cache-rg |
163 | | - uses: actions/cache@v4 |
| 163 | + uses: actions/cache@v5 |
164 | 164 | with: |
165 | 165 | path: ${{ runner.temp }}\ripgrep-14.1.1-x86_64-pc-windows-msvc |
166 | 166 | key: ripgrep-14.1.1-x86_64-pc-windows-msvc |
@@ -289,7 +289,7 @@ jobs: |
289 | 289 |
|
290 | 290 | - name: Upload Examples result |
291 | 291 | if: ${{ always() }} |
292 | | - uses: actions/upload-artifact@v4 |
| 292 | + uses: actions/upload-artifact@v7 |
293 | 293 | with: |
294 | 294 | name: examples-status-${{ matrix.os }}-${{ matrix.vendor }}-${{ matrix.tag }}-${{ matrix.config }} |
295 | 295 | path: ${{ runner.temp }}/examples-status |
@@ -392,40 +392,40 @@ jobs: |
392 | 392 | } |
393 | 393 |
|
394 | 394 | - name: Upload NSC Godbolt Image artifact |
395 | | - uses: actions/upload-artifact@v4 |
| 395 | + uses: actions/upload-artifact@v7 |
396 | 396 | with: |
397 | 397 | name: ${{ steps.set-prefix.outputs.prefix }}-nsc-godbolt-image |
398 | 398 | path: ${{ steps.set-prefix.outputs.prefix }}-nsc-godbolt-image.tar.zst |
399 | 399 | compression-level: 0 |
400 | 400 |
|
401 | 401 | - name: Upload NSC runtime bundle artifact |
402 | 402 | if: steps.set-prefix.outputs.shouldPrepareNsc == 'True' |
403 | | - uses: actions/upload-artifact@v4 |
| 403 | + uses: actions/upload-artifact@v7 |
404 | 404 | with: |
405 | 405 | name: ${{ steps.set-prefix.outputs.nscArtifactName }} |
406 | 406 | path: build-ct/nsc-release/payload |
407 | 407 |
|
408 | 408 | - name: Upload NSC manifest zip artifact |
409 | 409 | if: steps.set-prefix.outputs.shouldPrepareNsc == 'True' |
410 | | - uses: actions/upload-artifact@v4 |
| 410 | + uses: actions/upload-artifact@v7 |
411 | 411 | with: |
412 | 412 | name: ${{ steps.set-prefix.outputs.nscManifestArtifactName }} |
413 | 413 | path: build-ct/nsc-release/${{ steps.set-prefix.outputs.nscChannel }}-manifests.zip |
414 | 414 |
|
415 | 415 | - name: Upload profiling artifacts |
416 | | - uses: actions/upload-artifact@v4 |
| 416 | + uses: actions/upload-artifact@v7 |
417 | 417 | with: |
418 | 418 | name: ${{ steps.set-prefix.outputs.prefix }}-profiling |
419 | 419 | path: ${{ steps.set-prefix.outputs.prefix }}-profiling.tar |
420 | 420 |
|
421 | 421 | - name: Upload install artifacts |
422 | | - uses: actions/upload-artifact@v4 |
| 422 | + uses: actions/upload-artifact@v7 |
423 | 423 | with: |
424 | 424 | name: ${{ steps.set-prefix.outputs.prefix }}-install |
425 | 425 | path: ${{ steps.set-prefix.outputs.prefix }}-install.tar |
426 | 426 |
|
427 | 427 | - name: Upload source artifacts |
428 | | - uses: actions/upload-artifact@v4 |
| 428 | + uses: actions/upload-artifact@v7 |
429 | 429 | with: |
430 | 430 | name: ${{ steps.set-prefix.outputs.prefix }}-source |
431 | 431 | path: ${{ steps.set-prefix.outputs.prefix }}-source.tar |
@@ -459,7 +459,7 @@ jobs: |
459 | 459 |
|
460 | 460 | steps: |
461 | 461 | - name: Download Examples result |
462 | | - uses: actions/download-artifact@v4 |
| 462 | + uses: actions/download-artifact@v8 |
463 | 463 | with: |
464 | 464 | name: examples-status-${{ matrix.os }}-${{ matrix.vendor }}-${{ matrix.tag }}-${{ matrix.config }} |
465 | 465 | path: examples-status |
@@ -519,7 +519,7 @@ jobs: |
519 | 519 |
|
520 | 520 | steps: |
521 | 521 | - name: Checkout |
522 | | - uses: actions/checkout@v4 |
| 522 | + uses: actions/checkout@v6 |
523 | 523 |
|
524 | 524 | - name: Create Build Badge |
525 | 525 | run: | |
@@ -569,13 +569,53 @@ jobs: |
569 | 569 | $imageBadge | Set-Content -Path "$imagePath/image-badge.json" -Encoding utf8 |
570 | 570 |
|
571 | 571 | - name: Deploy Badges |
572 | | - uses: peaceiris/actions-gh-pages@v3 |
573 | | - with: |
574 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
575 | | - publish_branch: badges |
576 | | - publish_dir: .badge-public |
577 | | - keep_files: true |
578 | | - commit_message: "[CI] badges update" |
| 572 | + shell: pwsh |
| 573 | + env: |
| 574 | + PUSH_TOKEN: ${{ github.token }} |
| 575 | + run: | |
| 576 | + $publishDir = (Resolve-Path ".badge-public").Path |
| 577 | + $workDir = Join-Path $env:RUNNER_TEMP "badges-publish" |
| 578 | + $repoUrl = "https://x-access-token:$env:[email protected]/${{ github.repository }}.git" |
| 579 | +
|
| 580 | + if (Test-Path $workDir) { |
| 581 | + Remove-Item -Recurse -Force $workDir |
| 582 | + } |
| 583 | +
|
| 584 | + & git clone --depth 1 --branch badges $repoUrl $workDir |
| 585 | + $cloneSucceeded = $LASTEXITCODE -eq 0 |
| 586 | +
|
| 587 | + if (-not $cloneSucceeded) { |
| 588 | + if (Test-Path $workDir) { |
| 589 | + Remove-Item -Recurse -Force $workDir |
| 590 | + } |
| 591 | + New-Item -ItemType Directory -Force -Path $workDir | Out-Null |
| 592 | + Push-Location $workDir |
| 593 | + git init |
| 594 | + git remote add origin $repoUrl |
| 595 | + git checkout --orphan badges |
| 596 | + Pop-Location |
| 597 | + } |
| 598 | +
|
| 599 | + & robocopy $publishDir $workDir /E /NFL /NDL /NJH /NJS /NP |
| 600 | + if ($LASTEXITCODE -ge 8) { |
| 601 | + throw "robocopy failed with exit code $LASTEXITCODE" |
| 602 | + } |
| 603 | +
|
| 604 | + Push-Location $workDir |
| 605 | + git config user.name "github-actions[bot]" |
| 606 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 607 | +
|
| 608 | + $status = git status --porcelain |
| 609 | + if (-not $status) { |
| 610 | + Write-Host "No badge changes to publish." |
| 611 | + Pop-Location |
| 612 | + exit 0 |
| 613 | + } |
| 614 | +
|
| 615 | + git add . |
| 616 | + git commit -m "[CI] badges update" |
| 617 | + git push origin HEAD:badges |
| 618 | + Pop-Location |
579 | 619 |
|
580 | 620 | deploy-production: |
581 | 621 | name: Deploy Godbolt production image |
@@ -624,25 +664,96 @@ jobs: |
624 | 664 | vendor: [msvc] |
625 | 665 | steps: |
626 | 666 | - name: Checkout smoke |
627 | | - uses: actions/checkout@v4 |
| 667 | + uses: actions/checkout@v6 |
628 | 668 | with: |
629 | 669 | fetch-depth: 1 |
630 | 670 | sparse-checkout: | |
631 | 671 | smoke |
632 | 672 |
|
633 | | - - name: Download VulkanSDK |
634 | | - uses: jakoch/install-vulkan-sdk-action@v1 |
635 | | - with: |
636 | | - install_runtime: true |
637 | | - cache: false |
638 | | - stripdown: true |
639 | | - install_lavapipe: true |
| 673 | + - name: Install Vulkan SDK |
| 674 | + shell: pwsh |
| 675 | + run: | |
| 676 | + $sdkVersion = (Invoke-WebRequest 'https://vulkan.lunarg.com/sdk/latest/windows.txt' -UseBasicParsing).Content.Trim() |
| 677 | + if ([string]::IsNullOrWhiteSpace($sdkVersion)) { |
| 678 | + throw "Failed to resolve the latest Vulkan SDK version." |
| 679 | + } |
| 680 | +
|
| 681 | + $installer = Join-Path $env:RUNNER_TEMP 'vulkan_sdk.exe' |
| 682 | + Invoke-WebRequest -Uri 'https://sdk.lunarg.com/sdk/download/latest/windows/vulkan_sdk.exe?Human=true' -OutFile $installer |
| 683 | +
|
| 684 | + $shaInfo = Invoke-RestMethod -Uri 'https://sdk.lunarg.com/sdk/sha/latest/windows/vulkan_sdk.exe.json' |
| 685 | + if ([string]::IsNullOrWhiteSpace($shaInfo.sha)) { |
| 686 | + throw "Failed to resolve the expected Vulkan SDK installer SHA256." |
| 687 | + } |
| 688 | +
|
| 689 | + $actualSha = (Get-FileHash -LiteralPath $installer -Algorithm SHA256).Hash.ToLowerInvariant() |
| 690 | + $expectedSha = $shaInfo.sha.ToLowerInvariant() |
| 691 | + if ($actualSha -ne $expectedSha) { |
| 692 | + throw "Vulkan SDK installer SHA256 mismatch." |
| 693 | + } |
| 694 | +
|
| 695 | + $sdkRoot = Join-Path 'C:\VulkanSDK' $sdkVersion |
| 696 | + Start-Process -FilePath $installer -ArgumentList @( |
| 697 | + '--root', $sdkRoot, |
| 698 | + '--accept-licenses', |
| 699 | + '--default-answer', |
| 700 | + '--confirm-command', 'install' |
| 701 | + ) -Verb RunAs -Wait |
| 702 | +
|
| 703 | + $vulkanInfo = Get-ChildItem -Path $sdkRoot -Recurse -Filter 'vulkaninfoSDK.exe' -File | Select-Object -First 1 |
| 704 | + if (-not $vulkanInfo) { |
| 705 | + throw "Failed to locate vulkaninfoSDK.exe after installing the Vulkan SDK." |
| 706 | + } |
| 707 | +
|
| 708 | + $sdkBin = Split-Path -Parent $vulkanInfo.FullName |
| 709 | + "VULKAN_VERSION=$sdkVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 710 | + "VULKAN_SDK=$sdkRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 711 | + $sdkBin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 712 | +
|
| 713 | + - name: Install Lavapipe |
| 714 | + shell: pwsh |
| 715 | + env: |
| 716 | + GITHUB_TOKEN: ${{ github.token }} |
| 717 | + run: | |
| 718 | + $headers = @{ |
| 719 | + Authorization = "Bearer $env:GITHUB_TOKEN" |
| 720 | + 'User-Agent' = 'Nabla-CI' |
| 721 | + 'X-GitHub-Api-Version' = '2022-11-28' |
| 722 | + } |
| 723 | +
|
| 724 | + $release = Invoke-RestMethod -Uri 'https://api.github.com/repos/jakoch/rasterizers/releases/latest' -Headers $headers |
| 725 | + $asset = $release.assets | Where-Object { $_.name -like 'lavapipe-win64-*.zip' } | Select-Object -First 1 |
| 726 | + if (-not $asset) { |
| 727 | + throw "Failed to resolve the latest Lavapipe asset." |
| 728 | + } |
| 729 | +
|
| 730 | + $archive = Join-Path $env:RUNNER_TEMP $asset.name |
| 731 | + $extractRoot = 'C:\lavapipe' |
| 732 | + if (Test-Path $extractRoot) { |
| 733 | + Remove-Item -Recurse -Force $extractRoot |
| 734 | + } |
| 735 | +
|
| 736 | + Invoke-WebRequest -Uri $asset.browser_download_url -Headers $headers -OutFile $archive |
| 737 | + Expand-Archive -Path $archive -DestinationPath $extractRoot -Force |
| 738 | +
|
| 739 | + $lavapipeDll = Get-ChildItem -Path $extractRoot -Recurse -Filter 'vulkan_lvp.dll' -File | Select-Object -First 1 |
| 740 | + if (-not $lavapipeDll) { |
| 741 | + throw "Failed to locate vulkan_lvp.dll after extracting Lavapipe." |
| 742 | + } |
| 743 | +
|
| 744 | + $lavapipeRoot = Split-Path -Parent (Split-Path -Parent $lavapipeDll.FullName) |
| 745 | + $icdPath = Join-Path $lavapipeRoot 'share\vulkan\icd.d\lvp_icd.x86_64.json' |
| 746 | + if (-not (Test-Path $icdPath)) { |
| 747 | + throw "Failed to locate the Lavapipe ICD manifest." |
| 748 | + } |
| 749 | +
|
| 750 | + "LAVAPIPE_ROOT=$lavapipeRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
640 | 751 |
|
641 | 752 | - name: Add lavapipe driver |
642 | | - run: reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Drivers" /v "C:\lavapipe\share\vulkan\icd.d\lvp_icd.x86_64.json" /t REG_DWORD /d 0 /f |
| 753 | + run: reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Drivers" /v "$env:LAVAPIPE_ROOT\share\vulkan\icd.d\lvp_icd.x86_64.json" /t REG_DWORD /d 0 /f |
643 | 754 |
|
644 | 755 | - name: Download Nabla install artifact |
645 | | - uses: actions/download-artifact@v4 |
| 756 | + uses: actions/download-artifact@v8 |
646 | 757 | with: |
647 | 758 | name: run-windows-17.13.6-msvc-${{ matrix.config }}-install |
648 | 759 | path: smoke |
|
0 commit comments