Skip to content

Commit

Permalink
Should fix problem with Azure pipeline building WebAssembly
Browse files Browse the repository at this point in the history
When building WebAssembly, the invoked wasm-opt command returns a error.

To fix this, the current workaround mentioned in the issue rustwasm/wasm-pack#782 is to install wasm-opt manually with npm again.
  • Loading branch information
kurbaniec committed Feb 5, 2020
1 parent 04895cd commit c7ab173
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions WebService/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ task<NpmTask>("appTest") {
setArgs(listOf("test"))
}

task<NpmTask>("wasmFix") {
group = "easypass"
description = "Installs wasm-opt"
setWorkingDir(file("${project.projectDir}/src/main/app"))
setArgs(listOf("install", "wasm-opt", "-g"))
}

task("appCopy") {
group = "easypass"
copy {
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
inputs:
gradleWrapperFile: '$(Build.SourcesDirectory)/WebService/gradlew'
workingDirectory: '$(Build.SourcesDirectory)/WebService'
tasks: 'wasmBuild'
tasks: 'wasmFix wasmBuild'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
sonarQubeRunAnalysis: false
Expand Down

0 comments on commit c7ab173

Please sign in to comment.