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 a440159
Show file tree
Hide file tree
Showing 38 changed files with 135 additions and 182 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
2 changes: 1 addition & 1 deletion Cargo.lock

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

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ license = "Apache-2.0"
[workspace.dependencies]
amplify = { version = "4.7.0" }
serde_crate = { package = "serde", version = "1", features = ["derive"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
rand = { version = "0.8.4", optional = true }
getrandom = { version = "0.2", features = ["js"], optional = true }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3"
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
4 changes: 2 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Maxim Orlovsky
---------------

- GitHub: [@dr-orlovsky](https://github.com/dr-orlovsky)
- GPG: `EAE730CEC0C663763F028A5860094BAF18A26EC9`
- SSH: `BoSGFzbyOKC7Jm28MJElFboGepihCpHop60nS8OoG/A`
- EMail: [[email protected]](mailto:[email protected])
- EMail: [[email protected]](mailto:[email protected])
7 changes: 3 additions & 4 deletions MANIFEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ Type: Library
Kind: Free software
License: Apache-2.0
Language: Rust
Compiler: 1.70
Compiler: 1.75
Author: Maxim Orlovsky
Maintained: UBIDECO Institute, Switzerland
Maintained: UBIDECO Labs, Institute for Distributed and Cognitive Computing, Switzerland
Maintainers:
Maxim Orlovsky:
GitHub: @dr-orlovsky
GPG: EAE730CEC0C663763F028A5860094BAF18A26EC9
SSH: BoSGFzbyOKC7Jm28MJElFboGepihCpHop60nS8OoG/A
EMail: [email protected]
EMail: [email protected]
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

This is a set of libraries for deterministic binary serialization using
[strict types] – type system made with category theory which ensures
provable properties and bounds for the in-memory and serialized type
provable properties and bounds for the in-memory and serialized type
representation.

The development of the libraries is performed by
[UBIDECO Institute](https://ubideco.org).
The development of the libraries is performed by
[UBIDECO Labs](https://ubideco.org).

## Overview

Expand All @@ -19,6 +19,7 @@ Strict types is a formal notation for defining and serializing
and confined way. It is developed with [type theory] in mind.

Strict Types are:

* __schema-based__ (with the schema being strict encoding notation),
* __semantic__, i.e. defines types not just as they are layed out in memory,
but also depending on their meaning,
Expand Down Expand Up @@ -53,5 +54,7 @@ types in binary formats.
The libraries are distributed on the terms of [Apache 2.0 license](LICENSE).

[strict types]: https://strict-types.org

[gadt]: https://en.wikipedia.org/wiki/Algebraic_data_type

[type theory]: https://en.wikipedia.org/wiki/Type_theory
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
codecov:
require_ci_to_pass: no
require_ci_to_pass: false

coverage:
precision: 1
Expand Down
Loading

0 comments on commit a440159

Please sign in to comment.