-
Notifications
You must be signed in to change notification settings - Fork 8
66 lines (60 loc) · 1.57 KB
/
build.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
name: Build
on:
push:
branches:
- dev
- main
- release-*
- feat-*
- ci-*
- refactor-*
- fix-*
- test-*
paths:
- '.github/workflows/build.yml'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/*.rs'
- '**/*.sh'
pull_request:
branches:
- dev
- main
types: [opened, synchronize, reopened]
paths:
- '.github/workflows/**'
- '**/Cargo.toml'
- '**/*.rs'
- '**/*.sh'
jobs:
build-wasm:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12, macos-13]
steps:
- name: Clone project
id: checkout
uses: actions/checkout@v3
- name: Install Rust-nightly
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
target: wasm32-wasip1
components: rustfmt, clippy
- name: Install Rust-stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-wasip1
- name: Build rag-api-server
id: build_rag_api_server
run: |
cargo +nightly fmt --all -- --check
cargo +nightly clippy --target wasm32-wasip1 -- -D warnings
cargo build --target wasm32-wasip1 --release
- name: Build rag-api-server-full
id: build_rag_api_server_full
run: |
cargo +nightly fmt --all -- --check
cargo +nightly clippy --target wasm32-wasip1 --features full -- -D warnings
cargo build --target wasm32-wasip1 --release --features full