Fix Time64Distro Packaging on GH Actions (#4463)

This commit is contained in:
Ahmet Ibrahim Aksoy 2024-08-16 15:17:53 +02:00 коммит произвёл GitHub
Родитель 48e1019330
Коммит 6a37cdcf64
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
6 изменённых файлов: 41 добавлений и 19 удалений

Просмотреть файл

@ -207,6 +207,15 @@ extends:
- template: .azure/obtemplates/build-linux-packages.yml@self
parameters:
sign: true
kernel: "kernel5_4"
- template: .azure/obtemplates/build-linux-packages.yml@self
parameters:
sign: true
kernel: "kernel5_15"
- template: .azure/obtemplates/build-linux-packages.yml@self
parameters:
sign: true
kernel: "kernel6_8"
- stage: package_windows
displayName: Package Windows

Просмотреть файл

@ -201,6 +201,14 @@ extends:
- build_linux
jobs:
- template: .azure/obtemplates/build-linux-packages.yml@self
parameters:
kernel: "kernel5_4"
- template: .azure/obtemplates/build-linux-packages.yml@self
parameters:
kernel: "kernel5_15"
- template: .azure/obtemplates/build-linux-packages.yml@self
parameters:
kernel: "kernel6_8"
- stage: package_windows
displayName: Package Windows

Просмотреть файл

@ -1,22 +1,17 @@
parameters:
sign: false
- name: sign
type: boolean
default: false
- name: kernel
type: string
jobs:
- job: distribution
- job: distribution_${{ parameters.kernel }} # artifact becomes drop_package_linux_${{ jobname }}
displayName: Distribution
strategy:
matrix:
ubuntu_2004:
kernel: "kernel5_4"
ubuntu_2204:
kernel: "kernel5_15"
ubuntu_2404:
kernel: "kernel6_8"
pool:
type: linux
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/artifacts/dist
ob_artifactSuffix: _$(kernel) # drop_package_linux_${{ jobname }}_${{ kernel }}
steps:
- task: PowerShell@2
displayName: Prepare Build Machine
@ -26,12 +21,12 @@ jobs:
arguments: -ForContainerBuild
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_linux_$(kernel)_Debug
artifact: drop_build_linux_${{ parameters.kernel }}_Debug
path: $(Build.SourcesDirectory)/artifacts/bin/linux
pattern: '*.tar'
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_linux_$(kernel)_Release
artifact: drop_build_linux_${{ parameters.kernel }}_Release
path: $(Build.SourcesDirectory)/artifacts/bin/linux
pattern: '*.tar'
- script: | # rebuild artifacts with correct permissions and symlink attributes.
@ -43,6 +38,8 @@ jobs:
inputs:
pwsh: false
filePath: scripts/package-distribution.ps1
${{ if eq(parameters.kernel, 'kernel6_8') }}:
arguments: -Time64Distro
- script: | # prepare 2 sets of packages for signing with different keys (gen = general purpose, cbl = cbl-mariner)
mkdir $(Build.SourcesDirectory)/artifacts/dist/gen
find $(Build.SourcesDirectory)/artifacts/dist -type f -exec mv -t $(Build.SourcesDirectory)/artifacts/dist/gen/ {} +

7
.github/workflows/package-linux.yml поставляемый
Просмотреть файл

@ -33,9 +33,9 @@ jobs:
{ config: "Release", os: "ubuntu-22.04", arch: "arm", tls: "openssl3" },
{ config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "openssl3" },
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" },
{ config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "openssl3" },
{ config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "openssl3" },
{ config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
{ config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "openssl3", time64: "-Time64Distro" },
{ config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "openssl3", time64: "-Time64Distro" },
{ config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp", time64: "-Time64Distro" },
]
uses: ./.github/workflows/package-reuse-linux.yml
with:
@ -44,6 +44,7 @@ jobs:
arch: ${{ matrix.vec.arch }}
tls: ${{ matrix.vec.tls }}
xdp: ${{ matrix.vec.xdp }}
time64: ${{ matrix.vec.time64 }}
test-packages:
name: Test Linux Packages

6
.github/workflows/package-reuse-linux.yml поставляемый
Просмотреть файл

@ -54,6 +54,10 @@ on:
required: false
default: ''
type: string
time64:
required: false
default: ''
type: string
permissions: read-all
@ -96,7 +100,7 @@ jobs:
find -name "*.tar" -exec tar -xvf '{}' \;
- name: Build Package
shell: pwsh
run: scripts/package-distribution.ps1 -OS ${{ inputs.os }}
run: scripts/package-distribution.ps1 ${{ inputs.time64 }}
- name: Upload build artifacts
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
with:

Просмотреть файл

@ -6,6 +6,11 @@
#>
param (
[Parameter(Mandatory = $false)]
[switch]$Time64Distro = $false
)
Set-StrictMode -Version 'Latest'
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
@ -116,13 +121,11 @@ foreach ($Build in $AllBuilds) {
}
# if datapath_raw_xdp_kern.o exists under $ArtifactsDir, $UseXdp to be true
$Time64Distro = $false
$UseXdp = $false
if ($Platform -eq "linux") {
$XdpBin = Join-Path $ArtifactsDir "datapath_raw_xdp_kern.o"
if (Test-Path $XdpBin) {
$UseXdp = $true
$Time64Distro = $true
}
}