-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (51 loc) · 1.4 KB
/
test.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
name: Rust tests
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Install Rust Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install
run: |
pip install -U pip
pip install setuptools_rust
pip install -r requirements.txt
python -c "import convert_weights; convert_weights.convert_testing(); convert_weights.convert_350m()"
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
env: TORCH_CUDA_VERSION=cu116
args: --all-targets --verbose
- name: Lint with RustFmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path -- --check
- name: Lint with Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path --all-targets --all-features -- -D warnings
- name: Run lib Tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all-features --all-targets