forked from jayjamesjay/http_req
-
Notifications
You must be signed in to change notification settings - Fork 7
91 lines (75 loc) · 2.73 KB
/
examples.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: examples
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install apt-get packages
run: |
sudo ACCEPT_EULA=Y apt-get update
sudo ACCEPT_EULA=Y apt-get upgrade
sudo apt-get install wget git curl software-properties-common build-essential
- name: Install Rust target
run: |
rustup target add wasm32-wasi
cargo install cargo-wasi
- name: Install WasmEdge
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -p /usr/local
- name: Install WasmEdge Rustls plugin
run : |
wget https://github.com/second-state/wasmedge_rustls_plugin/releases/download/0.1.0/WasmEdge-plugin-wasmedge_rustls-0.1.0-alpha-ubuntu20.04_x86_64.tar
tar -xf WasmEdge-plugin-wasmedge_rustls-*.tar
sudo mkdir -p /usr/local/lib/wasmedge/
sudo cp *.so /usr/local/lib/wasmedge/
- name: add_headers
run: |
cargo build --release --example add_headers
wasmedgec target/wasm32-wasi/release/examples/add_headers.wasm add_headers.wasm
wasmedge add_headers.wasm
- name: get
run: |
cargo build --release --example get
wasmedgec target/wasm32-wasi/release/examples/get.wasm get.wasm
wasmedge get.wasm
- name: get https
run: |
cargo wasi build --release --example get_https
wasmedgec target/wasm32-wasi/release/examples/get_https.wasm get_https.wasm
wasmedge get_https.wasm
- name: head
run: |
cargo build --release --example head
wasmedgec target/wasm32-wasi/release/examples/head.wasm head.wasm
wasmedge head.wasm
- name: head https
run: |
cargo build --release --example head_https
wasmedgec target/wasm32-wasi/release/examples/head_https.wasm head_https.wasm
wasmedge head_https.wasm
- name: post
run: |
cargo build --release --example post
wasmedgec target/wasm32-wasi/release/examples/post.wasm post.wasm
wasmedge post.wasm
- name: post https
run: |
cargo build --release --example post_https
wasmedgec target/wasm32-wasi/release/examples/post_https.wasm post_https.wasm
wasmedge post_https.wasm
- name: post by ip
run: |
cargo build --release --example post_by_ip
wasmedgec target/wasm32-wasi/release/examples/post_by_ip.wasm post_by_ip.wasm
wasmedge post_by_ip.wasm