Skip to content

Commit 15e455d

Browse files
committed
Add github action
1 parent 7aa9fc5 commit 15e455d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/buildtest.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Cache Cargo registry
15+
uses: actions/cache@v1
16+
with:
17+
path: ~/.cargo/registry
18+
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }}
19+
restore-keys: |
20+
cargo-registry-
21+
- name: Cache Cargo index
22+
uses: actions/cache@v1
23+
with:
24+
path: ~/.cargo/git
25+
key: cargo-index-${{ hashFiles('**/Cargo.lock') }}
26+
restore-keys: |
27+
cargo-index-
28+
- name: Cache Cargo target
29+
uses: actions/cache@v2
30+
with:
31+
path: target
32+
key: target-${{ hashFiles('Cargo.lock') }}
33+
restore-keys: |
34+
target-
35+
- name: "Build"
36+
run: cargo build
37+
38+
- name: "Test"
39+
run: cargo test

0 commit comments

Comments
 (0)