Merge pull request #5 from youknowone/ci

Add CI
This commit is contained in:
Jeong, YunWon 2023-05-06 03:42:28 +09:00 committed by GitHub
commit d66d935879
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 22 deletions

54
.github/workflows/ci.yaml vendored Normal file
View file

@ -0,0 +1,54 @@
on:
push:
branches: [main, release]
pull_request:
types: [opened, synchronize, reopened]
merge_group:
name: CI
# Cancel previous workflows if they are the same workflow on same ref (branch/tags)
# with the same event (push/pull_request) even they are in progress.
# This setting will help reduce the number of duplicated workflows.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
env:
CARGO_ARGS: --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
jobs:
rust_tests:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
env:
RUST_BACKTRACE: full
name: Run rust tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Set up the Mac environment
run: brew install autoconf automake libtool
if: runner.os == 'macOS'
- uses: Swatinem/rust-cache@v2
- name: run tests
run: cargo test --all --all-features
lint:
name: Check Rust code with rustfmt and clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: run rustfmt
run: cargo fmt --all -- --check
- name: run clippy
run: cargo clippy --all --all-features -- -Dwarnings

View file

@ -18,41 +18,19 @@ members = [
ahash = "0.7.6"
anyhow = "1.0.45"
ascii = "1.0"
atty = "0.2.14"
bincode = "1.3.3"
bitflags = "1.3.2"
bstr = "0.2.17"
cfg-if = "1.0"
chrono = "0.4.19"
crossbeam-utils = "0.8.9"
flame = "0.2.2"
glob = "0.3"
hex = "0.4.3"
indexmap = "1.8.1"
insta = "1.14.0"
itertools = "0.10.3"
libc = "0.2.133"
log = "0.4.16"
nix = "0.26"
num-complex = "0.4.0"
num-bigint = "0.4.3"
num-integer = "0.1.44"
num-rational = "0.4.0"
num-traits = "0.2"
num_enum = "0.5.7"
once_cell = "1.13"
parking_lot = "0.12"
paste = "1.0.7"
rand = "0.8.5"
rustyline = "11"
serde = "1.0"
schannel = "0.1.19"
static_assertions = "1.1"
syn = "1.0.91"
thiserror = "1.0"
thread_local = "1.1.4"
unicode_names2 = { version = "0.6.0", git = "https://github.com/youknowone/unicode_names2.git", rev = "4ce16aa85cbcdd9cc830410f1a72ef9a235f2fde" }
widestring = "0.5.1"
[profile.dev.package."*"]
opt-level = 3