-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.57 KB
/
build_and_test.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
name: Build and Test
on: [push, pull_request]
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [x86_64-pc-windows-gnu, x86_64-unknown-linux-gnu]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Load cache
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.target }}-2"
- name: Check crate
uses: actions-rs/cargo@v1
with:
command: check
args: --target ${{ matrix.target }}
- name: Install cargo-msrv
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-msrv
- name: Verify MSRV
uses: actions-rs/cargo@v1
with:
command: msrv
args: verify
- name: Test crate
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target ${{ matrix.target }}
- name: Build crate
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target ${{ matrix.target }} --release --all-features
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: "tap-consooomer-${{ matrix.target }}"
path: "target/${{ matrix.target }}/release/tap${{ contains(matrix.target, 'windows') && '.exe' || '' }}"