V8 version update #10
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
| wname: V8 Build CI | ||
| on: | ||
| workflow_dispatch: | ||
| jobs: | ||
| build: | ||
| runs-on: windows-2022 | ||
| steps: | ||
| - name: Support longpaths | ||
| run: git config --global core.longpaths true | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| submodules: 'recursive' | ||
| - name: Locate VS Installer vs_installer.exe | ||
| id: vsinst | ||
| shell: pwsh | ||
| run: | | ||
| $bootstrap = Join-Path $env:RUNNER_TEMP 'vs_enterprise.exe' | ||
| Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_enterprise.exe' -OutFile $bootstrap | ||
| echo "cmd=$bootstrap" >> $env:GITHUB_OUTPUT | ||
| echo "op=install" >> $env:GITHUB_OUTPUT | ||
| - name: Get VS installation path | ||
| id: vs | ||
| shell: pwsh | ||
| run: | | ||
| $path = vswhere -latest -products * -property installationPath | ||
| if (-not $path) { throw "vswhere could not find Visual Studio" } | ||
| echo "path=$path" >> $env:GITHUB_OUTPUT | ||
| - name: Install MSVC 14.36.32532 | ||
| shell: pwsh | ||
| run: | | ||
| $startInfo = New-Object System.Diagnostics.ProcessStartInfo | ||
| $startInfo.FileName = "${{ steps.vsinst.outputs.cmd }}" | ||
| $startInfo.Arguments = 'modify --installPath "${{ steps.vs.outputs.path }}" --add Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64 --passive --norestart --wait --noUpdateInstaller' | ||
| $process = New-Object System.Diagnostics.Process | ||
| $process.StartInfo = $startInfo | ||
| $process.Start() | ||
| $process.WaitForExit() | ||
| - name: Verify MSVC 14.36 & list Auxiliary\Build | ||
| shell: pwsh | ||
| run: | | ||
| # Verify the installation | ||
| $path = Join-Path '${{ steps.vs.outputs.path }}' 'VC\Auxiliary\Build' | ||
| if (-not (Test-Path $path)) { throw "MSVC 14.36 not found" } | ||
| # List the contents of the Auxiliary\Build folder | ||
| Write-Host "`n=== Contents of $path ===" | ||
| Get-ChildItem -Path $path -Recurse -Force -ErrorAction SilentlyContinue | | ||
| ForEach-Object { Write-Host $_.FullName } | ||
| - name: Ensure MSVC Toolset 14.36.32532 is installed | ||
| uses: TheMrMilchmann/setup-msvc-dev@v3 | ||
| with: | ||
| arch: x64 | ||
| toolset: 14.36.32532 | ||
| - name: Locate VS Installer vs_installer.exe | ||
| if: runner.os == 'Windows' | ||
| id: vsinst | ||
| shell: pwsh | ||
| run: | | ||
| $bootstrap = Join-Path $env:RUNNER_TEMP 'vs_enterprise.exe' | ||
| Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_enterprise.exe' -OutFile $bootstrap | ||
| echo "cmd=$bootstrap" >> $env:GITHUB_OUTPUT | ||
| echo "op=install" >> $env:GITHUB_OUTPUT | ||
| - name: Get VS installation path | ||
| if: runner.os == 'Windows' | ||
| id: vs | ||
| shell: pwsh | ||
| run: | | ||
| $path = vswhere -latest -products * -property installationPath | ||
| if (-not $path) { throw "vswhere could not find Visual Studio" } | ||
| echo "path=$path" >> $env:GITHUB_OUTPUT | ||
| - name: Install MSVC 14.36.32532 | ||
| if: runner.os == 'Windows' | ||
| shell: pwsh | ||
| run: | | ||
| $startInfo = New-Object System.Diagnostics.ProcessStartInfo | ||
| $startInfo.FileName = "${{ steps.vsinst.outputs.cmd }}" | ||
| $startInfo.Arguments = 'modify --installPath "${{ steps.vs.outputs.path }}" --add Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64 --passive --norestart --wait --noUpdateInstaller' | ||
| $process = New-Object System.Diagnostics.Process | ||
| $process.StartInfo = $startInfo | ||
| $process.Start() | ||
| $process.WaitForExit() | ||
| - name: Verify MSVC 14.36 & list Auxiliary\Build | ||
| if: runner.os == 'Windows' | ||
| shell: pwsh | ||
| run: | | ||
| # Verify the installation | ||
| $path = Join-Path '${{ steps.vs.outputs.path }}' 'VC\Auxiliary\Build' | ||
| if (-not (Test-Path $path)) { throw "MSVC 14.36 not found" } | ||
| # List the contents of the Auxiliary\Build folder | ||
| Write-Host "`n=== Contents of $path ===" | ||
| Get-ChildItem -Path $path -Recurse -Force -ErrorAction SilentlyContinue | | ||
| ForEach-Object { Write-Host $_.FullName } | ||
| - name: Ensure MSVC Toolset 14.36.32532 is installed | ||
| if: runner.os == 'Windows' | ||
| uses: TheMrMilchmann/setup-msvc-dev@v3 | ||
| with: | ||
| arch: x64 | ||
| toolset: 14.36.32532 | ||
| - name: Prepare Depot and build V8 | ||
| working-directory: ${{ github.workspace }} | ||
| run: | | ||
| .\build\prepare-depot.ps1 && .\build\build.ps1 | ||
| - name: Upload artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: release_build | ||
| path: build_results/*.lib | ||
| - name: Create draft release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| draft: true | ||
| name: ${{ format('build-{0}', github.run_id) }} | ||
| tag_name: ${{ format('build-{0}', github.run_id) }} | ||
| files: build_results/*.lib | ||