-
Notifications
You must be signed in to change notification settings - Fork 10
40 lines (38 loc) · 940 Bytes
/
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
---
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch: {}
env:
CACHE_VERSION: v1
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-musl
- uses: actions/cache@v2
with:
key: "${{ runner.os }}-rust-${{ env.CACHE_VERSION }}-${{ hashFiles('Cargo.lock') }}-${{ github.sha }}"
restore-keys: |
${{ runner.os }}-rust-${{ env.CACHE_VERSION }}-${{ hashFiles('Cargo.lock') }}
${{ runner.os }}-rust-${{ env.CACHE_VERSION }}
path: |
~/.cargo
./target
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rs/cargo@v1
with:
command: build
args: --release