Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.11 beta 7 #258

Merged
merged 10 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 28 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build Check
name: Build

on:
push:
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'
tags:
- 'v[0-9]+\.*'
pull_request:
branches:
- master
Expand All @@ -20,62 +20,48 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# NOTE: Dont use nix here, everything should be based on the ubuntu-latest
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Latest Ubuntu build check
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --workspace
no-default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --workspace --no-default-features
features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature:
- fs
- serde
feature: [ fs, serde ]
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Check feature ${{ matrix.feature }} only
run: nix develop .#stable -c cargo check --no-default-features --features=${{ matrix.feature }}
- name: Check feature ${{ matrix.feature }} with defaults
run: nix develop .#stable -c cargo check --features=${{ matrix.feature }}
- uses: dtolnay/rust-toolchain@stable
- name: Feature ${{matrix.feature}}
run: cargo check --workspace --no-default-features --features=${{matrix.feature}}
- name: Feature ${{matrix.feature}}
run: cargo check --workspace --features=${{matrix.feature}}
platforms:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, windows-2019, windows-2022 ]
os: [ ubuntu-22.04, ubuntu-latest, macos-13, macos-latest, windows-2019, windows-latest ]
steps:
- uses: actions/checkout@v4
# NOTE: Dont use nix in platform checks everything should based on the host system
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build check with all features
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets --all-features
- uses: dtolnay/rust-toolchain@stable
- name: Platform ${{matrix.os}}
run: cargo check --workspace --all-features # we skip test targets here to be sure that the main library can be built
toolchains:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [ nightly, beta, stable, msrv ]
toolchain: [ nightly, beta, stable, 1.76.0 ]
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Check Crates
run: nix develop ".#${{ matrix.toolchain }}" -c cargo check --workspace --all-targets --all-features
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.toolchain}}
- name: Toolchain ${{matrix.toolchain}}
run: cargo +${{matrix.toolchain}} check --workspace --all-targets --all-features
37 changes: 18 additions & 19 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'
tags:
- 'v[0-9]+\.*'
pull_request:
branches:
- master
Expand All @@ -19,23 +19,22 @@ jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Build
run: nix develop .#codecov -c cargo build --release
- name: Test
run: nix develop .#codecov -c cargo test --all-features --no-fail-fast --tests
- name: Install grcov
run: nix develop .#codecov -c cargo install grcov
- name: Generate coverage
run: nix develop .#codecov -c grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov
- name: Upload coverage to Codecov
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Collect coverage data (including doctests)
run: |
cargo +nightly llvm-cov --no-report nextest --workspace --all-features
cargo +nightly llvm-cov --no-report --doc --workspace --all-features
cargo +nightly llvm-cov report --doctests --lcov --output-path lcov.info
- name: Upload coverage data to codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.lcov
flags: rust
# TODO: set true when CODECOV_TOKEN is set
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
35 changes: 19 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Lints

on:
push:
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'
pull_request:
branches:
- master
Expand All @@ -20,23 +15,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Formatting
run: nix develop .#nightly -c cargo fmt --all -- --check
run: cargo +nightly fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Clippy
run: nix develop .#stable -c cargo clippy --workspace --all-features --all-targets -- -D warnings
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Formatting
run: cargo clippy --workspace --all-features --all-targets -- -D warnings
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Doc
run: nix develop .#nightly -c cargo doc --workspace --all-features
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-docs
- name: Formatting
run: cargo +nightly doc --workspace --all-features
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master
25 changes: 15 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'
tags:
- 'v[0-9]+\.*'
pull_request:
branches:
- master
Expand All @@ -17,18 +17,23 @@ env:

jobs:
testing:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Build & test
run: nix develop .#stable -c cargo test --workspace --all-features --no-fail-fast --tests
- uses: dtolnay/rust-toolchain@stable
- name: Test ${{matrix.os}}
run: cargo test --workspace --all-features --no-fail-fast
wasm-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- uses: dtolnay/rust-toolchain@nightly
- uses: jetli/[email protected]
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Test in headless Chrome
run: nix develop .#wasm -c wasm-pack test --headless --chrome
run: wasm-pack test --headless --chrome
7 changes: 3 additions & 4 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ version = "Two"
max_width = 100
array_width = 100
attr_fn_like_width = 100
comment_width = 100
fn_call_width = 100
single_line_if_else_max_width = 100

format_code_in_doc_comments = true
fn_single_line = true
format_code_in_doc_comments = true
format_macro_matchers = true
format_macro_bodies = true
format_strings = true
Expand All @@ -19,9 +21,6 @@ use_try_shorthand = true
wrap_comments = true
where_single_line = true
unstable_features = true
empty_item_single_line = true

binop_separator = "Back"

imports_granularity = "Module"
group_imports = "StdExternalCrate"
Loading
Loading