Skip to content

Commit bb04027

Browse files
committed
CI: Workflow
1 parent 72a2d42 commit bb04027

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/rust.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build-std:
14+
name: Build and test (std)
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: dtolnay/rust-toolchain@stable
22+
- name: Build
23+
run: cargo build --features debug-assertions
24+
- name: Run tests
25+
run: cargo test --features debug-assertions
26+
- name: Build dylib-tests
27+
run: cargo build -p dylib-tests --features debug-assertions
28+
- name: Run dylib-tests
29+
run: cargo test -p dylib-tests --features debug-assertions
30+
build-miri:
31+
name: Build and test (Miri)
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: dtolnay/rust-toolchain@nightly
36+
- name: Build
37+
run: cargo miri test --features debug-assertions
38+
lint:
39+
name: Lint
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: dtolnay/rust-toolchain@stable
44+
- name: cargo clippy
45+
run: cargo clippy --all-features -- -D warnings
46+
fmt:
47+
name: Formatting
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: dtolnay/rust-toolchain@stable
52+
- name: cargo fmt --check
53+
run: cargo fmt -- --check --color=always

0 commit comments

Comments
 (0)