mirror of
https://github.com/remko/waforth
synced 2024-12-27 09:59:29 +01:00
github: Standalone build
This commit is contained in:
parent
e5b1e5e892
commit
77a4df1609
3 changed files with 24 additions and 7 deletions
4
.github/actions/setup/action.yml
vendored
4
.github/actions/setup/action.yml
vendored
|
@ -9,8 +9,12 @@ runs:
|
|||
# We depend on a more recent version, not available in current Ubuntu (20.04). Should be available in 22.04
|
||||
# - run: sudo apt-get install wabt
|
||||
- run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
curl -L -s https://github.com/WebAssembly/wabt/releases/download/1.0.27/wabt-1.0.27-ubuntu.tar.gz | tar xvz -C /tmp
|
||||
sudo mv /tmp/wabt-1.0.27/bin/* /usr/local/bin
|
||||
else
|
||||
brew install wabt
|
||||
fi
|
||||
shell: bash
|
||||
- run: yarnpkg --pure-lockfile
|
||||
shell: bash
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
name: Publish Standalone
|
||||
name: Build Standalone
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
publish-standalone:
|
||||
needs: build
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/setup
|
|
@ -1,9 +1,17 @@
|
|||
UNAME_S=$(shell uname -s)
|
||||
UNAME_P=$(shell uname -p)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
WASMTIME_DIR=wasmtime-v0.37.0-x86_64-macos-c-api
|
||||
WASMTIME_RELEASE_URL=https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-x86_64-macos-c-api.tar.xz
|
||||
else
|
||||
WASMTIME_DIR=wasmtime-v0.37.0-x86_64-linux-c-api
|
||||
WASMTIME_RELEASE_URL=https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-x86_64-linux-c-api.tar.xz
|
||||
LIBS=-lpthread -lm -ldl
|
||||
endif
|
||||
|
||||
CFLAGS=-I$(WASMTIME_DIR)/include
|
||||
LDFLAGS=
|
||||
LIBS=$(WASMTIME_DIR)/lib/libwasmtime.a
|
||||
LIBS:=$(WASMTIME_DIR)/lib/libwasmtime.a $(LIBS)
|
||||
|
||||
BIN2H=../../scripts/bin2h
|
||||
WAT2WASM=wat2wasm
|
||||
|
@ -27,7 +35,7 @@ waforth_core.h: waforth_core.wasm
|
|||
.PHONY: install-deps
|
||||
install-deps:
|
||||
-rm -rf wasmtime-*
|
||||
curl -L -s $(WASMTIME_RELEASE_URL) | tar xvz
|
||||
curl -L -s $(WASMTIME_RELEASE_URL) | tar xJv
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
|
|
Loading…
Reference in a new issue