more tests #952
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: otel_sdk | |
| # Example: | |
| # git tag -a v1.14.2.dll.x -m "Release 1.14.2.dll.x" && git push --tags | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| branches: | |
| - main | |
| jobs: | |
| otel_sdk_build: | |
| name: build otel_sdk | |
| runs-on: windows-2025 | |
| permissions: | |
| contents: write | |
| steps: | |
| - run: systeminfo | |
| - run: ls "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC" | |
| - run: Get-ChildItem env:* | Sort-Object -Property Name | Format-Table -AutoSize -Wrap | |
| - run: choco uninstall bazel --yes | |
| # - uses: Cyberboss/install-winget@6f566e9e227561d5d31e45d65f9b777b3fa8f56f | |
| - run: winget list --accept-source-agreements --disable-interactivity | |
| - run: cmd /c "winget --info || echo swallowing errors" | |
| - run: cmd /c "winget settings export || echo swallowing errors" | |
| - run: cmd /c "type .github\workflows\winget_settings.json || echo swallowing errors" | |
| - run: cmd /c "echo A=%LOCALAPPDATA% || echo swalloing wrrroe" | |
| - run: cmd /c "dir %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe /s || echo swalloing errors" | |
| - run: cmd /c "type %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json || echo swallowing errors" | |
| - run: cmd /c "copy .github\workflows\winget_settings.json %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json || echo swallowing errors" | |
| - run: cmd /c "type %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json || echo swallowing errors" | |
| - run: cmd /c "winget settings export || echo swallowing errors" | |
| - run: cmd /c "dir c:\ || echo swallowing errors" | |
| - run: cmd /c "dir d:\ || echo swallowing errors" | |
| - run: | | |
| winget remove --all --verbose --force --purge --disable-interactivity Anaconda.Miniconda3 Mozilla.Firefox ShiningLight.OpenSSL.Dev PostgreSQL.PostgreSQL.17 RProject.R RProject.Rtools Unity.UnityHub Amazon.SAM-CLI Microsoft.AzureCLI Microsoft.webpicmd Google.Chrome StrawberryPerl.StrawberryPerl Microsoft.ServiceFabricSDK OpenJS.NodeJS.LTS Amazon.AWSCLI Microsoft.WebDeploy Microsoft.Azure.CosmosEmulator MongoDB.Shell MongoDB.Server WiXToolset.WiXToolset Amazon.SessionManagerPlugin sbt.sbt | |
| echo Done! LASTEXITCODE=$LASTEXITCODE | |
| - run: cmd /c "dir c:\ || echo swallowing errors" | |
| - run: cmd /c "dir d:\ || echo swallowing errors" | |
| - run: winget install bazelisk -r bazel --accept-package-agreements --disable-interactivity --silent | |
| - name: Install LLVM with winget (ignore if already installed) | |
| shell: pwsh | |
| run: | | |
| winget install -e LLVM.LLVM -v 20.1.8 --accept-package-agreements --disable-interactivity --silent | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Host "Winget install failed or not needed (already installed)" | |
| exit 0 | |
| } | |
| - uses: actions/checkout@v5 | |
| - uses: actions/cache/restore@v4 | |
| with: | |
| path: c:/d.vhdx | |
| enableCrossOsArchive: true | |
| key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', 'MODULE.bazel.lock') }} | |
| restore-keys: ${{ runner.os }}-bazel- | |
| - name: mount cache disk | |
| run: | | |
| New-Item -Path c:/d -ItemType "directory" -Force -Verbose | |
| If (-not(Test-Path c:/d.vhdx)) { | |
| $vhd = New-VHD -Path c:/d.vhdx -SizeBytes 137438953472 -Dynamic -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096 -Verbose | |
| $vhd | |
| $mnt = Mount-VHD -Path $vhd.path -NoDriveLetter -Verbose -PassThru | Out-Host | |
| $mnt | |
| $disk = Get-VHD -Path $vhd.path -Verbose | |
| $disk | |
| Initialize-Disk $disk.Number -Verbose | |
| $part = New-Partition -DiskNumber $disk.Number -UseMaximumSize -Verbose | |
| $part | |
| $vol = Format-Volume -FileSystem ReFS -Partition $part -Verbose | |
| $vol | |
| Dismount-VHD -Path c:/d.vhdx -Verbose | |
| } | |
| $part = Mount-VHD -Path c:/d.vhdx -NoDriveLetter -Verbose -PassThru | Get-Disk | Get-Partition | Where-Object -Not IsHidden | |
| $part | |
| $part | Add-PartitionAccessPath -AccessPath c:/d -Verbose | |
| ls c:/d.vhdx | |
| echo empty > c:\d\empty.txt | |
| cmd /c "dir c:\d || echo swallowing errors" | |
| refsutil dedup c:\d /s | |
| - name: build minimal otel_sdk | |
| # On the CI, the github runner does not have constant vs2022 msvc release, but has the same vs2019 (14.29.30133) | |
| run: | | |
| echo "build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133" >> ../top.bazelrc | |
| echo "build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.42.34438" >> ../top.bazelrc | |
| echo "common --remote_download_minimal" >> ../top.bazelrc | |
| echo "build --disk_cache=c:/d" >> ../top.bazelrc | |
| echo "common --repository_cache=c:/r" >> ../top.bazelrc | |
| echo "startup --output_user_root=c:/b" >> ../top.bazelrc | |
| ./otel_sdk_build.cmd minimal | |
| ./otel_sdk_build.cmd shutdown | |
| - run: | | |
| cmd /c "dir c:\ || echo swallowing errors" | |
| cmd /c "dir d:\ || echo swallowing errors" | |
| cmd /c "dir c:\d || echo swallowing errors" | |
| Dismount-VHD -Path "c:/d.vhdx" -Verbose | |
| ls c:/d.vhdx | |
| Resize-VHD -Path "c:/d.vhdx" -ToMinimumSize -Verbose -ErrorAction SilentlyContinue | |
| ls c:/d.vhdx | |
| - uses: actions/cache/save@v4 | |
| # Don't update cache on releases | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| env: | |
| ZSTD_CLEVEL: 1 # 1 (fastest) .. 19 (slowest) | |
| with: | |
| path: c:/d.vhdx | |
| enableCrossOsArchive: true | |
| key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', 'MODULE.bazel.lock') }} | |
| - run: Mount-VHD -Path "c:/d.vhdx" -NoDriveLetter -Verbose -PassThru | Out-Host | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tracing-profiles | |
| path: ./*.tracing.json | |
| if-no-files-found: warn | |
| - run: ./otel_sdk_build.cmd test | |
| - run: cmd /c "dir c:\ || echo swallowing errors" | |
| - run: cmd /c "dir d:\ || echo swallowing errors" | |
| - run: ./otel_sdk_build.cmd zip | |
| - run: ./otel_sdk_build.cmd shutdown | |
| - run: cmd /c "dir c:\ || echo swallowing errors" | |
| - run: cmd /c "dir d:\ || echo swallowing errors" | |
| - run: ls c:/d.vhdx | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| name: sdk | |
| path: ./otel_sdk.zip | |
| if-no-files-found: warn | |
| - name: release otel_sdk.zip | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| uses: ncipollo/release-action@v1 | |
| with: # skipping as test nodll ./0.nodll.tracing.json | |
| artifacts: | | |
| ./otel_sdk.zip | |
| ./1.all.tracing.json | |
| ./2.dbg.tracing.json | |
| ./3.fastbuild.tracing.json | |
| ./4.opt.tracing.json | |
| ./5.pkg.tracing.json |