-
Notifications
You must be signed in to change notification settings - Fork 8.1k
WIP [release/v7.5] rebuild based on packages #25894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| name: Windows-CI-BuildFromPackages | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - release/** | ||
| - github-mirror | ||
| paths: | ||
| - "**" | ||
| - "!.vsts-ci/misc-analysis.yml" | ||
| - "!.github/ISSUE_TEMPLATE/**" | ||
| - "!.dependabot/config.yml" | ||
| - "!test/perf/**" | ||
| - "!.pipelines/**" | ||
| pull_request: | ||
| branches: | ||
| - release/** | ||
| - github-mirror | ||
|
|
||
| # Path filters for PRs need to go into the changes job | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ contains(github.ref, 'merge')}} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| run-name: "${{ github.ref_name }} - ${{ github.run_number }}" | ||
|
|
||
| env: | ||
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
| GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'" | ||
| NugetSecurityAnalysisWarningLevel: none | ||
| POWERSHELL_TELEMETRY_OPTOUT: 1 | ||
| __SuppressAnsiEscapeSequences: 1 | ||
| nugetMultiFeedWarnLevel: none | ||
| jobs: | ||
| changes: | ||
| name: Change Detection | ||
| runs-on: ubuntu-latest | ||
| if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' | ||
| # Required permissions | ||
| permissions: | ||
| pull-requests: read | ||
| contents: read | ||
|
|
||
| # Set job outputs to values from filter step | ||
| outputs: | ||
| source: ${{ steps.filter.outputs.source }} | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4.1.0 | ||
|
|
||
| - name: Change Detection | ||
| id: filter | ||
| uses: "./.github/actions/infrastructure/path-filters" | ||
| with: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| ci_build: | ||
| name: Build PowerShell | ||
| needs: changes | ||
| if: ${{ needs.changes.outputs.source == 'true' }} | ||
| runs-on: windows-latest | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4.1.0 | ||
| with: | ||
| fetch-depth: 1000 | ||
| - name: Build | ||
| uses: "./.github/actions/build/ci" | ||
| with: | ||
| ExtraBuildParams: BuildFromPackages | ||
| SkipXUnitTests: true | ||
| windows_test_unelevated_ci: | ||
| name: Windows Unelevated CI | ||
| needs: | ||
| - ci_build | ||
| - changes | ||
| if: ${{ needs.changes.outputs.source == 'true' }} | ||
| runs-on: windows-latest | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4.1.0 | ||
| with: | ||
| fetch-depth: 1000 | ||
| - name: Windows Unelevated CI | ||
| uses: "./.github/actions/test/windows" | ||
| with: | ||
| purpose: UnelevatedPesterTests | ||
| tagSet: CI | ||
| windows_test_elevated_ci: | ||
| name: Windows Elevated CI | ||
| needs: | ||
| - ci_build | ||
| - changes | ||
| if: ${{ needs.changes.outputs.source == 'true' }} | ||
| runs-on: windows-latest | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4.1.0 | ||
| with: | ||
| fetch-depth: 1000 | ||
| - name: Windows Elevated CI | ||
| uses: "./.github/actions/test/windows" | ||
| with: | ||
| purpose: ElevatedPesterTests | ||
| tagSet: CI | ||
| windows_test_unelevated_others: | ||
| name: Windows Unelevated Others | ||
| needs: | ||
| - ci_build | ||
| - changes | ||
| if: ${{ needs.changes.outputs.source == 'true' }} | ||
| runs-on: windows-latest | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4.1.0 | ||
| with: | ||
| fetch-depth: 1000 | ||
| - name: Windows Unelevated Others | ||
| uses: "./.github/actions/test/windows" | ||
| with: | ||
| purpose: UnelevatedPesterTests | ||
| tagSet: Others | ||
| windows_test_elevated_others: | ||
| name: Windows Elevated Others | ||
| needs: | ||
| - ci_build | ||
| - changes | ||
| if: ${{ needs.changes.outputs.source == 'true' }} | ||
| runs-on: windows-latest | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4.1.0 | ||
| with: | ||
| fetch-depth: 1000 | ||
| - name: Windows Elevated Others | ||
| uses: "./.github/actions/test/windows" | ||
| with: | ||
| purpose: ElevatedPesterTests | ||
| tagSet: Others | ||
| # verify_xunit: | ||
| # name: Verify xUnit test results | ||
| # needs: | ||
| # - ci_build | ||
| # - changes | ||
| # if: ${{ needs.changes.outputs.source == 'true' }} | ||
| # runs-on: windows-latest | ||
| # steps: | ||
| # - name: checkout | ||
| # uses: actions/checkout@v4.1.0 | ||
| # with: | ||
| # fetch-depth: 1000 | ||
| # - name: Verify xUnit test results | ||
| # uses: "./.github/actions/test/verify_xunit" | ||
| ready_to_merge: | ||
| name: windows ready to merge | ||
| needs: | ||
| # - verify_xunit | ||
| - windows_test_elevated_ci | ||
| - windows_test_elevated_others | ||
| - windows_test_unelevated_ci | ||
| - windows_test_unelevated_others | ||
| if: always() | ||
| uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0 | ||
| with: | ||
| needs_context: ${{ toJson(needs) }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup Condition="'$(Rebuild)' == 'true' and '$(IsWindows)' =='true'"> | ||
| <PackageReference Include="System.Management.Automation" Version="7.5.2"> | ||
| <ExcludeAssets>compile</ExcludeAssets> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| </PackageReference> | ||
| <Reference Include="System.Management.Automation"> | ||
|
|
||
| <HintPath>$(NuGetPackageRoot)System.Management.Automation\7.5.2\runtimes\win\lib\net9.0\System.Management.Automation.dll</HintPath> | ||
| <Private>true</Private> | ||
| </Reference> | ||
| </ItemGroup> | ||
| <ItemGroup Condition="'$(Rebuild)' == 'true' and '$(IsWindows)' !='true'"> | ||
| <PackageReference Include="System.Management.Automation" Version="7.5.2"> | ||
| </PackageReference> | ||
| </ItemGroup> | ||
| <ItemGroup Condition="'$(Rebuild)' != 'true'"> | ||
| <ProjectReference Include="..\System.Management.Automation\System.Management.Automation.csproj" /> | ||
| </ItemGroup> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,11 +45,21 @@ | |
| </Content> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ItemGroup Condition="'$(Rebuild)' == 'true'"> | ||
| <ProjectReference Include="..\Microsoft.PowerShell.SDK\Microsoft.PowerShell.SDK.csproj" /> | ||
| <PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.2" /> | ||
| <PackageReference Include="Microsoft.PowerShell.ConsoleHost" Version="7.5.2" /> | ||
| <PackageReference Include="Microsoft.PowerShell.Commands.Diagnostics" Version="7.5.2" /> | ||
| <PackageReference Include="Microsoft.Management.Infrastructure.CimCmdlets" Version="7.5.2" /> | ||
| <PackageReference Include="Microsoft.WSMan.Management" Version="7.5.2" /> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we parameterize this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, parameterizing the version number 7.5.2 is a smart move—especially since it's repeated across multiple entries. This makes your project easier to maintain and update in the future. Instead of hunting down every instance of the version string, you can change it in one place. |
||
| </ItemGroup> | ||
| <ItemGroup Condition="'$(Rebuild)' != 'true'"> | ||
| <ProjectReference Include="..\Microsoft.PowerShell.SDK\Microsoft.PowerShell.SDK.csproj" /> | ||
| <ProjectReference Include="..\Microsoft.PowerShell.Commands.Diagnostics\Microsoft.PowerShell.Commands.Diagnostics.csproj" /> | ||
| <ProjectReference Include="..\Microsoft.Management.Infrastructure.CimCmdlets\Microsoft.Management.Infrastructure.CimCmdlets.csproj" /> | ||
| <ProjectReference Include="..\Microsoft.WSMan.Management\Microsoft.WSMan.Management.csproj" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ProjectReference Include="..\Microsoft.Management.UI.Internal\Microsoft.PowerShell.GraphicalHost.csproj" Condition="'$(SDKToUse)' == 'Microsoft.NET.Sdk.WindowsDesktop' "/> | ||
| </ItemGroup> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat project reference.