-
Notifications
You must be signed in to change notification settings - Fork 15
131 lines (111 loc) · 3.42 KB
/
rust.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
name: Rust
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
env:
CARGO_TERM_COLOR: always
jobs:
Formatting:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- name: Check format
run: cargo fmt -- --check
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
Linting:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Lint with clippy
uses: actions-rs-plus/clippy-check@cbcfbff5103c40b26d7077f164f0ec6052036081
with:
token: ${{ secrets.GITHUB_TOKEN }}
sample_run:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install
run: cargo build --release
- name: sample run
run: |
wget https://umd.box.com/shared/static/75a80udhx51fjndbgnm6dmm25qsia5ks.gz -O toy_set.tar.gz
tar xzf toy_set.tar.gz
fry="target/release/alevin-fry"
threads=2
map_dir="toy_set/alevin_map"
gpl_dir="gpl"
quant_dir="quant"
permitmode="-u toy_set/10x_v3_permit.txt"
t2g="toy_set/t2g_3col.tsv"
res="cr-like"
### generate permit list
cmd="$fry generate-permit-list $permitmode -d fw -i $map_dir -o $gpl_dir"
eval $cmd
### collate
cmd="$fry collate -i $gpl_dir -r $map_dir -t $threads"
eval $cmd
### quant
cmd="$fry quant -r $res --use-mtx -m $t2g -i $gpl_dir -o $quant_dir -t $threads"
eval $cmd
# Coverage:
# if: "!contains(github.event.head_commit.message, 'skip ci')"
# needs: Formatting
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Install nightly toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: nightly
# override: true
# - name: Install cargo-tarpaulin
# uses: actions-rs/install@v0.1
# with:
# crate: cargo-tarpaulin
# version: latest
# use-tool-cache: true
# - name: Coverage with tarpaulin
# run: cargo tarpaulin --all --all-features --timeout 600 --out Lcov -- --test-threads 1
# - name: Upload coverage
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: ./lcov.info