Skip to content

Commit d66d935

Browse files
authored
Merge pull request #5 from youknowone/ci
Add CI
2 parents e6eb49f + e28f333 commit d66d935

File tree

2 files changed

+54
-22
lines changed

2 files changed

+54
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
push:
3+
branches: [main, release]
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
merge_group:
7+
8+
name: CI
9+
10+
# Cancel previous workflows if they are the same workflow on same ref (branch/tags)
11+
# with the same event (push/pull_request) even they are in progress.
12+
# This setting will help reduce the number of duplicated workflows.
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
15+
cancel-in-progress: true
16+
17+
env:
18+
CARGO_ARGS: --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
19+
20+
jobs:
21+
rust_tests:
22+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
23+
env:
24+
RUST_BACKTRACE: full
25+
name: Run rust tests
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
os: [ubuntu-latest, windows-latest]
30+
fail-fast: false
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: dtolnay/rust-toolchain@stable
34+
- name: Set up the Mac environment
35+
run: brew install autoconf automake libtool
36+
if: runner.os == 'macOS'
37+
38+
- uses: Swatinem/rust-cache@v2
39+
40+
- name: run tests
41+
run: cargo test --all --all-features
42+
43+
lint:
44+
name: Check Rust code with rustfmt and clippy
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: dtolnay/rust-toolchain@stable
49+
with:
50+
components: rustfmt, clippy
51+
- name: run rustfmt
52+
run: cargo fmt --all -- --check
53+
- name: run clippy
54+
run: cargo clippy --all --all-features -- -Dwarnings

Cargo.toml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,19 @@ members = [
1818
ahash = "0.7.6"
1919
anyhow = "1.0.45"
2020
ascii = "1.0"
21-
atty = "0.2.14"
22-
bincode = "1.3.3"
2321
bitflags = "1.3.2"
2422
bstr = "0.2.17"
2523
cfg-if = "1.0"
26-
chrono = "0.4.19"
27-
crossbeam-utils = "0.8.9"
28-
flame = "0.2.2"
29-
glob = "0.3"
30-
hex = "0.4.3"
31-
indexmap = "1.8.1"
3224
insta = "1.14.0"
3325
itertools = "0.10.3"
34-
libc = "0.2.133"
3526
log = "0.4.16"
36-
nix = "0.26"
3727
num-complex = "0.4.0"
3828
num-bigint = "0.4.3"
39-
num-integer = "0.1.44"
40-
num-rational = "0.4.0"
4129
num-traits = "0.2"
42-
num_enum = "0.5.7"
43-
once_cell = "1.13"
44-
parking_lot = "0.12"
45-
paste = "1.0.7"
4630
rand = "0.8.5"
47-
rustyline = "11"
4831
serde = "1.0"
49-
schannel = "0.1.19"
5032
static_assertions = "1.1"
51-
syn = "1.0.91"
52-
thiserror = "1.0"
53-
thread_local = "1.1.4"
5433
unicode_names2 = { version = "0.6.0", git = "https://github.com/youknowone/unicode_names2.git", rev = "4ce16aa85cbcdd9cc830410f1a72ef9a235f2fde" }
55-
widestring = "0.5.1"
5634

5735
[profile.dev.package."*"]
5836
opt-level = 3

0 commit comments

Comments
 (0)