-
Notifications
You must be signed in to change notification settings - Fork 73
57 lines (47 loc) · 1.25 KB
/
build.yaml
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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Build and run tests
run: cargo test --verbose --benches
- name: Build and run examples
run: |
cargo run --example cvrp
cargo run --example pdptw
cargo run --example custom_constraint
cargo run --example custom_objective
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --tests --examples -- -D warnings
release-build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Release build
run: cargo build --release --verbose
wasm-build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Build WebAssembly
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
cd vrp-cli
wasm-pack build --target web
- name: Upload WebAssembly artifact
uses: actions/upload-artifact@v4
with:
name: vrp_cli_wasm
path: vrp-cli/pkg/