(fix): some ci stuff
Some checks failed
CI / rustfmt (push) Successful in 3m5s
CI / wasm build (push) Failing after 3m44s
CI / clippy (push) Failing after 3m44s
CI / test (push) Failing after 3m44s
CI / web client (push) Has been cancelled
CI / duplicate code (push) Has been cancelled
CI / example (push) Has been cancelled
CI / cargo-machete (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
Some checks failed
CI / rustfmt (push) Successful in 3m5s
CI / wasm build (push) Failing after 3m44s
CI / clippy (push) Failing after 3m44s
CI / test (push) Failing after 3m44s
CI / web client (push) Has been cancelled
CI / duplicate code (push) Has been cancelled
CI / example (push) Has been cancelled
CI / cargo-machete (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
This commit is contained in:
parent
6b9bbb6ebf
commit
88f8f93d89
10 changed files with 83 additions and 121 deletions
|
|
@ -8,6 +8,8 @@ on:
|
|||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
NIX_CONFIG: experimental-features = nix-command flakes
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
name: rustfmt
|
||||
|
|
@ -15,17 +17,15 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl build-essential pkg-config libssl-dev
|
||||
|
||||
- name: Install Rust
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --component rustfmt
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo fmt --all --check
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command cargo fmt --all --check
|
||||
|
||||
clippy:
|
||||
name: clippy
|
||||
|
|
@ -33,18 +33,15 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl build-essential pkg-config libssl-dev
|
||||
|
||||
- name: Install Rust
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --component clippy
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Run clippy
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export MTP_TYPE_MAPS="$PWD/example/type-maps.yaml"
|
||||
cargo clippy --workspace --exclude mtp-wasm --all-targets --all-features -- -D warnings -W unreachable-pub
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command mtp-clippy
|
||||
|
||||
test:
|
||||
name: test
|
||||
|
|
@ -52,18 +49,15 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl build-essential pkg-config libssl-dev
|
||||
|
||||
- name: Install Rust
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export MTP_TYPE_MAPS="$PWD/example/type-maps.yaml"
|
||||
cargo test --workspace --exclude mtp-wasm --all-features
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command bash -lc 'cargo test --workspace --exclude mtp-wasm --all-features'
|
||||
|
||||
wasm:
|
||||
name: wasm build
|
||||
|
|
@ -71,18 +65,15 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl build-essential pkg-config libssl-dev lld
|
||||
|
||||
- name: Install Rust
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --target wasm32-unknown-unknown
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Build wasm crate
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export MTP_TYPE_MAPS="$PWD/example/type-maps.yaml"
|
||||
cargo build -p mtp-wasm --target wasm32-unknown-unknown
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command bash -lc 'cargo build -p mtp-wasm --target wasm32-unknown-unknown'
|
||||
env:
|
||||
RUSTFLAGS: --cfg web_sys_unstable_apis
|
||||
|
||||
|
|
@ -92,19 +83,16 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl build-essential pkg-config libssl-dev
|
||||
|
||||
- name: Install Rust
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Check example usage workspace
|
||||
working-directory: example
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export MTP_TYPE_MAPS="$PWD/type-maps.yaml"
|
||||
cargo check --workspace --all-targets --all-features
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop .. --command bash -lc 'export MTP_TYPE_MAPS="$PWD/type-maps.yaml"; cargo check --workspace --all-targets --all-features'
|
||||
|
||||
deny:
|
||||
name: cargo-deny
|
||||
|
|
@ -112,22 +100,15 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl build-essential pkg-config libssl-dev
|
||||
|
||||
- name: Install Rust
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
|
||||
- name: Install cargo-deny
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo install cargo-deny --locked
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Run cargo-deny
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo deny check
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command cargo deny check advisories bans sources
|
||||
|
||||
machete:
|
||||
name: cargo-machete
|
||||
|
|
@ -135,22 +116,15 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl build-essential pkg-config libssl-dev
|
||||
|
||||
- name: Install Rust
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
|
||||
- name: Install cargo-machete
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo install cargo-machete --locked
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Run cargo-machete
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo machete
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command mtp-machete
|
||||
|
||||
duplicates:
|
||||
name: duplicate code
|
||||
|
|
@ -158,22 +132,20 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip nodejs
|
||||
|
||||
- name: Install pnpm
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl -fsSL https://get.pnpm.io/install.sh | SHELL=/bin/sh sh -
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PATH="$HOME/.local/share/pnpm:$PATH"
|
||||
pnpm install --frozen-lockfile
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run duplicate detector
|
||||
run: |
|
||||
export PATH="$HOME/.local/share/pnpm:$PATH"
|
||||
pnpm run dup
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command pnpm run dup
|
||||
|
||||
web-client:
|
||||
name: web client
|
||||
|
|
@ -181,42 +153,31 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip nodejs build-essential pkg-config libssl-dev lld
|
||||
|
||||
- name: Install Rust
|
||||
- name: Install Nix
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --target wasm32-unknown-unknown
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --daemon
|
||||
|
||||
- name: Build wasm package
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export MTP_TYPE_MAPS="$PWD/example/type-maps.yaml"
|
||||
wasm-pack build wasm --target web
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command wasm-pack build wasm --target web
|
||||
env:
|
||||
RUSTFLAGS: --cfg web_sys_unstable_apis
|
||||
|
||||
- name: Install pnpm
|
||||
run: |
|
||||
curl -fsSL https://get.pnpm.io/install.sh | SHELL=/bin/sh sh -
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PATH="$HOME/.local/share/pnpm:$PATH"
|
||||
pnpm install --frozen-lockfile
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build TypeScript package
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$HOME/.local/share/pnpm:$PATH"
|
||||
export MTP_TYPE_MAPS="$PWD/example/type-maps.yaml"
|
||||
pnpm run build
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command pnpm run build
|
||||
env:
|
||||
RUSTFLAGS: --cfg web_sys_unstable_apis
|
||||
|
||||
- name: Build web client
|
||||
run: |
|
||||
export PATH="$HOME/.local/share/pnpm:$PATH"
|
||||
pnpm --filter mtp-web-client run build
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix develop --command pnpm --filter mtp-web-client run build
|
||||
|
|
|
|||
14
Cargo.toml
14
Cargo.toml
|
|
@ -46,18 +46,18 @@ edition = "2024"
|
|||
|
||||
[dependencies]
|
||||
# --- always-on core ---
|
||||
mtp-common = { path = "common" }
|
||||
mtp-type-map = { path = "type-map" }
|
||||
mtp-codec = { path = "codec" }
|
||||
mtp-transport = { path = "transport" }
|
||||
mtp-common = { version = "0.1.0", path = "common" }
|
||||
mtp-type-map = { version = "0.1.0", path = "type-map" }
|
||||
mtp-codec = { version = "0.1.0", path = "codec" }
|
||||
mtp-transport = { version = "0.1.0", path = "transport" }
|
||||
|
||||
# --- optional, behind features ---
|
||||
mtp-crypto = { path = "crypto", optional = true, features = [
|
||||
mtp-crypto = { version = "0.1.0", path = "crypto", optional = true, features = [
|
||||
"serde",
|
||||
"mlkem-tls",
|
||||
] }
|
||||
mtp-host = { path = "host", optional = true }
|
||||
mtp-client = { path = "client", optional = true }
|
||||
mtp-host = { version = "0.1.0", path = "host", optional = true }
|
||||
mtp-client = { version = "0.1.0", path = "client", optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ version = "0.1.0"
|
|||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
mtp-common = { path = "../common" }
|
||||
mtp-codec = { path = "../codec" }
|
||||
mtp-transport = { path = "../transport" }
|
||||
mtp-crypto = { path = "../crypto", optional = true }
|
||||
mtp-common = { version = "0.1.0", path = "../common" }
|
||||
mtp-codec = { version = "0.1.0", path = "../codec" }
|
||||
mtp-transport = { version = "0.1.0", path = "../transport" }
|
||||
mtp-crypto = { version = "0.1.0", path = "../crypto", optional = true }
|
||||
rand = "0.8"
|
||||
tokio = { version = "1", features = ["time"] }
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ version = "0.1.0"
|
|||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
mtp-type-map = { path = "../type-map" }
|
||||
mtp-common = { path = "../common" }
|
||||
mtp-crypto = { path = "../crypto", optional = true }
|
||||
mtp-type-map = { version = "0.1.0", path = "../type-map" }
|
||||
mtp-common = { version = "0.1.0", path = "../common" }
|
||||
mtp-crypto = { version = "0.1.0", path = "../crypto", optional = true }
|
||||
base64 = "0.22"
|
||||
byteorder = "1.5"
|
||||
rand = { version = "0.8", features = ["std", "std_rng"] }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ name = "client"
|
|||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
mtp = { path = "../../", features = ["client", "crypto"] }
|
||||
mtp = { version = "0.1.0", path = "../../", features = ["client", "crypto"] }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
serde_json = "1"
|
||||
hex = "0.4"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ name = "server"
|
|||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
mtp = { path = "../../", features = ["crypto", "host"] }
|
||||
mtp = { version = "0.1.0", path = "../../", features = ["crypto", "host"] }
|
||||
rcgen = "0.14"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
serde_json = { version = "1" }
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
buildAll = pkgs.writeShellApplication {
|
||||
name = "mtp-build-all";
|
||||
runtimeInputs = [rustToolchain pkgs.wasm-pack pkgs.pnpm pkgs.coreutils clippyCheck macheteCheck];
|
||||
runtimeInputs = [rustToolchain pkgs.cargo-deny pkgs.wasm-pack pkgs.pnpm pkgs.coreutils clippyCheck macheteCheck];
|
||||
text = ''
|
||||
export MTP_TYPE_MAPS="''${MTP_TYPE_MAPS:-$PWD/example/type-maps.yaml}"
|
||||
|
||||
|
|
@ -78,6 +78,7 @@
|
|||
|
||||
buildInputs = with pkgs; [
|
||||
rustToolchain
|
||||
cargo-deny
|
||||
cargo-machete
|
||||
wasm-pack
|
||||
pnpm
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ version = "0.1.0"
|
|||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
mtp-common = { path = "../common" }
|
||||
mtp-codec = { path = "../codec", features = ["registry"] }
|
||||
mtp-transport = { path = "../transport", features = ["host"] }
|
||||
mtp-crypto = { path = "../crypto", optional = true }
|
||||
mtp-common = { version = "0.1.0", path = "../common" }
|
||||
mtp-codec = { version = "0.1.0", path = "../codec", features = ["registry"] }
|
||||
mtp-transport = { version = "0.1.0", path = "../transport", features = ["host"] }
|
||||
mtp-crypto = { version = "0.1.0", path = "../crypto", optional = true }
|
||||
rand = "0.8"
|
||||
tokio = { version = "1", features = ["time"] }
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ version = "0.1.0"
|
|||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
mtp-codec = { path = "../codec" }
|
||||
mtp-common = { path = "../common" }
|
||||
mtp-codec = { version = "0.1.0", path = "../codec" }
|
||||
mtp-common = { version = "0.1.0", path = "../common" }
|
||||
wtransport = { version = "0.7.1", default-features = false, features = [
|
||||
"aws-lc-rs",
|
||||
"quinn",
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ hex = "0.4"
|
|||
getrandom = { version = "0.4", features = ["wasm_js"] }
|
||||
getrandom-v02 = { package = "getrandom", version = "0.2", features = ["js"] }
|
||||
|
||||
mtp-common = { path = "../common" }
|
||||
mtp-type-map = { path = "../type-map" }
|
||||
mtp-codec = { path = "../codec", features = ["crypto"] }
|
||||
mtp-crypto = { path = "../crypto", features = ["wasm"] }
|
||||
mtp-common = { version = "0.1.0", path = "../common" }
|
||||
mtp-type-map = { version = "0.1.0", path = "../type-map" }
|
||||
mtp-codec = { version = "0.1.0", path = "../codec", features = ["crypto"] }
|
||||
mtp-crypto = { version = "0.1.0", path = "../crypto", features = ["wasm"] }
|
||||
|
||||
[dev-dependencies]
|
||||
wasm-bindgen-test = "0.3"
|
||||
|
|
|
|||
Loading…
Reference in a new issue