Skip to content

Commit

Permalink
w2
Browse files Browse the repository at this point in the history
  • Loading branch information
fs-eire committed Jan 26, 2024
1 parent 476ee7e commit e9d1081
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,21 @@ jobs:
name: ${{ parameters.PoolName }}
variables:
buildArch: x64
# command line arguments for all builds
CommonBuildArgs: '--parallel --config ${{ parameters.BuildConfig }} --skip_submodule_sync --build_wasm --use_extensions --cmake_extra_defines onnxruntime_WEBASSEMBLY_DEFAULT_EXTENSION_FLAGS=ON ${{ parameters.ExtraBuildArgs }}'
NonJsepBuildArgs: '--use_webnn --target onnxruntime_webassembly --skip_tests'
JsepBuildArgs: '--use_jsep --use_webnn --target onnxruntime_webassembly --skip_tests'
# command line arguments for non-JSEP builds
NonJsepCommonBuildArgs: '--enable_wasm_native_eh'
# command line arguments for JSEP builds
JsepCommonBuildArgs: '--use_jsep --use_webnn'

${{ if eq(parameters.BuildConfig, 'Debug') }}:
# Debug build
NonJsepBuildArgs: '$(NonJsepCommonBuildArgs)'
JsepBuildArgs: '$(JsepCommonBuildArgs)'
${{ else }}:
# Release build
NonJsepBuildArgs: '$(NonJsepCommonBuildArgs)'
JsepBuildArgs: '$(JsepCommonBuildArgs) --target onnxruntime_webassembly --skip_tests --enable_wasm_api_exception_catching'
runCodesignValidationInjection: false
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
ORT_CACHE_DIR: $(Agent.TempDirectory)/ort_ccache
Expand Down Expand Up @@ -117,7 +129,7 @@ jobs:
${{ else }}:
AdditionalKey: wasm | ${{ parameters.BuildConfig }}
CacheDir: $(ORT_CACHE_DIR)/wasm
Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm'
Arguments: '$(CommonBuildArgs) $(NonJsepBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm'
DisplayName: 'Build and test (node)'
WithCache: ${{ parameters.WithCache }}

Expand All @@ -129,7 +141,7 @@ jobs:
${{ else }}:
AdditionalKey: wasm_threads | ${{ parameters.BuildConfig }}
CacheDir: $(ORT_CACHE_DIR)/wasm_threads
Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_threads --enable_wasm_threads'
Arguments: '$(CommonBuildArgs) $(NonJsepBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_threads --enable_wasm_threads'
DisplayName: 'Build and test (node) (threads)'
WithCache: ${{ parameters.WithCache }}

Expand All @@ -141,7 +153,7 @@ jobs:
${{ else }}:
AdditionalKey: wasm_simd_threads | ${{ parameters.BuildConfig }}
CacheDir: $(ORT_CACHE_DIR)/wasm_simd_threads
Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_simd_threads --enable_wasm_simd --enable_wasm_threads --wasm_run_tests_in_browser'
Arguments: '$(CommonBuildArgs) $(NonJsepBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_simd_threads --enable_wasm_simd --enable_wasm_threads --wasm_run_tests_in_browser'
DisplayName: 'Build and test (browser) (simd + threads)'
WithCache: ${{ parameters.WithCache }}

Expand All @@ -153,7 +165,7 @@ jobs:
${{ else }}:
AdditionalKey: wasm_simd | ${{ parameters.BuildConfig }}
CacheDir: $(ORT_CACHE_DIR)/wasm_simd
Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_simd --enable_wasm_simd'
Arguments: '$(CommonBuildArgs) $(NonJsepBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_simd --enable_wasm_simd'
DisplayName: 'Build and test (node) (simd)'
WithCache: ${{ parameters.WithCache }}

Expand All @@ -166,7 +178,7 @@ jobs:
${{ else }}:
AdditionalKey: training_wasm_simd | ${{ parameters.BuildConfig }}
CacheDir: $(ORT_CACHE_DIR)/training_wasm_simd
Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/training_wasm_simd --enable_training_apis --enable_wasm_simd --target onnxruntime_webassembly --skip_tests'
Arguments: '$(CommonBuildArgs) $(NonJsepBuildArgs) --build_dir $(Build.BinariesDirectory)/training_wasm_simd --enable_training_apis --enable_wasm_simd --target onnxruntime_webassembly --skip_tests'
DisplayName: 'Build (training + simd)'
WithCache: ${{ parameters.WithCache }}

Expand All @@ -179,7 +191,7 @@ jobs:
${{ else }}:
AdditionalKey: wasm_simd_jsep | ${{ parameters.BuildConfig }}
CacheDir: $(ORT_CACHE_DIR)/wasm_simd_jsep
Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_simd_jsep --enable_wasm_simd $(JsepBuildArgs)'
Arguments: '$(CommonBuildArgs) $(JsepBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_simd_jsep --enable_wasm_simd'
DisplayName: 'Build (simd + JSEP)'
WithCache: ${{ parameters.WithCache }}
- template: build-linux-wasm-step.yml
Expand All @@ -190,7 +202,7 @@ jobs:
${{ else }}:
AdditionalKey: wasm_simd_threads_jsep | ${{ parameters.BuildConfig }}
CacheDir: $(ORT_CACHE_DIR)/wasm_simd_threads_jsep
Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_simd_threads_jsep --enable_wasm_simd --enable_wasm_threads $(JsepBuildArgs)'
Arguments: '$(CommonBuildArgs) $(JsepBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_simd_threads_jsep --enable_wasm_simd --enable_wasm_threads'
DisplayName: 'Build (simd + threads + JSEP)'
WithCache: ${{ parameters.WithCache }}

Expand Down

0 comments on commit e9d1081

Please sign in to comment.