Skip to content

Commit

Permalink
feat: disable wasm cache in pipeline, to improve stability
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Jan 15, 2024
1 parent eb74e06 commit eac5535
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
jobs:
build:
name: ${{ matrix.os }}
env:
SHOPWARE_CLI_DISABLE_WASM_CACHE: 1
strategy:
fail-fast: false
matrix:
Expand Down
8 changes: 7 additions & 1 deletion internal/phplint/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ func getWazeroRuntime(ctx context.Context) (wazero.Runtime, error) {
return nil, err
}

r := wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfig().WithCompilationCache(cache))
runtimeConfig := wazero.NewRuntimeConfig()

if os.Getenv("SHOPWARE_CLI_DISABLE_WASM_CACHE") != "1" {
runtimeConfig = runtimeConfig.WithCompilationCache(cache)
}

r := wazero.NewRuntimeWithConfig(ctx, runtimeConfig)

wasi_snapshot_preview1.MustInstantiate(ctx, r)

Expand Down

0 comments on commit eac5535

Please sign in to comment.