Skip to content

Commit

Permalink
Merge pull request #40 from strict-types/develop
Browse files Browse the repository at this point in the history
Repo maintenance. Release v2.7.0 RC1
  • Loading branch information
dr-orlovsky authored Aug 10, 2024
2 parents 11b3fca + 30379b5 commit fd898f7
Show file tree
Hide file tree
Showing 42 changed files with 634 additions and 316 deletions.
88 changes: 35 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: Build

on:
push:
branches: [ master ]
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'
pull_request:
branches: [ master ]
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'

env:
CARGO_TERM_COLOR: always
Expand All @@ -13,17 +19,15 @@ jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Default build
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- run: nix develop ".#stable" -c cargo check --workspace
no-default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- run: nix develop ".#stable" -c cargo check --workspace --no-default-features
features:
runs-on: ubuntu-latest
strategy:
Expand All @@ -34,55 +38,33 @@ jobs:
- derive
- serde
steps:
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Feature ${{ matrix.feature }}
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features=${{ matrix.feature }}
- name: Defaults + ${{ matrix.feature }}
uses: actions-rs/cargo@v1
with:
command: check
args: --features=${{ matrix.feature }}
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Feature ${{matrix.feature}}
run: nix develop ".#stable" -c cargo check --no-default-features --features=${{matrix.feature}}
- name: Feature ${{matrix.feature}}
run: nix develop ".#stable" -c cargo check --features=${{matrix.feature}}
platforms:
# NOTE: Don't use nix in platform checks everything should be based on the host system
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@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build with all features
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets --all-features
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Check ${{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, 1.70.0 ]
toolchain: [ nightly, beta, stable, msrv ]
steps:
- uses: actions/checkout@v2
- name: Install rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: All features
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets --all-features
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- name: Check ${{matrix.toolchain}}
run: nix develop ".#${{ matrix.toolchain }}" -c cargo check --workspace --all-targets --all-features
57 changes: 23 additions & 34 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: Codecov

on:
push:
branches: [ master ]
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'
pull_request:
branches: [ master ]
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'

env:
CARGO_TERM_COLOR: always
Expand All @@ -13,39 +19,22 @@ jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up toolchain
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, llvm-tools-preview
- name: Build
uses: actions-rs/cargo@v1
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:
command: build
args: --release
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Cinstrument-coverage"
RUSTDOCFLAGS: "-Cinstrument-coverage"
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Cinstrument-coverage"
RUSTDOCFLAGS: "-Cinstrument-coverage"
- name: Install grcov
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
- name: Generate coverage
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.lcov
flags: rust
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
58 changes: 20 additions & 38 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: Lints

on:
push:
branches: [ master ]
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'
pull_request:
branches: [ master ]
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'

env:
CARGO_TERM_COLOR: always
Expand All @@ -13,45 +19,21 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustc nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
name: Formatting
with:
command: fmt
args: --all -- --check
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- name: Formatting
run: nix develop ".#nightly" -c cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustc stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- uses: actions-rs/cargo@v1
name: Clippy
with:
command: clippy
args: --workspace --all-features --all-targets -- -D warnings
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- name: Formatting
run: nix develop ".#stable" -c cargo clippy --workspace --all-features --all-targets -- -D warnings
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustc nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-docs
- uses: actions-rs/cargo@v1
name: Doc
with:
command: doc
args: --workspace --all-features
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- name: Formatting
run: nix develop ".#nightly" -c cargo doc --workspace --all-features
39 changes: 26 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,38 @@ name: Tests

on:
push:
branches: [ master ]
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'
pull_request:
branches: [ master ]
branches:
- master
- develop
- 'v[0-9]+.[0-9]+'

env:
CARGO_TERM_COLOR: always

jobs:
testing:
# NOTE: Don't use nix in platform checks everything should be based on the host system
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- 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@v2
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build & test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features --no-fail-fast
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- name: Test main lib in headless Chrome
run: nix develop .#wasm -c wasm-pack test --headless --chrome rust
- name: Test derive lib in headless Chrome
run: nix develop .#wasm -c wasm-pack test --headless --chrome rust/derive
Loading

0 comments on commit fd898f7

Please sign in to comment.