-
Notifications
You must be signed in to change notification settings - Fork 16
149 lines (126 loc) · 4.02 KB
/
standalone.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Test standalone mode
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
paths-ignore:
- "**/*.md"
- ".github/workflows/ci-build.yml"
- ".github/workflows/rust-static-lib.yml"
pull_request:
paths-ignore:
- "**/*.md"
- ".github/workflows/ci-build.yml"
- ".github/workflows/rust-static-lib.yml"
jobs:
build_ubuntu_2204:
name: Ubuntu
runs-on: ubuntu-22.04
strategy:
matrix:
rust: [1.78, 1.77, 1.76]
steps:
- name: Checkout WasmEdge Rust SDK
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up build environment
run: |
sudo apt update
sudo apt install -y software-properties-common libboost-all-dev ninja-build
sudo apt install -y llvm-14-dev liblld-14-dev clang-14
sudo apt install -y gcc g++
sudo apt install -y libssl-dev pkg-config gh
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Run in the standalone mode
run: |
export LLVM_DIR="/usr/local/opt/llvm/lib/cmake"
export CC=clang
export CXX=clang++
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cargo test -p wasmedge-sdk --all --examples --features standalone
build_ubuntu_2004:
name: Ubuntu
runs-on: ubuntu-20.04
strategy:
matrix:
rust: [1.78, 1.77, 1.76]
steps:
- name: Checkout WasmEdge Rust SDK
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up build environment
run: |
sudo apt update
sudo apt install -y software-properties-common libboost-all-dev ninja-build
sudo apt install -y llvm-12-dev liblld-12-dev clang-12
sudo apt install -y gcc g++
sudo apt install -y libssl-dev pkg-config gh
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Run in the standalone mode
run: |
export LLVM_DIR="/usr/local/opt/llvm/lib/cmake"
export CC=clang
export CXX=clang++
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cargo test -p wasmedge-sdk --all --examples --features standalone
build_macos:
name: MacOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, macos-13]
rust: [1.78, 1.77, 1.76]
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Install build tools
run: brew install llvm ninja boost cmake
- name: Install libwasmedge
run: |
export LLVM_DIR="/usr/local/opt/llvm/lib/cmake"
export CC=clang
export CXX=clang++
export DYLD_LIBRARY_PATH=$HOME/.wasmedge/lib
cargo test -p wasmedge-sdk --all --examples --features standalone
build_fedora:
name: Fedora latest
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.78, 1.77, 1.76]
container:
image: fedora:latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up build environment
run: |
dnf update -y
dnf install -y cmake ninja-build boost llvm llvm-devel lld-devel clang git file rpm-build dpkg-dev spdlog-devel
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Run in the standalone mode
run: |
export LLVM_DIR="/usr/local/opt/llvm/lib/cmake"
export CC=clang
export CXX=clang++
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cargo test -p wasmedge-sdk --all --examples --features standalone