Skip to content
8 changes: 4 additions & 4 deletions .github/workflows/bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ on:
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: sdk-bindings-${{ github.event.pull_request.number || github.ref }}
group: bindings-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

jobs:
go:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install uniffi-bindgen-go
run: cargo install uniffi-bindgen-go --git https://github.com/filament-dm/uniffi-bindgen-go --rev ab7315502bd6b979207fdae854e87d531ee8764d
- name: Build the bindings
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Build the bindings
run: make kotlin
- name: Checks for uncommitted changes
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Build the bindings
run: make python
- name: Checks for uncommitted changes
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/dprint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Dprint

on:
push:
branches: [develop, sdk-bindings]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

concurrency:
group: dprint-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings

jobs:
dprint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install dprint
run: curl -fsSL https://dprint.dev/install.sh | sh
- name: Check dprint formatting
run: ~/.dprint/bin/dprint check
68 changes: 68 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Lints

on:
push:
branches: [develop, sdk-bindings]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

concurrency:
group: lints-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- uses: taiki-e/install-action@cargo-hack

- name: Install latest nightly
run: rustup toolchain install nightly --component rustfmt --allow-downgrade

- name: rustfmt
run: make check-fmt

- name: clippy
run: make clippy

- name: rustdoc
run: make doc

- name: feature compatibility
run: make check-features

- run: make is-dirty

cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install cargo-deny
run: cargo install cargo-deny
- name: cargo deny (bans, licenses, sources, advisories)
run: cargo deny --manifest-path './Cargo.toml' check bans licenses sources advisories --hide-inclusion-graph

check-unused-deps:
name: Check Unused Dependencies (${{ matrix.flags }})
strategy:
matrix:
flags: ["--all-features", "--no-default-features"]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install nightly cargo-udeps
run: cargo +nightly install cargo-udeps
- name: Run Cargo Udeps
run: cargo +nightly udeps ${{ matrix.flags }}
29 changes: 29 additions & 0 deletions .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "PR title"

on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
- ready_for_review

jobs:
validate:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
with:
types: |
feat
fix
refactor
chore
upstream
requireScope: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: rustdoc

on:
push:
branches: [develop]
branches: [develop, sdk-bindings]
workflow_dispatch:

env:
Expand All @@ -16,13 +16,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: rustdoc
run: make doc

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
Expand Down
73 changes: 18 additions & 55 deletions .github/workflows/ci.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: CI
name: Tests

on:
push:
branches: [develop]
branches: [develop, sdk-bindings]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
schedule: [cron: "40 1 * * *"]

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
group: tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

permissions:
Expand All @@ -19,12 +19,12 @@ env:
RUSTFLAGS: -Dwarnings

jobs:
test:
tests:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: rust version
run: |
Expand All @@ -36,55 +36,7 @@ jobs:
- name: Run tests
run: make test

lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: taiki-e/install-action@cargo-hack

- name: Install latest nightly
run: rustup toolchain install nightly --component rustfmt --allow-downgrade

- name: rustfmt
run: make check-fmt

- name: clippy
run: make clippy

- name: rustdoc
run: make doc

- name: feature compatibility
run: make check-features

- run: make is-dirty

wasm:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: rust version
run: |
rustc --version
cargo --version

- uses: taiki-e/install-action@wasm-pack

- name: Install clang
run: sudo apt-get install -y clang

- name: Run tests in wasm
run: RUSTFLAGS='-Dwarnings --cfg getrandom_backend="wasm_js"' make wasm

- run: make is-dirty

run_tests_with_network:
tests-with-network:
runs-on: ubuntu-latest
env:
EPOCH_DURATION_MS: 10000
Expand All @@ -105,7 +57,7 @@ jobs:
- 5432:5432
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: rust version
run: |
Expand Down Expand Up @@ -136,3 +88,14 @@ jobs:
run: |
sleep $((EPOCH_DURATION_MS / 1000)) # wait for the network to get to epoch #2
make test-with-localnet

doctests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: doctests
run: |
cargo test --doc
- name: rustdoc
run: |
cargo doc --all-features --workspace --no-deps
2 changes: 1 addition & 1 deletion .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install typos-cli
run: cargo install typos-cli
- name: Run typos-cli
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: WASM

on:
push:
branches: [develop, sdk-bindings]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

concurrency:
group: wasm-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings

jobs:
wasm:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: rust version
run: |
rustc --version
cargo --version

- uses: taiki-e/install-action@wasm-pack

- name: Install clang
run: sudo apt-get install -y clang

- name: Run tests in wasm
run: RUSTFLAGS='-Dwarnings --cfg getrandom_backend="wasm_js"' make wasm

- run: make is-dirty
2 changes: 0 additions & 2 deletions crates/iota-graphql-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ description = "GraphQL RPC Client for the IOTA Blockchain"

[dependencies]
anyhow = "1.0.71"
async-stream = "0.3.3"
async-trait = "0.1.61"
base64ct = { version = "1.6.0", features = ["alloc", "std"] }
bcs = "0.1.4"
chrono = "0.4.26"
Expand Down
2 changes: 2 additions & 0 deletions crates/iota-sdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[package]
name = "iota-sdk-ffi"
version = "0.0.1"
authors = ["IOTA Foundation <[email protected]>"]
edition = "2024"
license = "Apache-2.0"

[[bin]]
name = "iota_sdk_bindings"
Expand Down
Loading