Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
361e361
Update .NET version in CI workflow to 10.0.x
marko-stanojevic Feb 19, 2026
0779af0
Set DOTNET_ROOT for PowerShell and add .NET info checks in CI workflow
marko-stanojevic Feb 19, 2026
0fa2866
Add PowerShell 7.5.4 installation step to CI workflow
marko-stanojevic Feb 19, 2026
7b4ba85
Update Pester installation and enhance .NET runtime verification in C…
marko-stanojevic Feb 19, 2026
3dbeac5
Remove minimum version constraint for Pester installation in CI workflow
marko-stanojevic Feb 19, 2026
9656e2f
Update Pester installation command in CI workflow
marko-stanojevic Feb 19, 2026
e465085
Enhance module build process with platform-specific handling and Invo…
marko-stanojevic Feb 19, 2026
3f09773
Enhance CI workflow with build output verification and Pester diagnos…
marko-stanojevic Feb 19, 2026
b862398
Update dependency handling for .NET compatibility
marko-stanojevic Feb 19, 2026
a196411
Enhance build process to include .NET 10 framework assembly copying a…
marko-stanojevic Feb 19, 2026
7841220
Fix output message for bin directory contents in CI workflow
marko-stanojevic Feb 19, 2026
565af05
Fix output message for bin directory contents in CI workflow
marko-stanojevic Feb 19, 2026
8018561
Refactor CI workflow and build script by removing redundant .NET 10 a…
marko-stanojevic Feb 19, 2026
7e936a0
Add support for .NET 10 by copying System.Runtime.dll to module folder
marko-stanojevic Feb 19, 2026
92e2946
Refactor CI workflow to dynamically set DOTNET_ROOT and add ARM64 sup…
marko-stanojevic Feb 20, 2026
0bfd1ae
Refactor CI workflow by removing redundant DOTNET_ROOT setup and simp…
marko-stanojevic Feb 20, 2026
3f2a857
Update CI workflow to set DOTNET_ROOT environment variable for integr…
marko-stanojevic Feb 20, 2026
3db81e3
Set DOTNET_ROOT environment variable in integration tests step
marko-stanojevic Feb 20, 2026
a37e53c
Refactor integration tests to remove DOTNET_ROOT setup and enhance Sy…
marko-stanojevic Feb 20, 2026
09536ec
Update build script to copy all System.* framework assemblies for sel…
marko-stanojevic Feb 20, 2026
dcd3bee
Enhance build process to prioritize .NET 10.x runtime versions and up…
marko-stanojevic Feb 20, 2026
27ac3f5
Add .NET environment configuration for integration tests and remove r…
marko-stanojevic Feb 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/ps-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}.${{ steps.gitversion.outputs.MajorMinorPatch }}.nupkg
path: /build/package/${{ github.event.repository.name }}.${{ steps.gitversion.outputs.MajorMinorPatch }}.nupkg
path: build/package/${{ github.event.repository.name }}.${{ steps.gitversion.outputs.MajorMinorPatch }}.nupkg

- name: Upload module bin artifacts
id: upload_bin
Expand Down
52 changes: 42 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'

- name: Restore dependencies
run: dotnet restore
Expand Down Expand Up @@ -124,22 +124,55 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'

- name: Download all build artifacts
uses: actions/download-artifact@v5
with:
name: PSBinaryModule
path: build/out/PSBinaryModule
- name: Build Module
shell: pwsh
run: |
dotnet restore './PSBinaryModule.sln'
dotnet build './PSBinaryModule.sln' --configuration Release --no-restore

if (Get-Command Invoke-Build -ErrorAction SilentlyContinue) {
Invoke-Build -Task Build -Configuration Release
} else {
Install-Module InvokeBuild -Force -SkipPublisherCheck
Invoke-Build -Task Build -Configuration Release
}

- name: Install PowerShell
shell: pwsh
run: |
if ($env:RUNNER_OS -eq 'Linux') {
sudo apt-get update
sudo apt-get install -y powershell
} elseif ($env:RUNNER_OS -eq 'macOS') {
brew install --cask powershell
}

- name: Setup PowerShell
- name: Install Pester
shell: pwsh
run: |
Install-PSResource -Name Pester -TrustRepository -AcceptLicense
Install-Module Pester -Force -SkipPublisherCheck

- name: Configure .NET Environment
shell: pwsh
run: |
$dotnetInfo = & dotnet --info
$sdkPath = $dotnetInfo | Select-String "Base Path:" | ForEach-Object { $_.Line -replace '.*Base Path:\s*', '' }
if ($sdkPath) {
$dotnetRoot = Split-Path -Parent (Split-Path -Parent $sdkPath)
echo "DOTNET_ROOT=$dotnetRoot" >> $env:GITHUB_ENV
echo "DOTNET_MULTILEVEL_LOOKUP=1" >> $env:GITHUB_ENV
Write-Host "DOTNET_ROOT set to: $dotnetRoot"
}

- name: Run Integration Tests
shell: pwsh
env:
DOTNET_ROOT: ${{ env.DOTNET_ROOT }}
DOTNET_MULTILEVEL_LOOKUP: ${{ env.DOTNET_MULTILEVEL_LOOKUP }}
run: |
Import-Module Pester
$config = New-PesterConfiguration @{
Run = @{
Path = './tests/Integration'
Expand All @@ -158,7 +191,6 @@ jobs:
}
}
Invoke-Pester -Configuration $config

- name: Upload test results
uses: actions/upload-artifact@v6
if: always()
Expand Down
10 changes: 7 additions & 3 deletions PSBinaryModule.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,21 @@ task Build Compile, {
Copy-Item -Path "$helpPath/*" -Destination $outputHelpPath -Recurse -Force
}

# Copy dependencies (if any)
# Copy dependencies
$binPath = Join-Path -Path $srcPath -ChildPath "bin/$Configuration"
Get-ChildItem -Path $binPath -Filter '*.dll' | Where-Object {
$_.Name -ne "$moduleName.dll" -and
$_.Name -notmatch '^System\.' -and
$_.Name -notmatch '^Microsoft\.' -and
$_.Name -ne 'PowerShellStandard.Library.dll'
} | ForEach-Object {
Copy-Item -Path $_.FullName -Destination $outputPath -Force
}

# Copy the deps.json file which helps with assembly resolution
$depsFile = Join-Path -Path $binPath -ChildPath "$moduleName.deps.json"
if (Test-Path $depsFile) {
Copy-Item -Path $depsFile -Destination $outputPath -Force
}

Write-Build Green "Module built successfully at: $outputPath"
}

Expand Down
1 change: 1 addition & 0 deletions src/PSBinaryModule.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
<AssemblyName>PSBinaryModule</AssemblyName>
<RootNamespace>PSBinaryModule</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down