-
Notifications
You must be signed in to change notification settings - Fork 9
114 lines (97 loc) Β· 2.84 KB
/
CI.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
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
name: CI
on: [push, pull_request]
jobs:
cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make
- run: ./build/bin/twsearch -g samples/main/2x2x2.tws
- run: make test-cpp-cli
cpp-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: make
- uses: actions/upload-artifact@v3
with:
name: windows-build
path: build/bin/
cpp-wasm:
runs-on: ubuntu-latest
steps:
- name: Use `node` v19
uses: actions/setup-node@v3
with:
node-version: 19
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: wasmerio/setup-wasmer@v3
continue-on-error: true
id: wasmer
# Fallback workaround for https://github.com/wasmerio/wasmer/issues/4183
# https://github.com/wasmerio/wasmer-install#install-via-package-manager
- if: "!cancelled() && steps.wasmer.conclusion == 'failure'"
run: cargo install wasmer-cli --features singlepass,cranelift # add --features=llvm for LLVM compilation support
- run: make emsdk
- run: make build/wasm-test/twsearch-test.wasm
- run: make build/wasm-single-file/twsearch.mjs
- run: make test-wasm
- run: make test-build-js
- run: make lint-js
cpp-wrapper-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: make test-twsearch-cpp-wrapper-cli
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: make build-rust
- run: make test-rust-lib
- run: make lint-rust
- run: make benchmark-rust
rust-ffi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: cargo-bins/cargo-binstall@v1.4.9
- run: cargo install cargo-run-bin
- run: make build-rust-ffi
- run: make test-rust-ffi
rust-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use `node` v19
uses: actions/setup-node@v3
with:
node-version: 19
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: Swatinem/rust-cache@v2
- uses: cargo-bins/cargo-binstall@v1.4.9
- run: cargo install cargo-run-bin
- run: npm install
- run: make build-rust-wasm
- run: make test-rust-wasm
rust-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: make build-rust
- run: make benchmark-rust