Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@
rustflags = ["-C", "target-cpu=native"]

[target.x86_64-unknown-linux-gnu]
rustflags = [
"-C",
"target-cpu=native",
# (Nightly) Make the current crate share its generic instantiations
"-Zshare-generics=y",
]
rustflags = ["-C", "target-cpu=native"]
56 changes: 56 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
rust:
- changed-files:
- any-glob-to-any-file:
- crates/**
- packages/sdk-rs/**
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- rustfmt.toml

typescript:
- changed-files:
- any-glob-to-any-file:
- packages/sdk-ts/**
- packages/contract-types/**
- apps/**
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- tsconfig.json
- eslint.config.js
- .prettierrc.toml

python:
- changed-files:
- any-glob-to-any-file:
- packages/sdk-py/**

contracts:
- changed-files:
- any-glob-to-any-file:
- contracts/**
- contract-tests/**
- foundry.toml
- remappings.txt

docs:
- changed-files:
- any-glob-to-any-file:
- apps/docs/**
- book/**
- "*.md"

ci:
- changed-files:
- any-glob-to-any-file:
- .github/**

dependencies:
- changed-files:
- any-glob-to-any-file:
- Cargo.lock
- pnpm-lock.yaml
- package.json
- "**/Cargo.toml"
- "**/package.json"
38 changes: 38 additions & 0 deletions .github/workflows/ci-contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Contracts CI

on:
pull_request:
paths:
- contracts/**
- contract-tests/**
- contract-scripts/**
- foundry.toml
- remappings.txt
- .github/workflows/ci-contracts.yml

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
check:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: foundry-rs/foundry-toolchain@v1

- name: Check Solidity formatting
run: forge fmt --check

- name: Build
run: forge build

- name: Test
run: forge test
54 changes: 54 additions & 0 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Docs CI

on:
pull_request:
paths:
- apps/docs/**
- book/**
- .github/workflows/ci-docs.yml

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
vitepress:
name: Vitepress Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- run: pnpm install

- name: Build docs
run: pnpm --filter docs run build

mdbook:
name: mdBook Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: latest

- name: Install mdbook-mermaid
run: |
curl -OL https://github.com/badboy/mdbook-mermaid/releases/download/v0.17.0/mdbook-mermaid-v0.17.0-x86_64-unknown-linux-gnu.tar.gz
tar -xzf mdbook-mermaid-v0.17.0-x86_64-unknown-linux-gnu.tar.gz -C /usr/local/bin

- name: Build book
run: mdbook build book
52 changes: 52 additions & 0 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Python CI

on:
pull_request:
paths:
- packages/sdk-py/**
- .github/workflows/ci-python.yml

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
check:
name: Lint, Format & Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/sdk-py
steps:
- uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: poetry

- name: Install dependencies
working-directory: packages/sdk-py
run: poetry install

- name: Check formatting
working-directory: packages/sdk-py
run: poetry run black --check .

- name: Lint
working-directory: packages/sdk-py
run: poetry run ruff check .

- name: Type check
working-directory: packages/sdk-py
run: poetry run mypy src

- name: Test
working-directory: packages/sdk-py
run: poetry run pytest
81 changes: 81 additions & 0 deletions .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Rust CI

on:
pull_request:
paths:
- crates/**
- packages/sdk-rs/**
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- rustfmt.toml
- .github/workflows/ci-rust.yml

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: "1.94.0"

jobs:
fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt

- name: Install taplo
uses: taiki-e/install-action@v2
with:
tool: taplo-cli

- name: Check Rust formatting
run: cargo fmt --all --check

- name: Check TOML formatting
run: taplo fmt --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: clippy

- uses: Swatinem/rust-cache@v2

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libclang-dev

- run: cargo clippy --workspace --all-targets -- -D warnings

test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}

- uses: Swatinem/rust-cache@v2

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libclang-dev

- run: cargo test --workspace
55 changes: 55 additions & 0 deletions .github/workflows/ci-typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: TypeScript CI

on:
pull_request:
paths:
- packages/sdk-ts/**
- packages/contract-types/**
- apps/**
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- tsconfig.json
- eslint.config.js
- .prettierrc.toml
- .github/workflows/ci-typescript.yml

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
check:
name: Lint, Typecheck & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- run: pnpm install

- name: Lint
run: pnpm exec eslint packages apps --cache

- name: Format check
run: pnpm run format:check

- name: Typecheck
run: pnpm run typecheck

- name: Build
run: pnpm run build

- name: Test
run: pnpm run test
18 changes: 18 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Label PR

on:
pull_request_target:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
configuration-path: .github/labeler.yml
sync-labels: true
Loading
Loading