2021-09-28 16:52:51 +03:00
|
|
|
trigger:
|
|
|
|
batch: false
|
|
|
|
|
2021-11-26 12:07:04 +03:00
|
|
|
parameters:
|
|
|
|
- name: VERSION
|
|
|
|
displayName: V8 version
|
|
|
|
type: string
|
|
|
|
default: "9.4.146.17"
|
|
|
|
- name: TARGET
|
|
|
|
displayName: Target
|
|
|
|
type: string
|
|
|
|
default: "virtual"
|
|
|
|
values:
|
|
|
|
- virtual
|
|
|
|
- sgx
|
|
|
|
- name: PUSH_ARTIFACT
|
|
|
|
displayName: Publish to package feed
|
|
|
|
type: boolean
|
|
|
|
default: true
|
2021-09-28 16:52:51 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: build_v8
|
2022-08-31 15:31:55 +03:00
|
|
|
container: ccfmsrc.azurecr.io/ccf/ci/sgx:oe-0.18.2-protoc
|
2021-09-28 16:52:51 +03:00
|
|
|
pool: 1es-dv4-focal
|
|
|
|
|
2021-11-26 12:07:04 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
MODE: "debug"
|
|
|
|
release:
|
|
|
|
MODE: "release"
|
|
|
|
|
2021-09-28 16:52:51 +03:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
|
2021-11-26 12:07:04 +03:00
|
|
|
- script: scripts/v8/build.sh ${{ parameters.VERSION }} $(MODE) ${{ parameters.TARGET }} ${{ parameters.PUSH_ARTIFACT }}
|
2021-09-28 16:52:51 +03:00
|
|
|
displayName: "Build V8"
|
|
|
|
|
2021-11-26 12:07:04 +03:00
|
|
|
- ${{ if eq(parameters.PUSH_ARTIFACT, true) }}:
|
|
|
|
- script: |
|
|
|
|
# Universal Packages versions only take three sections X.Y.Z.
|
|
|
|
# V8 versions have four sections, with the first two as the chromium version.
|
|
|
|
# Ex: 9.4.146.17 (Chromium version 94)
|
|
|
|
export MAJOR=$(echo ${{ parameters.VERSION }} | cut -d "." -f 1,2 | sed 's/\.//')
|
|
|
|
# We also want our build version to increment, so we also join the last two.
|
|
|
|
# Ex: 9.4.146.17 -> 94.14617.$(Build.BuildId)
|
|
|
|
export MINOR=$(echo ${{ parameters.VERSION }} | cut -d "." -f 3,4 | sed 's/\.//')
|
|
|
|
echo '##vso[task.setvariable variable=pkg-ver]'$MAJOR.$MINOR.$(Build.BuildId)
|
|
|
|
mv build-v8/v8-${{ parameters.VERSION }}-$(MODE)-${{ parameters.TARGET }}.tar.xz $(Build.ArtifactStagingDirectory)
|
|
|
|
displayName: "Prepare Artifact Staging Directory"
|
|
|
|
|
|
|
|
- task: UniversalPackages@0
|
|
|
|
displayName: "Publish V8 Artifact"
|
|
|
|
inputs:
|
|
|
|
command: publish
|
|
|
|
publishDirectory: "$(Build.ArtifactStagingDirectory)"
|
|
|
|
vstsFeedPublish: "CCF/V8"
|
|
|
|
vstsFeedPackagePublish: "v8-monolith-$(MODE)-${{ parameters.TARGET }}"
|
|
|
|
versionOption: custom
|
|
|
|
versionPublish: "$(pkg-ver)"
|
|
|
|
packagePublishDescription: "CCF build of monolith V8"
|