Skip to content

Commit

Permalink
Update build to support CFS for PowerShell modules
Browse files Browse the repository at this point in the history
And a bunch of clean-ups to the build script, updated SDKs,
removal of PowerShell 7.3 (EOL), and testing PowerShell daily on merge.
  • Loading branch information
andyleejordan committed Aug 26, 2024
1 parent 29c8d0f commit a99180d
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 219 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ jobs:
sparse-checkout: tools/install-powershell.ps1
sparse-checkout-cone-mode: false

- name: Install daily
if: ${{ github.event_name == 'schedule' || github.event_name == 'merge_group' }}
shell: pwsh
run: ./pwsh/tools/install-powershell.ps1 -Daily

- name: Build and test
shell: pwsh
run: Invoke-Build -Configuration Release ${{ github.event_name == 'merge_group' && 'TestFull' || 'Test' }}

- name: Test with daily
- name: Test daily
if: ${{ github.event_name == 'schedule' }}
shell: pwsh
run: ./pwsh/tools/install-powershell.ps1 -Daily && Invoke-Build -Configuration Release TestE2EDaily
run: Invoke-Build -Configuration Release TestE2EDaily

- name: Upload build artifacts
if: always()
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ bin/
obj/
module/PowerShellEditorServices/NOTICE.txt
module/PowerShellEditorServices/Commands/en-US/
module/Plaster/
module/PSReadLine/
module/PSScriptAnalyzer/
TestResults/
22 changes: 10 additions & 12 deletions .pipelines/PowerShellEditorServices-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ parameters:
variables:
system.debug: ${{ parameters.debug }}
BuildConfiguration: Release
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false

Expand All @@ -46,6 +46,10 @@ extends:
asyncSdl:
enabled: true
forStages: [build]
featureFlags:
WindowsHostVersion:
Version: 2022
Network: Netlock
stages:
- stage: build
jobs:
Expand Down Expand Up @@ -75,22 +79,16 @@ extends:
inputs:
packageType: sdk
version: 8.x
- task: UseDotNet@2
displayName: Use .NET 7.x runtime (for tests)
inputs:
packageType: runtime
version: 7.x
- task: UseDotNet@2
displayName: Use .NET 6.x runtime (for tests)
inputs:
packageType: runtime
version: 6.x
- task: PowerShell@2
displayName: Install PSResources
inputs:
pwsh: true
filePath: tools/installPSResources.ps1
- pwsh: Invoke-Build TestFull -Configuration $(BuildConfiguration)
- pwsh: |
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
Install-Module -Repository CFS -Name InvokeBuild -RequiredVersion 5.11.3
Install-Module -Repository CFS -Name platyPS -RequiredVersion 0.14.2
Invoke-Build TestFull -Configuration $(BuildConfiguration) -PSRepository CFS
displayName: Build and test
- task: PublishTestResults@2
displayName: Publish test results
Expand Down
Loading

0 comments on commit a99180d

Please sign in to comment.