Skip to content

Commit

Permalink
chore: repo maintainence work
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Aug 10, 2024
1 parent 68e2f01 commit 8d87ca3
Show file tree
Hide file tree
Showing 38 changed files with 212 additions and 183 deletions.
76 changes: 26 additions & 50 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,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: dtolnay/rust-toolchain@stable
- run: cargo check
no-default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --no-default-features
features:
runs-on: ubuntu-latest
strategy:
Expand All @@ -34,55 +32,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
- uses: dtolnay/rust-toolchain@stable
- name: Feature ${{matrix.feature}}
run: cargo check --no-default-features --features=${{matrix.feature}}
- name: Feature ${{matrix.feature}}
run: cargo check --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@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: 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, 1.70.0 ]
toolchain: [ nightly, beta, stable, 1.75.0 ]
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
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
command: check
args: --workspace --all-targets --all-features
toolchain: ${{matrix.toolchain}}
- name: Toolchain ${{matrix.toolchain}}
run: cargo +${{matrix.toolchain}} check --workspace --all-targets --all-features
47 changes: 15 additions & 32 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,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
42 changes: 12 additions & 30 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,27 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustc nightly
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
name: Formatting
with:
command: fmt
args: --all -- --check
- name: Formatting
run: cargo +nightly fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustc stable
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
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
- name: Formatting
run: 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
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
override: true
components: rust-docs
- uses: actions-rs/cargo@v1
name: Doc
with:
command: doc
args: --workspace --all-features
- name: Formatting
run: cargo +nightly doc --workspace --all-features
29 changes: 18 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ env:

jobs:
testing:
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: 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: wasm-pack test --headless --chrome
79 changes: 78 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022-2024 UBIDECO Institute, Switzerland
Copyright 2022-2024 UBIDECO Labs,
Institute for Distributed and Cognitive Systems, Switzerland

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 8d87ca3

Please sign in to comment.