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
8
.github/actions/setup/action.yml
vendored
8
.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
|
# 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: sudo apt-get install wabt
|
||||||
- run: |
|
- run: |
|
||||||
curl -L -s https://github.com/WebAssembly/wabt/releases/download/1.0.27/wabt-1.0.27-ubuntu.tar.gz | tar xvz -C /tmp
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||||
sudo mv /tmp/wabt-1.0.27/bin/* /usr/local/bin
|
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
|
shell: bash
|
||||||
- run: yarnpkg --pure-lockfile
|
- run: yarnpkg --pure-lockfile
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
name: Publish Standalone
|
name: Build Standalone
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-standalone:
|
publish-standalone:
|
||||||
needs: build
|
strategy:
|
||||||
runs-on: macos-latest
|
matrix:
|
||||||
|
os: [macos-latest, ubuntu-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/setup
|
- 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_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
|
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
|
CFLAGS=-I$(WASMTIME_DIR)/include
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
LIBS=$(WASMTIME_DIR)/lib/libwasmtime.a
|
LIBS:=$(WASMTIME_DIR)/lib/libwasmtime.a $(LIBS)
|
||||||
|
|
||||||
BIN2H=../../scripts/bin2h
|
BIN2H=../../scripts/bin2h
|
||||||
WAT2WASM=wat2wasm
|
WAT2WASM=wat2wasm
|
||||||
|
@ -27,7 +35,7 @@ waforth_core.h: waforth_core.wasm
|
||||||
.PHONY: install-deps
|
.PHONY: install-deps
|
||||||
install-deps:
|
install-deps:
|
||||||
-rm -rf wasmtime-*
|
-rm -rf wasmtime-*
|
||||||
curl -L -s $(WASMTIME_RELEASE_URL) | tar xvz
|
curl -L -s $(WASMTIME_RELEASE_URL) | tar xJv
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
Loading…
Reference in a new issue