Skip to content

Commit 9924df8

Browse files
committed
Add CI
1 parent 06949e7 commit 9924df8

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/rust.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_INCREMENTAL: 0
11+
CARGO_TERM_COLOR: always
12+
RUST_BACKTRACE: 1
13+
RUSTFLAGS: -D warnings
14+
RUSTDOCFLAGS: -D warnings --cfg docsrs
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
rust:
22+
- stable
23+
- beta
24+
- nightly
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Install toolchain
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: ${{ matrix.rust }}
31+
override: true
32+
components: rustfmt, clippy
33+
- name: Build
34+
run: cargo build --verbose
35+
- name: Run tests with all features
36+
run: cargo test --all-features --verbose
37+
- name: Run tests without features
38+
run: cargo test --lib --no-default-features --verbose
39+
- name: Package
40+
run: cargo package
41+
- name: Test package
42+
run: cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test
43+
- name: Test package without features
44+
run: cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test --lib --no-default-features
45+
- name: Build docs
46+
if: matrix.rust == 'nightly'
47+
run: cargo doc --all-features --verbose
48+
- name: Check formatting
49+
if: matrix.rust == 'stable'
50+
run: cargo fmt --all --check
51+
- name: Check clippy
52+
if: matrix.rust == 'stable'
53+
run: cargo clippy --all-features --lib --tests --examples --verbose
54+
- name: Check benchmarks with clippy
55+
if: matrix.rust == 'nightly'
56+
run: cargo clippy --all-features --benches --verbose
57+
msrv:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v2
61+
- name: Install msrv toolchain
62+
uses: actions-rs/toolchain@v1
63+
with:
64+
toolchain: 1.56
65+
override: true
66+
- name: Build
67+
run: cargo build --verbose --all-features
68+
regen:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v3
72+
- name: Regen
73+
run: cd scripts && python3 unicode.py
74+
- name: Diff tables
75+
run: diff src/tables.rs scripts/tables.rs

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy