-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.18 KB
/
check.yml
File metadata and controls
49 lines (42 loc) · 1.18 KB
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
name: Check
on:
push:
branches: [ main ]
workflow_dispatch:
inputs:
ref:
description: 'Git Ref (Commit Hash, Tag, or Branch). Leave empty to use the selected branch context.'
required: false
type: string
jobs:
build_and_test:
name: Test - ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
components: clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --target ${{ matrix.target }} -- -D warnings
- name: Test
run: cargo test --release --target ${{ matrix.target }}