onnxruntime/tools/ci_build/github/azure-pipelines/templates/web-ci.yml
Changming Sun c8524d2dab
Refactor web-ci pipeline and delete eager mode CI pipeline (#15416)
### Description
1. Move it to a separated pool that use the same image as [the public
hosted
pool](https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml).
Also, create a beta pool which contains the next version image of the
hosted pool, and add jobs in our post merge pipeline to test if the next
version image will break our CI. So, usually we will have at least one
week to prepare.

2. Change the cmake generator in use in our pipelines from "Ninja" to
"MingW Makefile", because the latest version of cmake doesn't work with
the latest version of Ninja. People who prefer Ninja could still use
ninja in their local build by passing "--cmake_generator ninja" to
[build.py](https://github.com/microsoft/onnxruntime/blob/main/tools/ci_build/build.py).

3. Delete eager mode CI pipeline. 


### Motivation and Context
I need to update the software we have in our CI build machines, and I
need to resolve this incompatibility issue. In more detail, the build
error I hit was:

em++: error:
CMakeFilesonnxruntime_mlas_test.dirC_a_work1sonnxruntimetestmlasunittesttest_activation.cpp.o:
No such file or directory
("CMakeFilesonnxruntime_mlas_test.dirC_a_work1sonnxruntimetestmlasunittesttest_activation.cpp.o"
was expected to be an input file, based on the commandline arguments
provided)

After this PR we will deprecate python 3.7 support. The eager mode CI
pipeline is the last one that still use python 3.7. Then we can rework
the PR #10953 made by [fs-eire](https://github.com/fs-eire) last year.

Fixed
[AB#14435](https://aiinfra.visualstudio.com/6a833879-cd9b-44a4-a9de-adc2d818f13c/_workitems/edit/14435)
2023-04-10 10:41:04 -07:00

119 lines
3.3 KiB
YAML

parameters:
- name: NpmPackagingMode
displayName: 'NPM packages publish configuration'
type: string
default: 'dev'
- name: IsReleasePipeline
displayName: 'Npm packaging pipeline'
type: boolean
default: false
- name: PoolName
displayName: 'Agent pool name'
type: string
default: 'onnxruntime-Win-CPU-2019'
- name: PackageName
displayName: 'Package name'
type: string
default: 'NPM_packages'
- name: BuildStaticLib
displayName: 'Build static library'
type: boolean
default: false
- name: ExtraBuildArgs
type: string
stages:
- stage: Extract_commit
jobs:
- job: Extract_commit
pool: ${{ parameters.PoolName }}
variables:
runCodesignValidationInjection: false
timeoutInMinutes: 30
workspace:
clean: all
steps:
- checkout: none
fetchDepth: 1
submodules: false
- script: |
echo.$(Build.SourceVersion)
echo.$(Build.SourceVersion)>$(Build.ArtifactStagingDirectory)\__commit.txt
- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline Artifact'
inputs:
artifactName: '__commit'
targetPath: '$(Build.ArtifactStagingDirectory)'
- stage: Build_wasm_Debug
dependsOn: Extract_commit
jobs:
- template: win-wasm-ci.yml
parameters:
CommitOverride: true
BuildConfig: 'Debug'
ExtraBuildArgs: '--use_extensions --cmake_extra_defines onnxruntime_WEBASSEMBLY_DEFAULT_EXTENSION_FLAGS=ON ${{ parameters.ExtraBuildArgs }}'
PoolName: ${{ parameters.PoolName }}
- stage: Build_web_Debug
dependsOn: Build_wasm_Debug
jobs:
- template: win-web-ci.yml
parameters:
CommitOverride: true
BuildConfig: 'Debug'
NpmPackagingMode: ${{ parameters.NpmPackagingMode }}
PoolName: ${{ parameters.PoolName }}
PackageName: ${{ parameters.PackageName }}
- stage: Build_wasm_Release
dependsOn: Extract_commit
jobs:
- template: win-wasm-ci.yml
parameters:
CommitOverride: true
BuildConfig: 'Release'
ExtraBuildArgs: '--skip_tests --enable_wasm_api_exception_catching --disable_rtti --use_extensions --cmake_extra_defines onnxruntime_WEBASSEMBLY_DEFAULT_EXTENSION_FLAGS=ON ${{ parameters.ExtraBuildArgs }}'
PoolName: ${{ parameters.PoolName }}
- ${{ if eq(parameters.BuildStaticLib, 'true') }}:
- stage: Build_wasm_Release_static_library
dependsOn: Extract_commit
jobs:
- template: win-wasm-ci.yml
parameters:
CommitOverride: true
BuildConfig: 'Release'
ExtraBuildArgs: '${{ parameters.ExtraBuildArgs }}'
PoolName: ${{ parameters.PoolName }}
SkipPublish: true
TimeoutInMinutes: 270
- stage: Build_web_Release
dependsOn: Build_wasm_Release
jobs:
- template: win-web-ci.yml
parameters:
CommitOverride: true
BuildConfig: 'Release'
NpmPackagingMode: ${{ parameters.NpmPackagingMode }}
PoolName: ${{ parameters.PoolName }}
PackageName: ${{ parameters.PackageName }}
- ${{ if ne(parameters.IsReleasePipeline, true) }}:
- stage: Test_web_BrowserStack
dependsOn: Build_wasm_Release
jobs:
- template: web-browserstack-ci.yml
parameters:
CommitOverride: true
- ${{ if ne(parameters.IsReleasePipeline, true) }}:
- stage: Test_web_MultiBrowsers
dependsOn: Build_wasm_Release
jobs:
- template: win-web-multi-browsers.yml
parameters:
CommitOverride: true