This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
69 lines (60 loc) · 1.68 KB
/
build-from-source.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build From GitHub (npm install)
on:
push:
branches:
- master
- '**/test**'
tags:
- '*'
pull_request:
branches:
- master
jobs:
build_from_github:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: wasmedge/wasmedge:ubuntu2004_x86_64
strategy:
matrix:
npm-version: [6.x, 7.x, 8.x]
node-version: [12.x, 14.x, 16.x]
steps:
- name: Checkout wasm-learning
uses: actions/checkout@v2
with:
repository: second-state/wasm-learning
path: wasm-learning
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use npm ${{ matrix.npm-version }}
env:
NPM_VERSION: ${{ matrix.npm-version }}
run: |
npm install -g --unsafe-perm npm@$NPM_VERSION
npm version
- name: Set Rust to required version
uses: actions-rs/toolchain@v1
with:
toolchain: 1.50.0
override: true
- name: Install dependencies
run: |
npm install --unsafe-perm -g rustwasmc
chmod a+w /github/home/.npm
chmod a+w /github/home/.profile
- name: Build and install wasmedge-core from GitHub
run: |
npm install --unsafe-perm --build-from-source "${GITHUB_REPOSITORY}#${GITHUB_HEAD_REF}"
- name: Test functions
run: |
rustwasmc build
cd pkg
npm install --unsafe-perm --build-from-source "${GITHUB_REPOSITORY}#${GITHUB_HEAD_REF}"
cd ..
. $HOME/.wasmedge/env
node node/app.js
rustwasmc clean
working-directory: wasm-learning/nodejs/functions