Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
59 changes: 5 additions & 54 deletions .github/actions/test/linux-packaging/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,68 +15,19 @@ runs:
with:
global-json-file: ./global.json

- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: build
path: "${{ runner.workspace }}/build"

- name: Capture Artifacts Directory
continue-on-error: true
run: Get-ChildItem "${{ runner.workspace }}/build/*" -Recurse
shell: pwsh

- name: Bootstrap
run: |-
Import-Module ./build.psm1
Start-PSBootstrap -Scenario Package
Write-Verbose -Verbose "Start Sync-PSTags"
Sync-PSTags -AddRemoteIfMissing
Write-Verbose -Verbose "End Sync-PSTags"
shell: pwsh

- name: Extract Build ZIP
run: |-
$destinationFolder = "${{ runner.workspace }}/bins"
$archiveFile = "${{ runner.workspace }}/build/build.zip"

Write-Verbose "Extracting $archiveFile to $destinationFolder" -Verbose
New-Item -ItemType Directory -Path $destinationFolder -Force | Out-Null
Expand-Archive -Path $archiveFile -DestinationPath $destinationFolder -Force
shell: pwsh

- name: Fix permissions
continue-on-error: true
run: |-
find "${{ runner.workspace }}/bins" -type d -exec chmod +rwx {} \;
find "${{ runner.workspace }}/bins" -type f -exec chmod +rw {} \;
shell: bash

- name: Capture Extracted Build ZIP
continue-on-error: true
run: Get-ChildItem "${{ runner.workspace }}/bins/*" -Recurse -ErrorAction SilentlyContinue
Import-Module ./tools/ci.psm1
Invoke-CIInstall -SkipUser
shell: pwsh

- name: Create Packages
env:
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.workspace }}/packages
- name: Build and Package
run: |-
# Create the artifacts staging directory
New-Item -ItemType Directory -Path "$env:BUILD_ARTIFACTSTAGINGDIRECTORY" -Force | Out-Null

# Import packaging module to ensure RPM packaging changes are loaded
Import-Module ./build.psm1 -Force
Import-Module ./tools/packaging/packaging.psm1 -Force
Import-Module ./tools/ci.psm1
Restore-PSOptions -PSOptionsPath '${{ runner.workspace }}/build/psoptions.json'
$options = (Get-PSOptions)
$rootPath = '${{ runner.workspace }}/bins'
$originalRootPath = Split-Path -path $options.Output
$path = Join-Path -path $rootPath -ChildPath (split-path -leaf -path $originalRootPath)
$pwshPath = Join-Path -path $path -ChildPath 'pwsh'
chmod a+x $pwshPath
$options.Output = $pwshPath
Set-PSOptions $options
$releaseTag = Get-ReleaseTag
Start-PSBuild -Configuration 'Release' -ReleaseTag $releaseTag
Invoke-CIFinish
shell: pwsh

Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
changes:
if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell'
name: Change Detection
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
# Required permissions
permissions:
pull-requests: read
Expand All @@ -71,7 +71,7 @@ jobs:

merge_conflict_check:
name: Check for Merge Conflict Markers
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' && (startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell')
permissions:
pull-requests: read
Expand All @@ -85,7 +85,7 @@ jobs:

ci_build:
name: Build PowerShell
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: changes
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
steps:
Expand All @@ -102,7 +102,7 @@ jobs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -120,7 +120,7 @@ jobs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -138,7 +138,7 @@ jobs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -156,7 +156,7 @@ jobs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -175,12 +175,12 @@ jobs:
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
uses: ./.github/workflows/xunit-tests.yml
with:
runner_os: ubuntu-latest
runner_os: ubuntu-24.04
test_results_artifact_name: testResults-xunit

infrastructure_tests:
name: Infrastructure Tests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
- ci_build
- changes
if: ${{ needs.changes.outputs.packagingChanged == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -261,4 +261,4 @@ jobs:
if: always()
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@e051ddbdb7865c0a505ce3bf3b2b7abdb50f79d3 # v1.0.0
with:
needs_context: ${{ toJson(needs) }}
needs_context: ${{ toJson(needs) }}
Loading