SID history param aliases #108
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: CI Build | |
| permissions: | |
| contents: read | |
| actions: read | |
| checks: write | |
| on: | |
| push: | |
| paths: | |
| - 'Src/**' | |
| - '.github/workflows/autobuild.yml' | |
| jobs: | |
| build: | |
| name: 'Build' | |
| runs-on: windows-2025-vs2026 | |
| timeout-minutes: 10 | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: x64 # default is x86 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| # Platform-specific IJW hosts from previous .NET SDKs are used when building C++/CLI projects. | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| cache: true | |
| cache-dependency-path: 'Src/*/packages.lock.json' | |
| - name: Restore NuGet Packages | |
| working-directory: Src | |
| run: msbuild.exe DSInternals.slnx -target:Restore -property:RestorePackagesConfig=true -property:Configuration=Debug -property:Platform=x64 | |
| - name: Build x86 | |
| working-directory: Src | |
| run: msbuild.exe DSInternals.ArchitectureSpecific.slnf -target:Build -property:Configuration=Debug -property:Platform=Win32 -property:RestorePackages=false | |
| - name: Build ARM64 | |
| working-directory: Src | |
| run: msbuild.exe DSInternals.ArchitectureSpecific.slnf -target:Build -property:Configuration=Debug -property:Platform=ARM64 -property:RestorePackages=false | |
| - name: Build AMD64 | |
| working-directory: Src | |
| run: msbuild.exe DSInternals.slnx -target:Build -property:Configuration=Debug -property:Platform=x64 -property:RestorePackages=false | |
| - name: Create Module Catalog | |
| shell: powershell | |
| working-directory: Build/bin/DSInternals.PowerShell/Debug | |
| run: New-FileCatalog -CatalogVersion 2 -Path DSInternals -CatalogFilePath .\DSInternals\DSInternals.cat | |
| - name: Create Managed NuGet Packages | |
| working-directory: Src | |
| run: | | |
| dotnet pack DSInternals.DotNetSdk.slnf --configuration Debug --no-build | |
| - name: Create Mixed NuGet Package | |
| working-directory: Src | |
| run: | | |
| msbuild.exe DSInternals.Replication -target:Pack -property:Configuration=Debug -property:Platform=x64 -property:RestorePackages=false -property:NoBuild=true -property:BuildProjectReferences=false | |
| - name: Run Unit Tests | |
| working-directory: Src | |
| run: | | |
| dotnet test --solution DSInternals.TestsOnly.slnf --configuration Debug --no-build -- --report-trx --results-directory "${{ github.workspace }}/TestResults" | |
| - name: Run PowerShell Desktop Tests | |
| working-directory: Scripts | |
| shell: powershell | |
| run: ./Invoke-SmokeTests.ps1 -Configuration 'Debug' | |
| - name: Run PowerShell Core Tests | |
| working-directory: Scripts | |
| shell: pwsh | |
| run: ./Invoke-SmokeTests.ps1 -Configuration 'Debug' | |
| - name: Upload Test Results as Artifact | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: TestResults | |
| path: TestResults/* | |
| - name: Generate Unit Test Report | |
| uses: dorny/test-reporter@v2 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: MSTest | |
| reporter: dotnet-trx | |
| path: TestResults/*.trx | |
| use-actions-summary: true | |
| badge-title: Unit Tests | |
| - name: Get PowerShell Module Version | |
| shell: pwsh | |
| id: get-module-version | |
| run: | | |
| $version = (Test-ModuleManifest -Path ./Src/DSInternals.PowerShell/DSInternals.psd1 -ErrorAction SilentlyContinue).Version | |
| echo "version=$version" >> $env:GITHUB_OUTPUT | |
| - name: Upload PowerShell Module as Artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: DSInternals_v${{ steps.get-module-version.outputs.version }}_debug | |
| path: Build/bin/DSInternals.PowerShell/Debug | |
| - name: Upload NuGet Packages as Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: NuGet_v${{ steps.get-module-version.outputs.version }}_debug | |
| path: Build/package/debug/*nupkg | |
| - name: Create Chocolatey Package | |
| shell: pwsh | |
| run: | | |
| choco pack Src/DSInternals.PowerShell/Chocolatey/dsinternals-psmodule.nuspec --version=${{ steps.get-module-version.outputs.version }} --output-directory=Build/package/Chocolatey --execution-timeout=60 --confirm configuration=Debug | |
| - name: Upload Chocolatey Package as Artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Chocolatey_v${{ steps.get-module-version.outputs.version }}_debug | |
| path: Build/package/Chocolatey/*.nupkg |