Browse Source

ci: fix Binaryen cache on Windows

The wrong path was used to cache binaryen, so it wasn't actually getting
cached. Therefore, wasm-opt was rebuilt on every new PR (slowing down
the "Build TinyGo release tarball" a lot).
pull/2296/head
Ayke van Laethem 3 years ago
committed by Nia
parent
commit
ec95d3560f
  1. 4
      .github/workflows/windows.yml
  2. 6
      Makefile

4
.github/workflows/windows.yml

@ -66,8 +66,8 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
id: cache-binaryen id: cache-binaryen
with: with:
key: binaryen-v1 key: binaryen-windows-v2
path: build/binaryen path: build/wasm-opt.exe
- name: Build Binaryen - name: Build Binaryen
if: steps.cache-binaryen.outputs.cache-hit != 'true' if: steps.cache-binaryen.outputs.cache-hit != 'true'
run: make binaryen run: make binaryen

6
Makefile

@ -176,10 +176,10 @@ $(LLVM_BUILDDIR): $(LLVM_BUILDDIR)/build.ninja
# Build Binaryen # Build Binaryen
.PHONY: binaryen .PHONY: binaryen
binaryen: build/wasm-opt binaryen: build/wasm-opt$(EXE)
build/wasm-opt: build/wasm-opt$(EXE):
cd lib/binaryen && cmake -G Ninja . -DBUILD_STATIC_LIB=ON $(BINARYEN_OPTION) && ninja bin/wasm-opt$(EXE) cd lib/binaryen && cmake -G Ninja . -DBUILD_STATIC_LIB=ON $(BINARYEN_OPTION) && ninja bin/wasm-opt$(EXE)
cp lib/binaryen/bin/wasm-opt build/wasm-opt cp lib/binaryen/bin/wasm-opt$(EXE) build/wasm-opt$(EXE)
# Build wasi-libc sysroot # Build wasi-libc sysroot
.PHONY: wasi-libc .PHONY: wasi-libc

Loading…
Cancel
Save