onnxruntime/tools/ci_build/github/azure-pipelines/templates/linux-ci.yml
Yulong Wang 009f342caf
[JS] refactor Javascript/Typescript libraries in ONNX Runtime (#7308)
* working on re-organizing js code for ortweb

* remove dup files

* move folder

* fix common references

* fix common es5

* add webpack to common

* split interfact/impl

* use cjs for node

* add npmignore for common

* update sourcemap config for common

* update node

* adjust folder/path in CI and build

* update folder

* nit: readme

* add bundle for dev

* correct nodejs paths

* enable ORT_API_MANUAL_INIT

* set name for umd library

* correct name for commonjs export

* add priority into registerBackend()

* fix npm ci pwd

* update eslintrc

* revise code

* revert package-lock lockfileVersion 2->1

* update prebuild

* resolve comments

* update document

* revise eslint config

* update eslint for typescript rules

* revert changes by mistake in backend.ts

* add env

* resolve comments
2021-04-16 01:33:10 -07:00

70 lines
2.7 KiB
YAML

parameters:
AgentPool : 'Linux-CPU-2019'
JobName : 'Linux_CI_Dev'
SubmoduleCheckoutMode: ''
RunDockerBuildArgs: '-o ubuntu18.04 -d cpu -r $(Build.BinariesDirectory) -x "--build_wheel"'
DoNodejsPack: 'false'
DoNugetPack: 'false'
NuPackScript: ''
ArtifactName: 'drop-linux'
TimeoutInMinutes: 120
# Controls whether unreleased onnx opsets are allowed. Default is set to 1
AllowReleasedOpsetOnly: '1'
# to inject strategy, you need to pass in the whole yaml structure -
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#strategies
# see example in orttraining-linux-gpu-ci-pipeline.yml
Strategy: ''
jobs:
- job: ${{ parameters.JobName }}
workspace:
clean: all
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
variables:
ALLOW_RELEASED_ONNX_OPSET_ONLY: ${{ parameters.AllowReleasedOpsetOnly }}
pool: ${{ parameters.AgentPool }}
${{ if ne(parameters.Strategy, '') }}:
strategy:
${{ parameters.Strategy }}
steps:
- checkout: self
${{ if ne(parameters.SubmoduleCheckoutMode, '') }}:
submodules: ${{ parameters.SubmoduleCheckoutMode }}
- task: NodeTool@0
inputs:
versionSpec: '12.16.3'
- template: run-docker-build-steps.yml
parameters:
RunDockerBuildArgs: '${{ parameters.RunDockerBuildArgs }}'
- task: PublishTestResults@2
displayName: 'Publish unit test results'
inputs:
testResultsFiles: '**/*.results.xml'
searchFolder: '$(Build.BinariesDirectory)'
testRunTitle: 'Unit Test Run'
condition: succeededOrFailed()
- ${{ if eq(parameters['DoNugetPack'], 'true') }}:
- script: |
${{ parameters.NuPackScript }}
displayName: 'Create Artifacts'
- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline Artifact'
inputs:
artifactName: ${{ parameters.ArtifactName }}
targetPath: '$(Build.ArtifactStagingDirectory)'
- ${{ if eq(parameters['DoNodejsPack'], 'true') }}:
- script: |
npm pack
cp $(Build.SourcesDirectory)/js/node/onnxruntime-*.tgz $(Build.ArtifactStagingDirectory)
cp -R $(Build.SourcesDirectory)/js/node/prebuilds $(Build.ArtifactStagingDirectory)/prebuilds
workingDirectory: '$(Build.SourcesDirectory)/js/node'
displayName: 'Create NPM Package'
- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline Artifact: ${{ parameters.ArtifactName }}'
inputs:
artifactName: ${{ parameters.ArtifactName }}
targetPath: '$(Build.ArtifactStagingDirectory)'
- template: component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: clean-agent-build-directory-step.yml