(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
|
||||
|
|
|
|||
Loading…
Reference in a new issue