diff --git a/tools/ci_build/github/azure-pipelines/templates/build-linux-wasm-step.yml b/tools/ci_build/github/azure-pipelines/templates/build-linux-wasm-step.yml index 6110fe6307324..e664cf69dec76 100644 --- a/tools/ci_build/github/azure-pipelines/templates/build-linux-wasm-step.yml +++ b/tools/ci_build/github/azure-pipelines/templates/build-linux-wasm-step.yml @@ -40,8 +40,6 @@ steps: - script: | set -e -x pushd '$(Build.SourcesDirectory)/cmake/external/emsdk' - ./emsdk install 3.1.44 - ./emsdk activate 3.1.44 source ./emsdk_env.sh export PATH=$(Build.SourcesDirectory)/cmake/external/emsdk/:$PATH export PATH=$(Build.SourcesDirectory)/cmake/external/emsdk/ccache/git-emscripten_64bit/bin:$PATH @@ -71,16 +69,7 @@ steps: - ${{if eq(parameters.WithCache, false)}}: - script: | set -e -x - pushd '$(Build.SourcesDirectory)/cmake/external/emsdk' - ./emsdk install 3.1.44 - ./emsdk activate 3.1.44 - source ./emsdk_env.sh + source $(Build.SourcesDirectory)/cmake/external/emsdk/emsdk_env.sh cd '$(Build.BinariesDirectory)' python3 '$(Build.SourcesDirectory)/tools/ci_build/build.py' ${{parameters.Arguments}} displayName: ${{parameters.DisplayName}} - env: - CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime,time_macros - CCACHE_DIR: ${{parameters.CacheDir}} - _EMCC_CCACHE: 1 - EM_COMPILER_WRAPPER: ccache - EM_DIR: '$(Build.SourcesDirectory)/cmake/external/emsdk/upstream/emscripten' diff --git a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml index f81b1ddc8b93b..852d688b2dbb1 100644 --- a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml @@ -90,13 +90,20 @@ jobs: arguments: --new_dir $(Build.BinariesDirectory)/deps workingDirectory: $(Build.BinariesDirectory) - - script: | - set -ex - cd '$(Build.SourcesDirectory)/cmake/external/emsdk' - ./emsdk install 3.1.44 ccache-git-emscripten-64bit - ./emsdk activate 3.1.44 ccache-git-emscripten-64bit - displayName: 'emsdk install and activate ccache for emscripten' - condition: eq('${{ parameters.WithCache }}', 'true') + - ${{if eq(parameters.WithCache, true)}}: + - script: | + set -ex + cd '$(Build.SourcesDirectory)/cmake/external/emsdk' + ./emsdk install 3.1.44 ccache-git-emscripten-64bit + ./emsdk activate 3.1.44 ccache-git-emscripten-64bit + displayName: 'emsdk install and activate ccache for emscripten' + - ${{if eq(parameters.WithCache, false)}}: + - script: | + set -ex + cd '$(Build.SourcesDirectory)/cmake/external/emsdk' + ./emsdk install 3.1.44 + ./emsdk activate 3.1.44 + displayName: 'emsdk install and activate ccache for emscripten' - template: build-linux-wasm-step.yml parameters: