diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 832a2c6..ce34c59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,13 +27,13 @@ jobs: name: 'OCaml/Opam cache' uses: actions/cache@v3 with: - key: 'wasmstore-opam-${{ matrix.ocaml-compiler }}-${{ matrix.os }}' + key: 'wasmstore-opam-${{ matrix.ocaml-compiler }}-${{ matrix.target }}-${{ matrix.os }}' path: ~/.opam - id: wasmstore-dune-cache name: 'OCaml/Dune cache' uses: actions/cache@v3 with: - key: wasmstore-dune-${{ matrix.ocaml-compiler }}-${{ matrix.os }}-${{ hashFiles('src/**') }}-${{ hashFiles('dune-project') }} + key: wasmstore-dune-${{ matrix.ocaml-compiler }}-${{ matrix.target }}-${{ matrix.os }}-${{ hashFiles('src/**') }}-${{ hashFiles('dune-project') }} path: _build - name: 'Use OCaml ${{ matrix.ocaml-compiler }}' uses: ocaml/setup-ocaml@v2 @@ -41,7 +41,7 @@ jobs: ocaml-compiler: '${{ matrix.ocaml-compiler }}' - run: opam install . --deps-only -y - name: 'Make release' - run: opam exec -- make release + run: opam exec -- make release TARGET=${{ matrix.target }} - name: Upload Artifact to Release uses: softprops/action-gh-release@v1 with: diff --git a/Makefile b/Makefile index 31f59e7..d86af15 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ PREFIX?=/usr/local VERSION=0.2 -UNAME_M:=$(shell uname -m) +TARGET?=$(shell uname -m) UNAME_S:=$(shell uname -s | tr '[:upper:]' '[:lower:]') ifeq ($(UNAME_S),darwin) UNAME_S=macos endif -RELEASE_DIR=wasmstore-$(UNAME_M)-$(UNAME_S)-$(VERSION) +RELEASE_DIR=wasmstore-$(TARGET)-$(UNAME_S)-$(VERSION) build: dune build