Skip to content

Commit e87ae9a

Browse files
ami-GSliveans
andauthored
Fix Time64Distro Packaging on GH Actions (#4463) (#4468)
Co-authored-by: Ahmet Ibrahim Aksoy <[email protected]>
1 parent 9a7a9d7 commit e87ae9a

6 files changed

+41
-19
lines changed

.azure/OneBranch.Official.yml

+9
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,15 @@ extends:
207207
- template: .azure/obtemplates/build-linux-packages.yml@self
208208
parameters:
209209
sign: true
210+
kernel: "kernel5_4"
211+
- template: .azure/obtemplates/build-linux-packages.yml@self
212+
parameters:
213+
sign: true
214+
kernel: "kernel5_15"
215+
- template: .azure/obtemplates/build-linux-packages.yml@self
216+
parameters:
217+
sign: true
218+
kernel: "kernel6_8"
210219

211220
- stage: package_windows
212221
displayName: Package Windows

.azure/OneBranch.PullRequest.yml

+8
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,14 @@ extends:
201201
- build_linux
202202
jobs:
203203
- template: .azure/obtemplates/build-linux-packages.yml@self
204+
parameters:
205+
kernel: "kernel5_4"
206+
- template: .azure/obtemplates/build-linux-packages.yml@self
207+
parameters:
208+
kernel: "kernel5_15"
209+
- template: .azure/obtemplates/build-linux-packages.yml@self
210+
parameters:
211+
kernel: "kernel6_8"
204212

205213
- stage: package_windows
206214
displayName: Package Windows

.azure/obtemplates/build-linux-packages.yml

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
parameters:
2-
sign: false
2+
- name: sign
3+
type: boolean
4+
default: false
5+
- name: kernel
6+
type: string
37

48
jobs:
5-
- job: distribution
9+
- job: distribution_${{ parameters.kernel }} # artifact becomes drop_package_linux_${{ jobname }}
610
displayName: Distribution
7-
strategy:
8-
matrix:
9-
ubuntu_2004:
10-
kernel: "kernel5_4"
11-
ubuntu_2204:
12-
kernel: "kernel5_15"
13-
ubuntu_2404:
14-
kernel: "kernel6_8"
1511
pool:
1612
type: linux
1713
variables:
1814
ob_outputDirectory: $(Build.SourcesDirectory)/artifacts/dist
19-
ob_artifactSuffix: _$(kernel) # drop_package_linux_${{ jobname }}_${{ kernel }}
2015
steps:
2116
- task: PowerShell@2
2217
displayName: Prepare Build Machine
@@ -26,12 +21,12 @@ jobs:
2621
arguments: -ForContainerBuild
2722
- task: DownloadPipelineArtifact@2
2823
inputs:
29-
artifact: drop_build_linux_$(kernel)_Debug
24+
artifact: drop_build_linux_${{ parameters.kernel }}_Debug
3025
path: $(Build.SourcesDirectory)/artifacts/bin/linux
3126
pattern: '*.tar'
3227
- task: DownloadPipelineArtifact@2
3328
inputs:
34-
artifact: drop_build_linux_$(kernel)_Release
29+
artifact: drop_build_linux_${{ parameters.kernel }}_Release
3530
path: $(Build.SourcesDirectory)/artifacts/bin/linux
3631
pattern: '*.tar'
3732
- script: | # rebuild artifacts with correct permissions and symlink attributes.
@@ -43,6 +38,8 @@ jobs:
4338
inputs:
4439
pwsh: false
4540
filePath: scripts/package-distribution.ps1
41+
${{ if eq(parameters.kernel, 'kernel6_8') }}:
42+
arguments: -Time64Distro
4643
- script: | # prepare 2 sets of packages for signing with different keys (gen = general purpose, cbl = cbl-mariner)
4744
mkdir $(Build.SourcesDirectory)/artifacts/dist/gen
4845
find $(Build.SourcesDirectory)/artifacts/dist -type f -exec mv -t $(Build.SourcesDirectory)/artifacts/dist/gen/ {} +

.github/workflows/package-linux.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
{ config: "Release", os: "ubuntu-22.04", arch: "arm", tls: "openssl3" },
3434
{ config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "openssl3" },
3535
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" },
36-
{ config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "openssl3" },
37-
{ config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "openssl3" },
38-
{ config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
36+
{ config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "openssl3", time64: "-Time64Distro" },
37+
{ config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "openssl3", time64: "-Time64Distro" },
38+
{ config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp", time64: "-Time64Distro" },
3939
]
4040
uses: ./.github/workflows/package-reuse-linux.yml
4141
with:
@@ -44,6 +44,7 @@ jobs:
4444
arch: ${{ matrix.vec.arch }}
4545
tls: ${{ matrix.vec.tls }}
4646
xdp: ${{ matrix.vec.xdp }}
47+
time64: ${{ matrix.vec.time64 }}
4748

4849
test-packages:
4950
name: Test Linux Packages

.github/workflows/package-reuse-linux.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ on:
5454
required: false
5555
default: ''
5656
type: string
57+
time64:
58+
required: false
59+
default: ''
60+
type: string
5761

5862
permissions: read-all
5963

@@ -96,7 +100,7 @@ jobs:
96100
find -name "*.tar" -exec tar -xvf '{}' \;
97101
- name: Build Package
98102
shell: pwsh
99-
run: scripts/package-distribution.ps1 -OS ${{ inputs.os }}
103+
run: scripts/package-distribution.ps1 ${{ inputs.time64 }}
100104
- name: Upload build artifacts
101105
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
102106
with:

scripts/package-distribution.ps1

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
77
#>
88

9+
param (
10+
[Parameter(Mandatory = $false)]
11+
[switch]$Time64Distro = $false
12+
)
13+
914
Set-StrictMode -Version 'Latest'
1015
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
1116

@@ -116,13 +121,11 @@ foreach ($Build in $AllBuilds) {
116121
}
117122

118123
# if datapath_raw_xdp_kern.o exists under $ArtifactsDir, $UseXdp to be true
119-
$Time64Distro = $false
120124
$UseXdp = $false
121125
if ($Platform -eq "linux") {
122126
$XdpBin = Join-Path $ArtifactsDir "datapath_raw_xdp_kern.o"
123127
if (Test-Path $XdpBin) {
124128
$UseXdp = $true
125-
$Time64Distro = $true
126129
}
127130
}
128131

0 commit comments

Comments
 (0)