Skip to content

Commit

Permalink
Always run emsdk_env.sh before build.py, even when ccache is disabled (
Browse files Browse the repository at this point in the history
…microsoft#18477)

### Description
Always run emsdk_env.sh before build.py, even when ccache is disabled

This is a follow up to microsoft#18434. That PR didn't handle the case when
ccache was disabled.
  • Loading branch information
snnn authored and kleiti committed Mar 22, 2024
1 parent 3a03811 commit 512a5da
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ steps:
EM_DIR: '$(Build.SourcesDirectory)/cmake/external/emsdk/upstream/emscripten'
- ${{if eq(parameters.WithCache, false)}}:
- task: PythonScript@0
displayName: '${{parameters.DisplayName}}'
inputs:
scriptPath: '$(Build.SourcesDirectory)/tools/ci_build/build.py'
arguments: ${{parameters.Arguments}}
workingDirectory: '$(Build.BinariesDirectory)'
- script: |
set -e -x
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}}
21 changes: 14 additions & 7 deletions tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 512a5da

Please sign in to comment.