mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
+119
@@ -0,0 +1,119 @@
|
||||
# CI/CD Workflows
|
||||
|
||||
## Overview
|
||||
|
||||
Our CI/CD pipeline is optimized for speed and automation using:
|
||||
- Self-hosted `builder` runner for better performance
|
||||
- Smart scope detection via `github-env.sh`
|
||||
- Automated versioning and releases via `devbox` commands
|
||||
|
||||
## Workflows
|
||||
|
||||
### PR CI (`pr.yml`)
|
||||
**Trigger**: Pull requests
|
||||
**Purpose**: Validate, test, and build changed components
|
||||
**Features**:
|
||||
- Only tests/builds affected scopes
|
||||
- Runs linting first for fast feedback
|
||||
- Cleans up artifacts after run
|
||||
|
||||
### Post-Merge Release (`merge.yml`)
|
||||
**Trigger**: Push to master/main
|
||||
**Purpose**: Automated version bumping and releases
|
||||
**Features**:
|
||||
- Auto-detects version increment from milestones
|
||||
- Bumps versions, creates tags, and releases
|
||||
- Publishes to package registries
|
||||
|
||||
### Nightly Snapshot (`nightly.yml`)
|
||||
**Trigger**: Daily at 2 AM UTC or manual
|
||||
**Purpose**: Build development snapshots
|
||||
**Features**:
|
||||
- Creates snapshot builds without version bumps
|
||||
- Useful for testing bleeding-edge changes
|
||||
|
||||
### Manual Release (`manual-release.yml`)
|
||||
**Trigger**: Manual workflow dispatch
|
||||
**Purpose**: Override for emergency releases
|
||||
**Features**:
|
||||
- Select specific scope to release
|
||||
- Choose version increment (patch/minor/major)
|
||||
- Bypasses automatic detection
|
||||
|
||||
### CI Status (`ci-status.yml`)
|
||||
**Trigger**: Other workflow completions
|
||||
**Purpose**: Monitor CI health and report failures
|
||||
|
||||
## Key Commands
|
||||
|
||||
All workflows use these devbox commands that automatically detect changes:
|
||||
|
||||
```bash
|
||||
devbox run test # Tests only affected scopes
|
||||
devbox run build # Builds only affected scopes
|
||||
devbox run bump # Bumps versions for affected scopes
|
||||
devbox run release # Releases affected scopes
|
||||
devbox run publish # Publishes affected scopes
|
||||
devbox run snapshot # Creates snapshots for affected scopes
|
||||
```
|
||||
|
||||
## Performance Optimizations
|
||||
|
||||
1. **Self-hosted Runner**: All workflows run on `builder` for:
|
||||
- Local dependency caching
|
||||
- No cold starts
|
||||
- Unlimited build time
|
||||
|
||||
2. **Smart Caching**:
|
||||
- Go modules cached at `~/go/pkg/mod`
|
||||
- pnpm store cached at `~/.local/share/pnpm/store`
|
||||
- Devbox packages cached at `~/.devbox`
|
||||
|
||||
3. **Scope Detection**: Only test/build what changed using `github-env.sh`
|
||||
|
||||
4. **Cleanup Steps**: Prevent disk fill on self-hosted runner
|
||||
|
||||
## Adding New Components
|
||||
|
||||
1. Add scope to `.github/scopes.json`:
|
||||
```json
|
||||
{
|
||||
"name": "new-component",
|
||||
"include": ["path/to/component/**"]
|
||||
}
|
||||
```
|
||||
|
||||
2. Add scripts to `devbox.json`:
|
||||
```json
|
||||
"test:new-component": "make test-new-component",
|
||||
"build:new-component": "make build-new-component",
|
||||
"bump:new-component": "make -C path/to/component bump",
|
||||
"release:new-component": "make -C path/to/component release"
|
||||
```
|
||||
|
||||
3. That's it! CI automatically picks up the new scope.
|
||||
|
||||
## Secrets Required
|
||||
|
||||
- `GH_PAT_TOKEN`: GitHub Personal Access Token for pushing tags
|
||||
- `GORELEASER_KEY`: GoReleaser Pro license key
|
||||
- `NPM_TOKEN`: NPM registry authentication
|
||||
- `CLOUDFLARE_API_TOKEN`: For deploying web apps
|
||||
- `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY`: For S3 uploads
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Workflow not detecting changes?
|
||||
- Check `.github/scopes.json` includes the correct paths
|
||||
- Verify `github-env.sh` is executable
|
||||
- Ensure full git history with `fetch-depth: 0`
|
||||
|
||||
### Self-hosted runner issues?
|
||||
- Check runner has required dependencies
|
||||
- Verify disk space for builds
|
||||
- Check runner is online in Settings > Actions > Runners
|
||||
|
||||
### Release not triggering?
|
||||
- Verify component has `bump:*` and `release:*` scripts
|
||||
- Check git permissions with PAT token
|
||||
- Ensure commitizen config exists for component
|
||||
@@ -0,0 +1 @@
|
||||
@prnk28
|
||||
@@ -1,30 +0,0 @@
|
||||
title: "[Milestone] "
|
||||
labels: ["#OKR", "#PLANNING"]
|
||||
body:
|
||||
- type: input
|
||||
id: has-version
|
||||
attributes:
|
||||
label: Version
|
||||
description: A tag for the associated milestone.
|
||||
placeholder: v0.6.0
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Objective
|
||||
description: Explain the objective of the OKR in less than 100 characters.
|
||||
placeholder: Ethereum IBC integration with Sonr.
|
||||
render: markdown
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Task List
|
||||
description: |
|
||||
Break down the objective into a list of tasks to be completed.
|
||||
value: |
|
||||
- [ ] #
|
||||
- [ ] #
|
||||
- [ ] #
|
||||
validations:
|
||||
required: true
|
||||
@@ -1,38 +0,0 @@
|
||||
name: Bug Report
|
||||
description: File a bug report.
|
||||
title: "ERROR: "
|
||||
labels: ["#BUG", "#HELP"]
|
||||
projects: ["onsonr/39"]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Operating System
|
||||
description: What operating system are you using?
|
||||
placeholder: "Example: macOS Big Sur"
|
||||
value: operating system
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Network
|
||||
description: What network are you using?
|
||||
multiple: false
|
||||
options:
|
||||
- LocalNet
|
||||
- TestNet
|
||||
- MainNet
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description:
|
||||
The Code of Conduct helps create a safe space for everyone. We require
|
||||
that everyone agrees to it.
|
||||
options:
|
||||
- label: I agree to follow this project's [Code of Conduct](link/to/coc)
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thanks for completing our form!"
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Community Discussions
|
||||
url: https://github.com/orgs/onsonr/discussions
|
||||
about: Please submit ideas and suggestions here.
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
name: Default Todo
|
||||
about: Break down feature requirements into tasks.
|
||||
title: "Name of the new task"
|
||||
labels:
|
||||
- "#TODO"
|
||||
- "#OKR"
|
||||
assignees: "prnk28"
|
||||
projects: "onsonr/37"
|
||||
---
|
||||
|
||||
### Description
|
||||
|
||||
The expected deliverable of the task.
|
||||
|
||||
### Associated Files
|
||||
|
||||
These files will be modified by this task.
|
||||
|
||||
### References
|
||||
|
||||
Use these documents to help you complete the task.
|
||||
@@ -1,25 +0,0 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
## Description
|
||||
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## Related Issue(s)
|
||||
|
||||
<!--- This project only accepts pull requests related to open issues -->
|
||||
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
|
||||
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
|
||||
<!--- Please link to the issue here: -->
|
||||
|
||||
## Motivation and Context
|
||||
|
||||
<!--- Why is this change required? What problem does it solve? -->
|
||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
||||
|
||||
## How Has This Been Tested?
|
||||
|
||||
<!--- Please describe in detail how you tested your changes. -->
|
||||
<!--- Include details of your testing environment, and the tests you ran to -->
|
||||
<!--- see how your change affects other areas of the code, etc. -->
|
||||
|
||||
## Screenshots (if appropriate):
|
||||
@@ -0,0 +1,515 @@
|
||||
|
||||
[](https://pkg.go.dev/github.com/sonr-io/sonr)
|
||||

|
||||
[](https://sonr.io)
|
||||
[](https://goreportcard.com/report/github.com/sonr-io/sonr)
|
||||
|
||||
[](https://sonr.io)
|
||||
|
||||
> **Sonr is a blockchain ecosystem combining decentralized identity, secure data storage, and multi-chain interoperability. Built on Cosmos SDK v0.50.14, it provides users with self-sovereign identity through W3C DIDs, WebAuthn authentication, and personal data vaults—all without requiring cryptocurrency for onboarding.**
|
||||
|
||||
## 💡 Key Features
|
||||
|
||||
### 🔐 Gasless Onboarding
|
||||
|
||||
Create your first decentralized identity without owning cryptocurrency:
|
||||
|
||||
```bash
|
||||
# Register with WebAuthn (no tokens required!)
|
||||
snrd auth register --username alice
|
||||
|
||||
# Register with automatic vault creation
|
||||
snrd auth register --username bob --auto-vault
|
||||
```
|
||||
|
||||
### 🌐 Multi-Chain Support
|
||||
|
||||
- **Cosmos SDK**: Native integration with IBC ecosystem
|
||||
- **EVM Compatibility**: Ethereum smart contract support
|
||||
- **External Wallets**: MetaMask, Keplr, and more
|
||||
|
||||
### 🔑 Advanced Authentication
|
||||
|
||||
- **WebAuthn/Passkeys**: Biometric authentication
|
||||
- **Hardware Security Keys**: YubiKey, Titan Key support
|
||||
- **Multi-Signature**: Multiple verification methods per DID
|
||||
|
||||
### 📦 Decentralized Storage
|
||||
|
||||
- **IPFS Integration**: Distributed file storage
|
||||
- **Encrypted Vaults**: Hardware-backed encryption
|
||||
- **Protocol Schemas**: Structured data validation
|
||||
|
||||
## 📚 Technical Specifications
|
||||
|
||||
- **Cosmos SDK**: v0.50.14
|
||||
- **CometBFT**: v0.38.17
|
||||
- **IBC**: v8.7.0
|
||||
- **Go**: 1.24.1 (toolchain 1.24.4)
|
||||
- **WebAssembly**: CosmWasm v1.5.8
|
||||
- **Task Queue**: Asynq (Redis-based)
|
||||
- **Actor System**: Proto.Actor
|
||||
- **Storage**: IPFS, LevelDB
|
||||
|
||||
## 🔒 Security
|
||||
|
||||
### Gasless Transaction Security
|
||||
|
||||
- Limited to WebAuthn registration only
|
||||
- Full cryptographic validation required
|
||||
- Credential uniqueness enforcement
|
||||
- Anti-replay protection
|
||||
|
||||
### WebAuthn Security
|
||||
|
||||
- Origin validation
|
||||
- Challenge-response authentication
|
||||
- Device binding
|
||||
- Attestation verification
|
||||
|
||||
### Multi-Algorithm Support
|
||||
|
||||
- Ed25519 (quantum-resistant)
|
||||
- ECDSA (secp256k1, P-256)
|
||||
- RSA (2048, 3072, 4096 bits)
|
||||
- WebAuthn (ES256, RS256)
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/sonr-io/sonr
|
||||
cd sonr
|
||||
|
||||
# Install the binary
|
||||
make install
|
||||
|
||||
# Verify installation
|
||||
snrd version
|
||||
```
|
||||
|
||||
### Running a Local Node
|
||||
|
||||
```bash
|
||||
# Start single-node testnet (quick iteration)
|
||||
make localnet
|
||||
|
||||
# Start multi-node testnet with Starship
|
||||
make testnet-start
|
||||
|
||||
# Stop testnet
|
||||
make testnet-stop
|
||||
```
|
||||
|
||||
### Building from Source
|
||||
|
||||
```bash
|
||||
# Build all binaries
|
||||
make build # snrd blockchain node
|
||||
make build-hway # Highway service
|
||||
make build-vault # Vault WASM plugin
|
||||
|
||||
# Build Docker image
|
||||
make docker
|
||||
|
||||
# Generate code from proto files
|
||||
make proto-gen
|
||||
```
|
||||
|
||||
### Local Development Network
|
||||
|
||||
```bash
|
||||
# Standard localnet (auto-detects best method for your system)
|
||||
make localnet # Works on Arch Linux, Ubuntu, macOS, etc.
|
||||
|
||||
# Docker-based localnet (requires Docker)
|
||||
make dockernet # Runs in detached mode
|
||||
|
||||
# One-time setup for your system (optional)
|
||||
./scripts/setup_localnet.sh # Installs dependencies and configures environment
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
make test-all
|
||||
|
||||
# Module-specific tests
|
||||
make test-did # DID module tests
|
||||
make test-dwn # DWN module tests
|
||||
make test-svc # Service module tests
|
||||
|
||||
# E2E tests
|
||||
make ictest-basic # Basic chain functionality
|
||||
make ictest-ibc # IBC transfers
|
||||
make ictest-wasm # CosmWasm integration
|
||||
|
||||
# Test with coverage
|
||||
make test-cover
|
||||
```
|
||||
|
||||
### Infrastructure
|
||||
|
||||
```bash
|
||||
# IPFS for vault operations
|
||||
make ipfs-up # Start IPFS infrastructure
|
||||
make ipfs-down # Stop IPFS infrastructure
|
||||
make ipfs-status # Check IPFS connectivity
|
||||
```
|
||||
|
||||
## 🏗️ Architecture
|
||||
|
||||
Sonr consists of three primary components and three custom modules:
|
||||
|
||||
### Service Architecture
|
||||
|
||||
```
|
||||
┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ Caddy │────▶│ snrd │ │ IPFS │
|
||||
└─────────┘ └─────────┘ └─────────┘
|
||||
│ │ │
|
||||
│ ▼ ▼
|
||||
│ ┌─────────┐ ┌─────────┐
|
||||
└─────────▶│ Highway │────▶│ Redis │
|
||||
└─────────┘ └─────────┘
|
||||
```
|
||||
|
||||
- **Caddy**: Reverse proxy with gRPC-Web support (port 80)
|
||||
- **Redis**: Task queue backend for Highway (port 6379)
|
||||
- **Highway**: UCAN-based task processor (port 8090)
|
||||
- **IPFS**: Distributed storage (API: 5001, Gateway: 8080)
|
||||
- **snrd**: Blockchain node (gRPC: 9090, REST: 1317)
|
||||
|
||||
### Cross-Platform Support
|
||||
|
||||
The `localnet` target now automatically detects and uses the best available method:
|
||||
1. Checks for local binary (built with `make install`)
|
||||
2. Falls back to Docker if available
|
||||
3. Handles permission issues on systems like Arch Linux
|
||||
4. Supports systemd service installation (see `etc/systemd/`)
|
||||
|
||||
### Core Components
|
||||
|
||||
#### 1. **Blockchain Node (`snrd`)**
|
||||
|
||||
The main blockchain daemon built with Cosmos SDK v0.50.14, providing:
|
||||
|
||||
- AutoCLI for command generation
|
||||
- EVM compatibility via Evmos integration
|
||||
- IBC for cross-chain communication
|
||||
- CosmWasm smart contract support
|
||||
|
||||
#### 2. **Highway Service (`hway`)**
|
||||
|
||||
An Asynq-based task processing service for vault operations:
|
||||
|
||||
- Redis-backed job queue with priority levels
|
||||
- Actor-based concurrency using Proto.Actor framework
|
||||
- Processes cryptographic operations through WebAssembly enclaves
|
||||
|
||||
#### 3. **Motor Plugin (`motr`)**
|
||||
|
||||
WebAssembly-based vault system providing:
|
||||
|
||||
- Secure execution environment for sensitive operations
|
||||
- Hardware-backed key management
|
||||
- Multi-party computation capabilities
|
||||
|
||||
## 📖 Module Documentation
|
||||
|
||||
### DID Module
|
||||
|
||||
W3C DID specification implementation with:
|
||||
|
||||
- **Gasless WebAuthn Registration**: Create DIDs without cryptocurrency
|
||||
- **Multi-Algorithm Signatures**: Ed25519, ECDSA, RSA, WebAuthn
|
||||
- **External Wallet Linking**: MetaMask, Keplr integration
|
||||
- **Verifiable Credentials**: W3C-compliant credential issuance
|
||||
|
||||
```bash
|
||||
# Create a DID
|
||||
snrd tx did create-did did:sonr:alice '{"id":"did:sonr:alice",...}' --from alice
|
||||
|
||||
# Link external wallet
|
||||
snrd tx did link-external-wallet did:sonr:alice \
|
||||
--wallet-address 0x742d35Cc6635C0532925a3b8c17C6e583F4d6A42 \
|
||||
--wallet-type ethereum \
|
||||
--from alice
|
||||
|
||||
# Query DID
|
||||
snrd query did resolve did:sonr:alice
|
||||
```
|
||||
|
||||
[Full DID Module Documentation](x/did/README.md)
|
||||
|
||||
### DWN Module
|
||||
|
||||
Personal data stores with:
|
||||
|
||||
- **Structured Data Records**: Hierarchical data organization
|
||||
- **Protocol-Based Interactions**: Enforceable data schemas
|
||||
- **Secure Vaults**: Enclave-based key management
|
||||
- **Multi-Chain Support**: Cosmos SDK and EVM transaction building
|
||||
|
||||
```bash
|
||||
# Create a vault
|
||||
snrd tx dwn create-vault --from alice
|
||||
|
||||
# Store a record
|
||||
snrd tx dwn write-record '{"data":"...", "protocol":"example.com"}' --from alice
|
||||
|
||||
# Query records
|
||||
snrd query dwn records --owner alice
|
||||
```
|
||||
|
||||
[Full DWN Module Documentation](x/dwn/README.md)
|
||||
|
||||
### Service Module
|
||||
|
||||
Decentralized service registry featuring:
|
||||
|
||||
- **Domain Verification**: DNS-based ownership proof
|
||||
- **Service Registration**: Verified service endpoints
|
||||
- **Permission Management**: UCAN capability integration
|
||||
|
||||
```bash
|
||||
# Verify domain ownership
|
||||
snrd tx svc initiate-domain-verification example.com --from alice
|
||||
snrd tx svc verify-domain example.com --from alice
|
||||
|
||||
# Register service
|
||||
snrd tx svc register-service my-service example.com \
|
||||
--permissions "read,write" --from alice
|
||||
```
|
||||
|
||||
[Full Service Module Documentation](x/svc/README.md)
|
||||
|
||||
## 🔧 Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
Environment variables can be configured via Docker Compose:
|
||||
|
||||
```bash
|
||||
# Chain configuration
|
||||
export CHAIN_ID="localchain_9000-1"
|
||||
export BLOCK_TIME="1000ms"
|
||||
|
||||
# Network selection for Starship
|
||||
export NETWORK="devnet" # or "testnet"
|
||||
|
||||
# Redis configuration
|
||||
REDIS_URL=redis://redis:6379
|
||||
REDIS_DB=0
|
||||
|
||||
# Highway service
|
||||
HIGHWAY_PORT=8090
|
||||
LOG_LEVEL=debug
|
||||
|
||||
# IPFS configuration
|
||||
IPFS_API_URL=http://ipfs:5001
|
||||
|
||||
# Caddy configuration
|
||||
CADDY_DOMAIN=localhost
|
||||
```
|
||||
|
||||
Environment variables can be set directly or via a `.env` file in the project root.
|
||||
|
||||
### Docker Compose Services
|
||||
|
||||
The project includes a comprehensive Docker Compose setup for running all backend services:
|
||||
|
||||
```bash
|
||||
# Start all services (Redis, Highway, Caddy, IPFS)
|
||||
make docker-up
|
||||
|
||||
# Stop all services
|
||||
make docker-down
|
||||
|
||||
# View service logs
|
||||
make docker-logs # All services
|
||||
make docker-logs-redis # Specific service
|
||||
|
||||
# Check service health
|
||||
make docker-status
|
||||
|
||||
# Clean up Docker resources
|
||||
make docker-clean
|
||||
```
|
||||
|
||||
### Starship Configuration
|
||||
|
||||
Edit `starship.yml` to configure multi-node testnets:
|
||||
|
||||
```yaml
|
||||
chains:
|
||||
- id: sonrtest_1-1
|
||||
name: custom
|
||||
numValidators: 3
|
||||
image: onsonr/snrd:latest
|
||||
# ... additional configuration
|
||||
```
|
||||
|
||||
#### Troubleshooting
|
||||
|
||||
**Services not starting:**
|
||||
```bash
|
||||
# Check service status
|
||||
make docker-status
|
||||
|
||||
# View detailed logs
|
||||
make docker-logs
|
||||
|
||||
# Ensure Docker network exists
|
||||
docker network ls | grep sonr-network
|
||||
```
|
||||
|
||||
**Redis connection issues:**
|
||||
```bash
|
||||
# Test Redis connectivity
|
||||
docker exec redis redis-cli ping
|
||||
|
||||
# Check Redis logs
|
||||
make docker-logs-redis
|
||||
```
|
||||
|
||||
**IPFS not accessible:**
|
||||
```bash
|
||||
# Verify IPFS is running
|
||||
curl http://127.0.0.1:5001/api/v0/version
|
||||
|
||||
# Check IPFS logs
|
||||
docker compose -f etc/stack/compose.yml logs ipfs
|
||||
```
|
||||
|
||||
**Port conflicts:**
|
||||
- Caddy: 80 (HTTP)
|
||||
- Redis: 6379
|
||||
- Highway: 8090
|
||||
- IPFS API: 5001
|
||||
- IPFS Gateway: 8080
|
||||
|
||||
Stop conflicting services or modify ports in `etc/stack/compose.yml`.
|
||||
|
||||
## 🏗️ Project Structure
|
||||
|
||||
Sonr uses a modern monorepo architecture with pnpm workspaces for JavaScript/TypeScript packages alongside the Go blockchain implementation:
|
||||
|
||||
### Workspace Organization
|
||||
|
||||
```
|
||||
sonr/
|
||||
├── app/ # Application setup and module wiring
|
||||
├── cmd/ # Binary entry points
|
||||
│ ├── snrd/ # Blockchain node
|
||||
│ ├── hway/ # Highway service
|
||||
│ └── motr/ # Motor WASM plugin
|
||||
├── x/ # Custom chain modules
|
||||
│ ├── did/ # W3C DID implementation
|
||||
│ ├── dwn/ # Decentralized Web Nodes
|
||||
│ └── svc/ # Service management
|
||||
├── types/ # Internal packages
|
||||
│ ├── coins/ # Task processing
|
||||
│ └── ipfs/ # Authorization networks
|
||||
├── proto/ # Protobuf definitions
|
||||
├── scripts/ # Utility scripts
|
||||
├── test/ # Integration tests
|
||||
├── docs/ # Documentation site
|
||||
│
|
||||
# Monorepo Packages (pnpm workspaces)
|
||||
├── packages/ # Core JavaScript/TypeScript packages
|
||||
│ ├── es/ # @sonr.io/es - ES client library
|
||||
│ ├── sdk/ # @sonr.io/sdk - SDK package
|
||||
│ └── ui/ # @sonr.io/ui - Shared UI components
|
||||
├── cli/ # CLI tools
|
||||
│ ├── install/ # @sonr.io/install - Installation CLI
|
||||
│ └── join-testnet/# @sonr.io/join-testnet - Testnet CLI
|
||||
└── web/ # Web applications
|
||||
├── auth/ # Authentication app (Next.js)
|
||||
└── dash/ # Dashboard app (Next.js)
|
||||
```
|
||||
|
||||
### Working with the Monorepo
|
||||
|
||||
#### Installation
|
||||
|
||||
```bash
|
||||
# Install all dependencies for the monorepo
|
||||
pnpm install
|
||||
|
||||
# Build all packages
|
||||
pnpm build
|
||||
|
||||
# Run development mode for all packages
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
#### Package Management
|
||||
|
||||
```bash
|
||||
# Run commands in specific packages
|
||||
pnpm --filter @sonr.io/es build
|
||||
pnpm --filter @sonr.io/sdk test
|
||||
|
||||
# Add dependencies to specific packages
|
||||
pnpm --filter @sonr.io/ui add react
|
||||
|
||||
# Run commands in all packages
|
||||
pnpm -r build # Build all packages
|
||||
pnpm -r test # Test all packages
|
||||
```
|
||||
|
||||
#### Versioning & Publishing
|
||||
|
||||
The monorepo uses [Changesets](https://github.com/changesets/changesets) for package versioning:
|
||||
|
||||
```bash
|
||||
# Add a changeset for your changes
|
||||
pnpm changeset
|
||||
|
||||
# Version packages based on changesets
|
||||
pnpm changeset version
|
||||
|
||||
# Publish packages to npm
|
||||
pnpm changeset publish
|
||||
```
|
||||
|
||||
### Key Technologies
|
||||
|
||||
- **pnpm workspaces**: Efficient dependency management with single lockfile
|
||||
- **TypeScript project references**: Incremental builds and better IDE performance
|
||||
- **Turbo**: Build orchestration and caching for faster builds
|
||||
- **Changesets**: Automated versioning and changelog generation
|
||||
- **Biome**: Fast, unified linting and formatting (replaces ESLint/Prettier)
|
||||
|
||||
### Package Dependencies
|
||||
|
||||
- `@sonr.io/es`: Core ES client library with protobuf types
|
||||
- `@sonr.io/sdk`: High-level SDK (depends on @sonr.io/es)
|
||||
- `@sonr.io/ui`: Shared UI components for web applications
|
||||
- `@sonr.io/install`: CLI tool for installing Sonr
|
||||
- `@sonr.io/join-testnet`: CLI tool for joining testnet
|
||||
- Web apps use all three core packages (@sonr.io/es, @sonr.io/sdk, @sonr.io/ui)
|
||||
|
||||
## 🤝 Community & Support
|
||||
|
||||
- [GitHub Discussions](https://github.com/sonr-io/sonr/discussions) - Community forum
|
||||
- [GitHub Issues](https://github.com/sonr-io/sonr/issues) - Bug reports and feature requests
|
||||
- [Twitter](https://sonr.io/twitter) - Latest updates
|
||||
- [Documentation Wiki](https://github.com/sonr-io/sonr/wiki) - Detailed guides
|
||||
|
||||
|
||||
## 📄 License
|
||||
|
||||
Copyright © 2024 Sonr, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
|
||||
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
Built with ❤️ by the Sonr team
|
||||
</p>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 262 KiB |
@@ -0,0 +1,103 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Go modules
|
||||
- package-ecosystem: gomod
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "02:00"
|
||||
labels:
|
||||
- dependencies
|
||||
- go
|
||||
commit-message:
|
||||
prefix: chore
|
||||
include: scope
|
||||
|
||||
# Go modules in subdirectories
|
||||
- package-ecosystem: gomod
|
||||
directory: "/cmd/hway"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "02:00"
|
||||
labels:
|
||||
- dependencies
|
||||
- hway
|
||||
commit-message:
|
||||
prefix: "chore(hway)"
|
||||
|
||||
- package-ecosystem: gomod
|
||||
directory: "/cmd/motr"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "02:00"
|
||||
labels:
|
||||
- dependencies
|
||||
- motr
|
||||
commit-message:
|
||||
prefix: "chore(motr)"
|
||||
|
||||
- package-ecosystem: gomod
|
||||
directory: "/cmd/vault"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "02:00"
|
||||
labels:
|
||||
- dependencies
|
||||
- vault
|
||||
commit-message:
|
||||
prefix: "chore(vault)"
|
||||
|
||||
- package-ecosystem: gomod
|
||||
directory: "/client"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "02:00"
|
||||
labels:
|
||||
- dependencies
|
||||
- client
|
||||
commit-message:
|
||||
prefix: "chore(client)"
|
||||
|
||||
- package-ecosystem: gomod
|
||||
directory: "/crypto"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "02:00"
|
||||
labels:
|
||||
- dependencies
|
||||
- crypto
|
||||
commit-message:
|
||||
prefix: "chore(crypto)"
|
||||
|
||||
# JavaScript/TypeScript packages
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "03:00"
|
||||
labels:
|
||||
- dependencies
|
||||
- javascript
|
||||
commit-message:
|
||||
prefix: chore
|
||||
include: scope
|
||||
|
||||
# GitHub Actions
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "04:00"
|
||||
labels:
|
||||
- dependencies
|
||||
- ci
|
||||
commit-message:
|
||||
prefix: "chore(ci)"
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Ensure we're in the right directory
|
||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||
cd $ROOT_DIR
|
||||
|
||||
DOPPLER_TOKEN=$(skate get DOPPLER_NETWORK)
|
||||
|
||||
ACC0=$(doppler secrets get KEY0_NAME --plain --project sonr --config test)
|
||||
ACC1=$(doppler secrets get KEY1_NAME --plain --project sonr --config test)
|
||||
MNEM0=$(doppler secrets get KEY0_MNEMONIC --plain --project sonr --config test)
|
||||
MNEM1=$(doppler secrets get KEY1_MNEMONIC --plain --project sonr --config test)
|
||||
CHAIN_ID=$(doppler secrets get CHAIN_ID --plain --project sonr --config test)
|
||||
TX_INDEX_INDEXER=$(doppler secrets get TX_INDEXER --plain --project sonr --config test)
|
||||
TX_INDEX_PSQL_CONN=$(doppler secrets get TX_PSQL_CONN --plain --project sonr --config test)
|
||||
|
||||
# Run the node setup with all variables properly exported
|
||||
CLEAN=true KEY0_NAME=$ACC0 KEY0_MNEMONIC=$MNEM0 KEY1_NAME=$ACC1 KEY1_MNEMONIC=$MNEM1 CHAIN_ID=$CHAIN_ID TX_INDEX_INDEXER=$TX_INDEX_INDEXER TX_INDEX_PSQL_CONN=$TX_INDEX_PSQL_CONN sh ./start.sh
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
name: sonr-testnet
|
||||
version: 0.2.20
|
||||
|
||||
chains:
|
||||
- id: sonr-1
|
||||
prettyName: Sonr
|
||||
name: custom
|
||||
image: ghcr.io/onsonr/sonr:latest
|
||||
home: /root/.sonr
|
||||
binary: sonrd
|
||||
prefix: idx
|
||||
denom: usnr
|
||||
hdPath: m/44'/118'/0'/0/0
|
||||
coinType: 118
|
||||
coins: 100000000000000usnr,100000000000000snr
|
||||
repo: https://github.com/sonr-io/snrd
|
||||
numValidators: 1
|
||||
ports:
|
||||
rest: 1317
|
||||
rpc: 26657
|
||||
faucet: 8001
|
||||
|
||||
- id: osmosis-1
|
||||
name: osmosis
|
||||
numValidators: 1
|
||||
ports:
|
||||
rest: 1313
|
||||
rpc: 26653
|
||||
faucet: 8003
|
||||
|
||||
relayers:
|
||||
- name: hermes-osmo-atom-sonr
|
||||
type: hermes
|
||||
image: ghcr.io/cosmology-tech/starship/hermes:1.10.0
|
||||
replicas: 1
|
||||
chains:
|
||||
- osmosis-1
|
||||
- sonr-1
|
||||
|
||||
registry:
|
||||
enabled: true
|
||||
image: ghcr.io/cosmology-tech/starship/registry:20230614-7173db2
|
||||
resources:
|
||||
cpu: 0.5
|
||||
memory: 200M
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.7/.schema/devbox.schema.json",
|
||||
"packages": [
|
||||
"go@latest",
|
||||
"cargo@latest",
|
||||
"uv@latest",
|
||||
"bun@latest",
|
||||
"yarn@latest",
|
||||
"doppler@latest"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "$HOME/.cargo/bin:$HOME/go/bin:$HOME/.local/bin:$HOME/.bun/bin:$PATH",
|
||||
"GITHUB_TOKEN": "$GITHUB_TOKEN",
|
||||
"GOPATH": "$HOME/go",
|
||||
"GOBIN": "$GOPATH/bin",
|
||||
"GHQ_ROOT": "$CLONEDIR"
|
||||
},
|
||||
"shell": {
|
||||
"init_hook": [],
|
||||
"scripts": {
|
||||
"up": ["yarn starship start --config config.yaml"],
|
||||
"down": ["yarn starship stop --config config.yaml"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,583 @@
|
||||
default-api: groq
|
||||
default-model: qwen3
|
||||
format-text:
|
||||
markdown: "Format the response as markdown without enclosing backticks."
|
||||
json: "Format the response as json without enclosing backticks."
|
||||
mcp-servers:
|
||||
github:
|
||||
command: docker
|
||||
args:
|
||||
- run
|
||||
- "-i"
|
||||
- "--rm"
|
||||
- "-e"
|
||||
- GITHUB_PERSONAL_ACCESS_TOKEN
|
||||
- "ghcr.io/github/github-mcp-server"
|
||||
ref:
|
||||
command: npx
|
||||
args:
|
||||
- ref-tools-mcp@latest
|
||||
mcp-timeout: 15s
|
||||
roles:
|
||||
"default": []
|
||||
"pr-writer":
|
||||
- You are a PR description writer
|
||||
- Create clear, structured PR descriptions
|
||||
- Include all relevant context from commits and changes
|
||||
- Format using markdown with proper sections
|
||||
- Reference issues and milestones appropriately
|
||||
- Be concise but comprehensive
|
||||
- Include a testing checklist if relevant
|
||||
"commit-writer":
|
||||
- You are a conventional commit message generator following commitizen format
|
||||
- Analyze the provided git diff and scope information to create a proper commit
|
||||
- Use the format type(scope) description
|
||||
- Valid types feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
|
||||
- The scope should be one of the affected scopes provided
|
||||
- Description should be concise, present tense, no period at the end
|
||||
- If there are breaking changes, add BREAKING CHANGE in the footer
|
||||
- Focus on WHAT changed and WHY, not HOW (the diff shows how)
|
||||
- Group related changes logically
|
||||
- Maximum 72 characters for the header line
|
||||
- Output ONLY the commit message, no explanations
|
||||
"commit-analyzer":
|
||||
- Analyze git diffs to determine the primary type of change
|
||||
- Identify if changes are features, fixes, refactoring, etc
|
||||
- Summarize the key changes in a structured format
|
||||
- Output a JSON object with type, scope, description, and body fields
|
||||
"branch-namer":
|
||||
- you are a branch namer
|
||||
- you do not explain anything
|
||||
- you read the provided issue and body then create a title for the branch
|
||||
- you do not provide any explanation whatsoever, ONLY the title
|
||||
- titles must be no more than 3 words (example = feature/add-new-feature)
|
||||
- ONLY use the following format - feat/<feature-name>
|
||||
"issue-creator":
|
||||
- you are an advanced issue creator for github in the sonr-io org
|
||||
- you are provided an input in the format of - <repo-name>:<issue-context>
|
||||
- you do not explain anything
|
||||
- you read the short provided context for a new issue and then create an appropriate issue body
|
||||
- ALWAYS find relevant context by using the `mcp::ref::ref_search_documentation` tool
|
||||
- ALWAYS link relevant issues by using the `mcp::github::search_issues` tool
|
||||
- ALWAYS create a new issue in the sonr-io/<repo-name> repo
|
||||
- ALWAYS assign the issue to @prnk28
|
||||
- |
|
||||
ONLY use the following format as this example:
|
||||
|
||||
Title: Implement x/dwn vaults plugin
|
||||
Labels: x/dwn, feature
|
||||
|
||||
## Requirements
|
||||
|
||||
- Must include DWN Bytes in Protobuf
|
||||
- Must Spawn DWN Plugins using Genesis Params
|
||||
- Must have Gas Free Query Methods for Spawn and Verify
|
||||
|
||||
## Context
|
||||
|
||||
### Affected Files
|
||||
|
||||
- @x/dwn/keeper/keeper.go
|
||||
- @x/dwn/client/wasm/main.go
|
||||
- @x/dwn/types/genesis.go
|
||||
|
||||
### Relevant Documentation
|
||||
|
||||
- [Example Doc 1](https://example.com)
|
||||
- [Example Doc 2](https://example.com)
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] Tests for Spawning Plugins from the x/dwn Genesis
|
||||
- [ ] Tests for Resolving Vault Secret Data from IPFS
|
||||
- [ ] Test for full-round Sign/Verify/Refresh on-chain
|
||||
- [ ] Grpc Gateway Compatibility for HTTP Requests
|
||||
- ALWAYS create issues using the `mcp::github::create_issue` tool
|
||||
- ALWAYS return the issue number after creating a new issue
|
||||
format: false
|
||||
role: "branch-namer"
|
||||
raw: true
|
||||
quiet: true
|
||||
temp: 1.0
|
||||
topp: 1.0
|
||||
topk: 50
|
||||
no-limit: true
|
||||
word-wrap: 80
|
||||
include-prompt-args: false
|
||||
include-prompt: 0
|
||||
max-retries: 5
|
||||
fanciness: 10
|
||||
status-text: Generating
|
||||
theme: base16
|
||||
max-input-chars: 12250
|
||||
max-completion-tokens: 100
|
||||
apis:
|
||||
openai:
|
||||
base-url: https://api.openai.com/v1
|
||||
api-key:
|
||||
api-key-env: OPENAI_API_KEY
|
||||
# api-key-cmd: rbw get -f OPENAI_API_KEY chat.openai.com
|
||||
models: # https://platform.openai.com/docs/models
|
||||
gpt-4.5-preview: #128k https://platform.openai.com/docs/models/gpt-4.5-preview
|
||||
aliases: ["gpt-4.5", "gpt4.5"]
|
||||
max-input-chars: 392000
|
||||
fallback: gpt-4
|
||||
gpt-4.5-preview-2025-02-27:
|
||||
max-input-chars: 392000
|
||||
fallback: gpt-4
|
||||
gpt-4o-mini:
|
||||
aliases: ["4o-mini"]
|
||||
max-input-chars: 392000
|
||||
fallback: gpt-4o
|
||||
gpt-4o:
|
||||
aliases: ["4o"]
|
||||
max-input-chars: 392000
|
||||
fallback: gpt-4
|
||||
gpt-4:
|
||||
aliases: ["4"]
|
||||
max-input-chars: 24500
|
||||
fallback: gpt-3.5-turbo
|
||||
gpt-4-1106-preview:
|
||||
aliases: ["128k"]
|
||||
max-input-chars: 392000
|
||||
fallback: gpt-4
|
||||
gpt-4-32k:
|
||||
aliases: ["32k"]
|
||||
max-input-chars: 98000
|
||||
fallback: gpt-4
|
||||
gpt-3.5-turbo:
|
||||
aliases: ["35t"]
|
||||
max-input-chars: 12250
|
||||
fallback: gpt-3.5
|
||||
gpt-3.5-turbo-1106:
|
||||
aliases: ["35t-1106"]
|
||||
max-input-chars: 12250
|
||||
fallback: gpt-3.5-turbo
|
||||
gpt-3.5-turbo-16k:
|
||||
aliases: ["35t16k"]
|
||||
max-input-chars: 44500
|
||||
fallback: gpt-3.5
|
||||
gpt-3.5:
|
||||
aliases: ["35"]
|
||||
max-input-chars: 12250
|
||||
fallback:
|
||||
o1:
|
||||
aliases: ["o1"]
|
||||
max-input-chars: 200000
|
||||
o1-preview:
|
||||
aliases: ["o1-preview"]
|
||||
max-input-chars: 128000
|
||||
o1-mini:
|
||||
aliases: ["o1-mini"]
|
||||
max-input-chars: 128000
|
||||
o3-mini:
|
||||
aliases: ["o3m", "o3-mini"]
|
||||
max-input-chars: 200000
|
||||
copilot:
|
||||
base-url: https://api.githubcopilot.com
|
||||
models:
|
||||
gpt-4o-2024-05-13:
|
||||
aliases: ["4o-2024", "4o", "gpt-4o"]
|
||||
max-input-chars: 392000
|
||||
gpt-4:
|
||||
aliases: ["4"]
|
||||
max-input-chars: 24500
|
||||
gpt-3.5-turbo:
|
||||
aliases: ["35t"]
|
||||
max-input-chars: 12250
|
||||
o1-preview-2024-09-12:
|
||||
aliases: ["o1-preview", "o1p"]
|
||||
max-input-chars: 128000
|
||||
claude-3.5-sonnet:
|
||||
aliases: ["claude3.5-sonnet", "sonnet-3.5", "claude-3-5-sonnet"]
|
||||
max-input-chars: 680000
|
||||
o1-preview:
|
||||
aliases: ["o1-preview"]
|
||||
max-input-chars: 128000
|
||||
o1-mini:
|
||||
aliases: ["o1-mini", "o1m", "o1-mini-2024-09-12"]
|
||||
max-input-chars: 128000
|
||||
o3-mini:
|
||||
aliases: ["o3m", "o3-mini"]
|
||||
max-input-chars: 128000
|
||||
gemini-2.0-flash-001:
|
||||
aliases: ["gm2f", "flash-2", "gemini-2-flash"]
|
||||
max-input-chars: 4194304
|
||||
anthropic:
|
||||
base-url: https://api.anthropic.com/v1
|
||||
api-key:
|
||||
api-key-env: ANTHROPIC_API_KEY
|
||||
models: # https://docs.anthropic.com/en/docs/about-claude/models
|
||||
claude-sonnet-4-20250514:
|
||||
aliases: ["claude-sonnet-4", "sonnet-4"]
|
||||
max-input-chars: 680000
|
||||
claude-3-7-sonnet-latest:
|
||||
aliases: ["claude3.7-sonnet", "claude-3-7-sonnet", "sonnet-3.7"]
|
||||
max-input-chars: 680000
|
||||
claude-3-7-sonnet-20250219:
|
||||
max-input-chars: 680000
|
||||
claude-3-5-sonnet-latest:
|
||||
aliases: ["claude3.5-sonnet", "claude-3-5-sonnet", "sonnet-3.5"]
|
||||
max-input-chars: 680000
|
||||
claude-3-5-sonnet-20241022:
|
||||
max-input-chars: 680000
|
||||
claude-3-5-sonnet-20240620:
|
||||
max-input-chars: 680000
|
||||
claude-3-opus-20240229:
|
||||
aliases: ["claude3-opus", "opus"]
|
||||
max-input-chars: 680000
|
||||
cohere:
|
||||
base-url: https://api.cohere.com/v1
|
||||
models:
|
||||
command-r-plus:
|
||||
max-input-chars: 128000
|
||||
command-r:
|
||||
max-input-chars: 128000
|
||||
google:
|
||||
models: # https://ai.google.dev/gemini-api/docs/models/gemini
|
||||
gemini-1.5-pro-latest:
|
||||
aliases: ["gmp", "gemini", "gemini-1.5-pro"]
|
||||
max-input-chars: 392000
|
||||
gemini-1.5-flash-latest:
|
||||
aliases: ["gmf", "flash", "gemini-1.5-flash"]
|
||||
max-input-chars: 392000
|
||||
gemini-2.0-flash-001:
|
||||
aliases: ["gm2f", "flash-2", "gemini-2-flash"]
|
||||
max-input-chars: 4194304
|
||||
gemini-2.0-flash-lite:
|
||||
aliases: ["gm2fl", "flash-2-lite", "gemini-2-flash-lite"]
|
||||
max-input-chars: 4194304
|
||||
ollama:
|
||||
base-url: http://localhost:11434
|
||||
models: # https://ollama.com/library
|
||||
"llama3.2:3b":
|
||||
aliases: ["llama3.2"]
|
||||
max-input-chars: 650000
|
||||
"llama3.2:1b":
|
||||
aliases: ["llama3.2_1b"]
|
||||
max-input-chars: 650000
|
||||
"llama3:70b":
|
||||
aliases: ["llama3"]
|
||||
max-input-chars: 650000
|
||||
perplexity:
|
||||
base-url: https://api.perplexity.ai
|
||||
api-key:
|
||||
api-key-env: PERPLEXITY_API_KEY
|
||||
models: # https://docs.perplexity.ai/guides/model-cards
|
||||
llama-3.1-sonar-small-128k-online:
|
||||
aliases: ["llam31-small"]
|
||||
max-input-chars: 127072
|
||||
llama-3.1-sonar-large-128k-online:
|
||||
aliases: ["llam31-large"]
|
||||
max-input-chars: 127072
|
||||
llama-3.1-sonar-huge-128k-online:
|
||||
aliases: ["llam31-huge"]
|
||||
max-input-chars: 127072
|
||||
groq:
|
||||
base-url: https://api.groq.com/openai/v1
|
||||
api-key:
|
||||
api-key-env: GROQ_API_KEY
|
||||
models: # https://console.groq.com/docs/models
|
||||
# Production models
|
||||
gemma2-9b-it:
|
||||
aliases: ["gemma2", "gemma"]
|
||||
max-input-chars: 24500 # 8,192
|
||||
llama-3.3-70b-versatile:
|
||||
aliases: ["llama3.3", "llama3.3-70b", "llama3.3-versatile"]
|
||||
max-input-chars: 392000 # 128K
|
||||
max-completion-tokens: 98000 # 32,768
|
||||
llama-3.1-8b-instant:
|
||||
aliases: ["llama3.1-8b", "llama3.1-instant"]
|
||||
max-input-chars: 392000 # 128K
|
||||
max-completion-tokens: 24500 # 8,192
|
||||
llama-guard-3-8b:
|
||||
aliases: ["llama-guard"]
|
||||
max-input-chars: 24500 # 8,192
|
||||
llama3-70b-8192:
|
||||
aliases: ["llama3", "llama3-70b"]
|
||||
max-input-chars: 24500 # 8,192
|
||||
fallback: llama3-8b-8192
|
||||
llama3-8b-8192:
|
||||
aliases: ["llama3-8b"]
|
||||
max-input-chars: 24500 # 8,192
|
||||
mixtral-8x7b-32768:
|
||||
aliases: ["mixtral"]
|
||||
max-input-chars: 98000 # 32,768
|
||||
meta-llama/llama-4-scout-17b-16e-instruct:
|
||||
aliases: ["llama4-scout"]
|
||||
max-input-chars: 392000 # 128K
|
||||
meta-llama/llama-4-maverick-17b-128e-instruct:
|
||||
aliases: ["llama4", "llama4-maverick"]
|
||||
max-input-chars: 392000 # 128K
|
||||
# Preview models
|
||||
mistral-saba-24b:
|
||||
aliases: ["saba", "mistral-saba", "saba-24b"]
|
||||
max-input-chars: 98000 # 32K
|
||||
qwen-2.5-coder-32b:
|
||||
aliases: ["qwen-coder", "qwen2.5-coder", "qwen-2.5-coder"]
|
||||
max-input-chars: 392000 # 128K
|
||||
qwen/qwen3-32b:
|
||||
aliases: ["qwen3", "qwen3-32b"]
|
||||
max-input-chars: 392000 # 128K
|
||||
deepseek-r1-distill-qwen-32b:
|
||||
aliases: ["deepseek-r1", "r1-qwen", "deepseek-qwen"]
|
||||
max-input-chars: 392000 # 128K
|
||||
max-completion-tokens: 49152 # 16,384
|
||||
deepseek-r1-distill-llama-70b-specdec:
|
||||
aliases: ["deepseek-r1-specdec", "r1-llama-specdec"]
|
||||
max-input-chars: 392000 # 128K
|
||||
max-completion-tokens: 49152 # 16,384
|
||||
deepseek-r1-distill-llama-70b:
|
||||
aliases: ["deepseek-r1-llama", "r1-llama"]
|
||||
max-input-chars: 392000 # 128K
|
||||
llama-3.3-70b-specdec:
|
||||
aliases: ["llama3.3-specdec"]
|
||||
max-input-chars: 24500 # 8,192
|
||||
llama-3.2-1b-preview:
|
||||
aliases: ["llama3.2-1b"]
|
||||
max-input-chars: 392000 # 128K
|
||||
max-completion-tokens: 24500 # 8,192
|
||||
llama-3.2-3b-preview:
|
||||
aliases: ["llama3.2-3b"]
|
||||
max-input-chars: 392000 # 128K
|
||||
max-completion-tokens: 24500 # 8,192
|
||||
llama-3.2-11b-vision-preview:
|
||||
aliases: ["llama3.2-vision", "llama3.2-11b-vision"]
|
||||
max-input-chars: 392000 # 128K
|
||||
max-completion-tokens: 24500 # 8,192
|
||||
llama-3.2-90b-vision-preview:
|
||||
aliases: ["llama3.2-90b-vision"]
|
||||
max-input-chars: 392000 # 128K
|
||||
max-completion-tokens: 24500 # 8,192
|
||||
cerebras:
|
||||
base-url: https://api.cerebras.ai/v1
|
||||
api-key:
|
||||
api-key-env: CEREBRAS_API_KEY
|
||||
models: # https://inference-docs.cerebras.ai/introduction
|
||||
llama3.1-8b:
|
||||
aliases: ["llama3.1-8b-cerebras"]
|
||||
max-input-chars: 24500
|
||||
llama3.1-70b:
|
||||
aliases: ["llama3.1-cerebras", "llama3.1-70b-cerebras"]
|
||||
max-input-chars: 24500
|
||||
sambanova:
|
||||
base-url: https://api.sambanova.ai/v1
|
||||
api-key:
|
||||
api-key-env: SAMBANOVA_API_KEY
|
||||
models: # https://docs.sambanova.ai/cloud/docs/get-started/supported-models
|
||||
# Preview models
|
||||
DeepSeek-R1:
|
||||
aliases: ["deepseek-r1-sambanova", "deepseek-r1-preview"]
|
||||
max-input-chars: 24500 # 8k tokens
|
||||
# Production models
|
||||
DeepSeek-R1-Distill-Llama-70B:
|
||||
aliases: ["deepseek-r1-llama-sambanova", "deepseek-r1-distill"]
|
||||
max-input-chars: 98000 # 32k tokens
|
||||
Llama-3.1-Tulu-3-405B:
|
||||
aliases: ["llama3.1-tulu", "tulu-405b"]
|
||||
max-input-chars: 49000 # 16k tokens
|
||||
Meta-Llama-3.3-70B-Instruct:
|
||||
aliases: ["llama3.3-sambanova", "llama3.3-70b-sambanova"]
|
||||
max-input-chars: 392000 # 128k tokens
|
||||
Meta-Llama-3.2-3B-Instruct:
|
||||
aliases: ["llama3.2-3b-sambanova"]
|
||||
max-input-chars: 24500 # 8k tokens
|
||||
Meta-Llama-3.2-1B-Instruct:
|
||||
aliases: ["llama3.2-1b-sambanova"]
|
||||
max-input-chars: 49000 # 16k tokens
|
||||
Meta-Llama-3.1-405B-Instruct:
|
||||
aliases: ["llama3.1-405b-sambanova"]
|
||||
max-input-chars: 49000 # 16k tokens
|
||||
Meta-Llama-3.1-70B-Instruct:
|
||||
aliases: ["llama3.1-70b-sambanova"]
|
||||
max-input-chars: 392000 # 128k tokens
|
||||
Meta-Llama-3.1-8B-Instruct:
|
||||
aliases: ["llama3.1-8b-sambanova"]
|
||||
max-input-chars: 49000 # 16k tokens
|
||||
Meta-Llama-Guard-3-8B:
|
||||
aliases: ["llama-guard-sambanova"]
|
||||
max-input-chars: 24500 # 8k tokens
|
||||
Llama-3.2-90B-Vision-Instruct:
|
||||
aliases: ["llama3.2-vision-90b", "llama3.2-90b-vision-sambanova"]
|
||||
max-input-chars: 12250 # 4k tokens
|
||||
Llama-3.2-11B-Vision-Instruct:
|
||||
aliases: ["llama3.2-vision-11b", "llama3.2-11b-vision-sambanova"]
|
||||
max-input-chars: 12250 # 4k tokens
|
||||
Qwen2.5-72B-Instruct:
|
||||
aliases: ["qwen2.5-sambanova", "qwen2.5-72b"]
|
||||
max-input-chars: 49000 # 16k tokens
|
||||
Qwen2.5-Coder-32B-Instruct:
|
||||
aliases: ["qwen2.5-coder-sambanova", "qwen-coder-sambanova"]
|
||||
max-input-chars: 49000 # 16k tokens
|
||||
QwQ-32B-Preview:
|
||||
aliases: ["qwq-sambanova", "qwq-32b"]
|
||||
max-input-chars: 49000 # 16k tokens
|
||||
localai:
|
||||
# LocalAI setup instructions: https://github.com/go-skynet/LocalAI#example-use-gpt4all-j-model
|
||||
base-url: http://localhost:8080
|
||||
models:
|
||||
ggml-gpt4all-j:
|
||||
aliases: ["local", "4all"]
|
||||
max-input-chars: 12250
|
||||
fallback:
|
||||
azure:
|
||||
# Set to 'azure-ad' to use Active Directory
|
||||
# Azure OpenAI setup: https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource
|
||||
base-url: https://YOUR_RESOURCE_NAME.openai.azure.com
|
||||
api-key:
|
||||
api-key-env: AZURE_OPENAI_KEY
|
||||
models:
|
||||
gpt-4:
|
||||
aliases: ["az4"]
|
||||
max-input-chars: 24500
|
||||
fallback: gpt-35-turbo
|
||||
gpt-35-turbo:
|
||||
aliases: ["az35t"]
|
||||
max-input-chars: 12250
|
||||
fallback: gpt-35
|
||||
gpt-35:
|
||||
aliases: ["az35"]
|
||||
max-input-chars: 12250
|
||||
fallback:
|
||||
o1-preview:
|
||||
aliases: ["o1-preview"]
|
||||
max-input-chars: 128000
|
||||
o1-mini:
|
||||
aliases: ["o1-mini"]
|
||||
max-input-chars: 128000
|
||||
runpod:
|
||||
# https://docs.runpod.io/serverless/workers/vllm/openai-compatibility
|
||||
base-url: https://api.runpod.ai/v2/${YOUR_ENDPOINT}/openai/v1
|
||||
api-key:
|
||||
api-key-env: RUNPOD_API_KEY
|
||||
models:
|
||||
openchat/openchat-3.5-1210:
|
||||
aliases: ["openchat"]
|
||||
max-input-chars: 8192
|
||||
mistral:
|
||||
base-url: https://api.mistral.ai/v1
|
||||
api-key:
|
||||
api-key-env: MISTRAL_API_KEY
|
||||
models: # https://docs.mistral.ai/getting-started/models/
|
||||
mistral-large-latest:
|
||||
aliases: ["mistral-large"]
|
||||
max-input-chars: 384000
|
||||
open-mistral-nemo:
|
||||
aliases: ["mistral-nemo"]
|
||||
max-input-chars: 384000
|
||||
deepseek:
|
||||
base-url: https://api.deepseek.com/
|
||||
api-key:
|
||||
api-key-env: DEEPSEEK_API_KEY
|
||||
models:
|
||||
deepseek-chat:
|
||||
aliases: ["chat"]
|
||||
max-input-chars: 384000
|
||||
deepseek-reasoner:
|
||||
aliases: ["r1"]
|
||||
max-input-chars: 384000
|
||||
github-models:
|
||||
base-url: https://models.github.ai/inference
|
||||
api-key:
|
||||
api-key-env: GITHUB_PERSONAL_ACCESS_TOKEN
|
||||
models:
|
||||
openai/gpt-4.1:
|
||||
max-input-chars: 392000
|
||||
openai/o3-mini:
|
||||
max-input-chars: 392000
|
||||
openai/o4-mini:
|
||||
max-input-chars: 392000
|
||||
openai/text-embedding-3-large:
|
||||
max-input-chars: 392000
|
||||
openai/text-embedding-3-small:
|
||||
max-input-chars: 392000
|
||||
ai21-labs/AI21-Jamba-1.5-Large:
|
||||
max-input-chars: 392000
|
||||
ai21-labs/AI21-Jamba-1.5-Mini:
|
||||
max-input-chars: 392000
|
||||
cohere/cohere-command-a:
|
||||
max-input-chars: 392000
|
||||
cohere/Cohere-command-r:
|
||||
max-input-chars: 392000
|
||||
cohere/Cohere-command-r-08-2024:
|
||||
max-input-chars: 392000
|
||||
cohere/Cohere-command-r-plus:
|
||||
max-input-chars: 392000
|
||||
cohere/Cohere-command-r-plus-08-2024:
|
||||
max-input-chars: 392000
|
||||
cohere/Cohere-embed-v3-english:
|
||||
max-input-chars: 392000
|
||||
cohere/Cohere-embed-v3-multilingual:
|
||||
max-input-chars: 392000
|
||||
core42/jais-30b-chat:
|
||||
max-input-chars: 392000
|
||||
deepseek/DeepSeek-R1:
|
||||
max-input-chars: 392000
|
||||
deepseek/DeepSeek-V3-0324:
|
||||
max-input-chars: 392000
|
||||
meta/Llama-3.2-11B-Vision-Instruct:
|
||||
max-input-chars: 392000
|
||||
meta/Llama-3.2-90B-Vision-Instruct:
|
||||
max-input-chars: 392000
|
||||
meta/Llama-3.3-70B-Instruct:
|
||||
max-input-chars: 392000
|
||||
meta/Llama-4-Maverick-17B-128E-Instruct-FP8:
|
||||
max-input-chars: 392000
|
||||
meta/Llama-4-Scout-17B-16E-Instruct:
|
||||
max-input-chars: 392000
|
||||
meta/Meta-Llama-3.1-405B-Instruct:
|
||||
max-input-chars: 392000
|
||||
meta/Meta-Llama-3.1-70B-Instruct:
|
||||
max-input-chars: 392000
|
||||
meta/Meta-Llama-3.1-8B-Instruct:
|
||||
max-input-chars: 392000
|
||||
meta/Meta-Llama-3-70B-Instruct:
|
||||
max-input-chars: 392000
|
||||
meta/Meta-Llama-3-8B-Instruct:
|
||||
max-input-chars: 392000
|
||||
mistral-ai/Codestral-2501:
|
||||
max-input-chars: 392000
|
||||
mistral-ai/Ministral-3B:
|
||||
max-input-chars: 392000
|
||||
mistral-ai/Mistral-Large-2411:
|
||||
max-input-chars: 392000
|
||||
mistral-ai/mistral-medium-2505:
|
||||
max-input-chars: 392000
|
||||
mistral-ai/Mistral-Nemo:
|
||||
max-input-chars: 392000
|
||||
mistral-ai/mistral-small-2503:
|
||||
max-input-chars: 392000
|
||||
xai/grok-3:
|
||||
max-input-chars: 392000
|
||||
xai/grok-3-mini:
|
||||
max-input-chars: 392000
|
||||
microsoft/MAI-DS-R1:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3.5-mini-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3.5-MoE-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3.5-vision-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3-medium-128k-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3-medium-4k-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3-mini-128k-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3-mini-4k-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3-small-128k-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-3-small-8k-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-4:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-4-mini-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-4-mini-reasoning:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-4-multimodal-instruct:
|
||||
max-input-chars: 392000
|
||||
microsoft/Phi-4-reasoning:
|
||||
max-input-chars: 392000
|
||||
@@ -1,3 +0,0 @@
|
||||
"feature": ["feature/*", "feat/*"]
|
||||
"bugfix": fix/*
|
||||
"enhancement": enhancement/*
|
||||
@@ -1,231 +0,0 @@
|
||||
{
|
||||
"scopes": [
|
||||
"core-chain",
|
||||
"core-ibc",
|
||||
"x-did",
|
||||
"x-dwn",
|
||||
"x-svc",
|
||||
"security-mpc",
|
||||
"security-ucan",
|
||||
"security-zkp",
|
||||
"ci-cd",
|
||||
"dev-ops"
|
||||
],
|
||||
"docs": [
|
||||
{
|
||||
"keywords": ["github", "actions", "workflows", "syntax"],
|
||||
"url": "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "tooling", "cosmovisor"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/tooling/cosmovisor"
|
||||
},
|
||||
{
|
||||
"keywords": ["process-compose", "configuration"],
|
||||
"url": "https://f1bonacc1.github.io/process-compose/configuration/"
|
||||
},
|
||||
{
|
||||
"keywords": ["mkdocs", "material", "reference"],
|
||||
"url": "https://squidfunk.github.io/mkdocs-material/reference/"
|
||||
},
|
||||
{
|
||||
"keywords": ["pkl", "language", "reference"],
|
||||
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
||||
},
|
||||
{
|
||||
"keywords": ["pwa", "service-workers", "web"],
|
||||
"url": "https://web.dev/learn/pwa/service-workers/"
|
||||
},
|
||||
{
|
||||
"keywords": ["service-workers", "web", "api"],
|
||||
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
||||
},
|
||||
{
|
||||
"keywords": ["web-authentication", "web", "api"],
|
||||
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API"
|
||||
},
|
||||
{
|
||||
"keywords": ["sdk", "modules", "cosmos", "manager"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/module-manager"
|
||||
},
|
||||
{
|
||||
"keywords": ["sdk", "modules", "cosmos", "messages", "queries"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries"
|
||||
},
|
||||
{
|
||||
"keywords": ["sdk", "modules", "messages", "service", "cosmos"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/msg-services"
|
||||
},
|
||||
{
|
||||
"keywords": ["sdk", "modules", "services", "cosmos", "query"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/query-services"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "depinject", "modules", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/depinject"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "apps", "sdk", "interchain-accounts"],
|
||||
"url": "https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "apps", "sdk", "transfer"],
|
||||
"url": "https://ibc.cosmos.network/v8/apps/transfer/overview/"
|
||||
},
|
||||
{
|
||||
"keywords": ["osmosis", "modules", "ibc", "assets"],
|
||||
"url": "https://docs.osmosis.zone/osmosis-core/asset-info/"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "osmosis", "tokenfactory", "modules", "assets"],
|
||||
"url": "https://docs.osmosis.zone/osmosis-core/modules/tokenfactory"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "mint", "cctp", "noble", "assets"],
|
||||
"url": "https://docs.noble.xyz/cctp/mint"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "relayer", "nomic", "assets"],
|
||||
"url": "https://docs.nomic.io/network/ibc-relayer"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "cctp", "noble", "mint_forward", "assets"],
|
||||
"url": "https://docs.noble.xyz/cctp/mint_forward"
|
||||
},
|
||||
{
|
||||
"keywords": ["evmos", "erc20", "assets"],
|
||||
"url": "https://docs.evmos.org/protocol/modules/erc20"
|
||||
},
|
||||
{
|
||||
"keywords": ["nomic", "nbtc", "assets"],
|
||||
"url": "https://docs.nomic.io/nbtc"
|
||||
},
|
||||
{
|
||||
"keywords": ["mpc", "wallet", "cryptography", "capability", "invokation"],
|
||||
"url": "https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf"
|
||||
},
|
||||
{
|
||||
"keywords": ["ucan", "spec", "cryptography", "authorization"],
|
||||
"url": "https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md"
|
||||
},
|
||||
{
|
||||
"keywords": ["zero-knowledge", "proofs", "cryptography", "privacy"],
|
||||
"url": "https://eprint.iacr.org/2021/1672.pdf"
|
||||
},
|
||||
{
|
||||
"keywords": ["gateway", "http", "sse"],
|
||||
"url": "https://echo.labstack.com/docs/cookbook/sse"
|
||||
},
|
||||
{
|
||||
"keywords": ["gateway", "http", "websocket"],
|
||||
"url": "https://echo.labstack.com/docs/cookbook/websocket"
|
||||
},
|
||||
{
|
||||
"keywords": ["gateway", "http", "subdomain"],
|
||||
"url": "https://echo.labstack.com/docs/cookbook/subdomain"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "models", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/coding/data-modeling"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "two=phase", "transfers", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/coding/two-phase-transfers"
|
||||
},
|
||||
{
|
||||
"keywords": [
|
||||
"tigerbeetle",
|
||||
"oracle",
|
||||
"reliable",
|
||||
"transaction",
|
||||
"submission"
|
||||
],
|
||||
"url": "https://docs.tigerbeetle.com/coding/reliable-transaction-submission"
|
||||
},
|
||||
{
|
||||
"keywords": ["currency", "exchange", "tigerbeetle", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/coding/recipes/currency-exchange"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "conditional", "transfers"],
|
||||
"url": "https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "account", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/reference/account"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "transfer", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/reference/transfer"
|
||||
},
|
||||
{
|
||||
"keywords": ["substreams", "packages", "consumer", "oracle"],
|
||||
"url": "https://docs.substreams.dev/documentation/consume/packages"
|
||||
},
|
||||
{
|
||||
"keywords": ["substreams", "deploy", "service", "oracle"],
|
||||
"url": "https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service"
|
||||
},
|
||||
{
|
||||
"keywords": ["substreams", "tutorial", "cosmos", "injective"],
|
||||
"url": "https://docs.substreams.dev/tutorials/cosmos/injective/foundational"
|
||||
},
|
||||
{
|
||||
"keywords": ["worker", "http", "jwt"],
|
||||
"url": "https://echo.labstack.com/docs/cookbook/jwt"
|
||||
},
|
||||
{
|
||||
"keywords": ["worker", "http", "secure"],
|
||||
"url": "https://echo.labstack.com/docs/middleware/secure"
|
||||
},
|
||||
{
|
||||
"keywords": ["worker", "http", "service-workers", "web", "api"],
|
||||
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
||||
},
|
||||
{
|
||||
"keywords": ["synapse", "matrix", "configuration", "usage"],
|
||||
"url": "https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "protobuf", "orm", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "sdk", "modules", "auth"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/auth"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "sdk", "modules", "bank"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/bank"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "modules", "authz", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/authz"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "protobuf", "collections", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "modules", "gov", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/gov"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "modules", "staking", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/staking"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "protobuf", "annotations", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "sdk", "modules", "group"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/group"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "sdk", "modules", "nft"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/nft"
|
||||
}
|
||||
],
|
||||
"next-milestone": "34"
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
- name: client
|
||||
include:
|
||||
- client/**
|
||||
- name: snrd
|
||||
include:
|
||||
- cmd/snrd/**
|
||||
- app/**
|
||||
- go.mod
|
||||
- go.sum
|
||||
- name: crypto
|
||||
include:
|
||||
- crypto/**
|
||||
- name: devops
|
||||
include:
|
||||
- .github/**
|
||||
- .devcontainer/**
|
||||
- scripts/**
|
||||
- etc/**
|
||||
- Dockerfile
|
||||
- "*-compose.yml"
|
||||
- README.md
|
||||
- name: docs
|
||||
include:
|
||||
- docs/**
|
||||
- name: hway
|
||||
include:
|
||||
- cmd/hway/**
|
||||
- bridge/**
|
||||
- types/**
|
||||
- name: dex
|
||||
include:
|
||||
- proto/dex/**
|
||||
- x/dex/**
|
||||
- name: did
|
||||
include:
|
||||
- proto/dex/**
|
||||
- x/did/**
|
||||
- name: dwn
|
||||
include:
|
||||
- proto/dex/**
|
||||
- x/dwn/**
|
||||
- name: svc
|
||||
include:
|
||||
- proto/dex/**
|
||||
- x/svc/**
|
||||
- name: motr
|
||||
include:
|
||||
- cmd/motr/**
|
||||
- name: vault
|
||||
include:
|
||||
- cmd/vault/**
|
||||
- name: com
|
||||
include:
|
||||
- packages/com/**
|
||||
- name: es
|
||||
include:
|
||||
- packages/es/**
|
||||
- name: pkl
|
||||
include:
|
||||
- packages/pkl/**
|
||||
- name: sdk
|
||||
include:
|
||||
- packages/sdk/**
|
||||
- name: ui
|
||||
include:
|
||||
- packages/ui/**
|
||||
- name: auth
|
||||
include:
|
||||
- web/auth/**
|
||||
- name: dash
|
||||
include:
|
||||
- web/dash/**
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
name: Bump version
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
env:
|
||||
NODE_VERSION: 20
|
||||
PNPM_VERSION: 10
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
minor: ${{ steps.check-milestone.outputs.minor }}
|
||||
non-docs: ${{ steps.filter.outputs.non-docs }}
|
||||
packages: ${{ steps.filter.outputs.packages }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
non-docs:
|
||||
- '!docs/**'
|
||||
- '!README.md'
|
||||
packages:
|
||||
- 'packages/**'
|
||||
- 'cli/**'
|
||||
- 'web/**'
|
||||
- 'pnpm-lock.yaml'
|
||||
# Check if any milestone has all issues closed
|
||||
- name: Check milestone completion
|
||||
id: check-milestone
|
||||
run: |
|
||||
# Get all open milestones and check if any have all issues closed
|
||||
MILESTONES=$(gh api repos/${{ github.repository }}/milestones --jq '.[] | select(.state == "open") | {title, open_issues}')
|
||||
|
||||
# Check if any milestone has 0 open issues
|
||||
MINOR_BUMP=false
|
||||
while IFS= read -r milestone; do
|
||||
if [ -n "$milestone" ]; then
|
||||
OPEN_ISSUES=$(echo "$milestone" | jq -r '.open_issues')
|
||||
TITLE=$(echo "$milestone" | jq -r '.title')
|
||||
if [ "$OPEN_ISSUES" = "0" ]; then
|
||||
echo "Milestone '$TITLE' is complete (0 open issues). Minor bump required."
|
||||
MINOR_BUMP=true
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done <<< "$(echo "$MILESTONES" | jq -c '.')"
|
||||
|
||||
echo "minor=$MINOR_BUMP" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_PAT_TOKEN }} # Handle Go/Binary versioning with commitizen
|
||||
|
||||
version-go:
|
||||
needs: changes
|
||||
if: "!startsWith(github.event.head_commit.message, 'bump:') && !startsWith(github.event.head_commit.message, 'hotfix:') && !startsWith(github.event.head_commit.message, 'Version Packages') && needs.changes.outputs.non-docs == 'true'"
|
||||
runs-on: ubuntu-latest
|
||||
name: "Bump Go binary version and create changelog"
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ssh-key: "${{ secrets.COMMIT_KEY }}"
|
||||
- name: Determine increment type
|
||||
id: increment
|
||||
run: |
|
||||
# Use the version-bump.sh script to determine increment type
|
||||
INCREMENT_TYPE=$(./scripts/version-bump.sh increment-type true ${{ github.repository }})
|
||||
echo "type=$INCREMENT_TYPE" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
- name: Create bump and changelog
|
||||
uses: commitizen-tools/commitizen-action@master
|
||||
with:
|
||||
push: false
|
||||
increment: ${{ steps.increment.outputs.type }}
|
||||
- name: Push using ssh
|
||||
run: |
|
||||
git push origin master --tags
|
||||
|
||||
close-milestone:
|
||||
needs: [changes, version-go]
|
||||
if: "needs.changes.outputs.minor == 'true'"
|
||||
runs-on: ubuntu-latest
|
||||
name: "Close completed milestone"
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
- name: Close completed milestone
|
||||
run: |
|
||||
./scripts/version-bump.sh close-milestone ${{ github.repository }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
@@ -0,0 +1,129 @@
|
||||
name: CD
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
bump:
|
||||
required: false
|
||||
type: string
|
||||
release:
|
||||
required: false
|
||||
type: string
|
||||
publish:
|
||||
required: false
|
||||
type: string
|
||||
deploy:
|
||||
required: false
|
||||
type: string
|
||||
continue-on-error:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
devbox-version:
|
||||
required: false
|
||||
default: 0.16.0
|
||||
type: string
|
||||
enable-cache:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
fetch-depth:
|
||||
required: false
|
||||
default: 0
|
||||
type: number
|
||||
persist-credentials:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
runs-on:
|
||||
required: false
|
||||
default: ubuntu-latest
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
bump:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - cd
|
||||
if: ${{ inputs.test != '' }}
|
||||
name: Bump
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Bump ${{ inputs.bump }}"
|
||||
run: devbox run bump:${{ inputs.bump }}
|
||||
if: ${{ inputs.bump != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
|
||||
release:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - cd
|
||||
if: ${{ inputs.release != '' }}
|
||||
name: Release
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Release ${{ inputs.release }}"
|
||||
run: devbox run release:${{ inputs.release }}
|
||||
if: ${{ inputs.release != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
|
||||
publish:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - publish
|
||||
if: ${{ inputs.publish != '' }}
|
||||
name: Publish
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Install ${{ inputs.install }}"
|
||||
run: devbox run install:${{ inputs.install }}
|
||||
- name: "Publish ${{ inputs.publish }}"
|
||||
run: devbox run publish:${{ inputs.publish }}
|
||||
if: ${{ inputs.publish != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
|
||||
deploy:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - deploy
|
||||
if: ${{ inputs.deploy != '' }}
|
||||
name: Deploy
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Install ${{ inputs.install }}"
|
||||
run: devbox run install:${{ inputs.install }}
|
||||
- name: "Deploy ${{ inputs.deploy }}"
|
||||
run: devbox run deploy:${{ inputs.deploy }}
|
||||
if: ${{ inputs.deploy != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
@@ -0,0 +1,136 @@
|
||||
|
||||
name: Changes
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
modules:
|
||||
description: "JSON array of changed modules"
|
||||
value: ${{ jobs.detect.outputs.modules }}
|
||||
core:
|
||||
description: "True if core files changed"
|
||||
value: ${{ jobs.detect.outputs.core }}
|
||||
app:
|
||||
description: "True if app files changed"
|
||||
value: ${{ jobs.detect.outputs.app }}
|
||||
crypto:
|
||||
description: "True if crypto files changed"
|
||||
value: ${{ jobs.detect.outputs.crypto }}
|
||||
hway:
|
||||
description: "True if highway files changed"
|
||||
value: ${{ jobs.detect.outputs.hway }}
|
||||
client:
|
||||
description: "True if client files changed"
|
||||
value: ${{ jobs.detect.outputs.client }}
|
||||
packages-changes:
|
||||
description: "True if JS packages changed"
|
||||
value: ${{ jobs.detect.outputs.packages-changes }}
|
||||
web-changes:
|
||||
description: "True if web app files changed"
|
||||
value: ${{ jobs.detect.outputs.web-changes }}
|
||||
go-changes:
|
||||
description: "True if Go files changed"
|
||||
value: ${{ jobs.detect.outputs.go-changes }}
|
||||
wasm-changes:
|
||||
description: "True if WASM files changed"
|
||||
value: ${{ jobs.detect.outputs.wasm-changes }}
|
||||
docker-changes:
|
||||
description: "True if Docker files changed"
|
||||
value: ${{ jobs.detect.outputs.docker-changes }}
|
||||
|
||||
jobs:
|
||||
detect:
|
||||
name: Find Changes
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
modules: ${{ steps.set-modules.outputs.modules }}
|
||||
core: ${{ steps.filter.outputs.core }}
|
||||
app: ${{ steps.filter.outputs.app }}
|
||||
crypto: ${{ steps.filter.outputs.crypto }}
|
||||
hway: ${{ steps.filter.outputs.hway }}
|
||||
client: ${{ steps.filter.outputs.client }}
|
||||
packages-changes: ${{ steps.filter.outputs.packages-changes == 'true' }}
|
||||
web-changes: ${{ steps.filter.outputs.web-changes == 'true' }}
|
||||
go-changes: ${{ steps.filter.outputs.go-changes == 'true' }}
|
||||
wasm-changes: ${{ steps.filter.outputs.wasm-changes == 'true' }}
|
||||
docker-changes: ${{ steps.filter.outputs.docker-changes == 'true' }}
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
- name: Detect changed files
|
||||
uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
dex:
|
||||
- 'x/dex/**'
|
||||
- 'proto/sonr/dex/**'
|
||||
did:
|
||||
- 'x/did/**'
|
||||
- 'proto/sonr/did/**'
|
||||
dwn:
|
||||
- 'x/dwn/**'
|
||||
- 'proto/sonr/dwn/**'
|
||||
svc:
|
||||
- 'x/svc/**'
|
||||
- 'proto/sonr/svc/**'
|
||||
hway:
|
||||
- 'cmd/hway/**'
|
||||
- 'internal/bridge/**'
|
||||
- 'internal/**'
|
||||
crypto:
|
||||
- 'crypto/**'
|
||||
client:
|
||||
- 'client/**'
|
||||
- 'client/go.mod'
|
||||
- 'client/go.sum'
|
||||
core:
|
||||
- 'app/**'
|
||||
- 'cmd/**'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
packages-changes:
|
||||
- 'packages/**'
|
||||
- 'pnpm-lock.yaml'
|
||||
- 'package.json'
|
||||
- 'tsconfig.json'
|
||||
web-changes:
|
||||
- 'web/**'
|
||||
- 'pnpm-lock.yaml'
|
||||
- 'package.json'
|
||||
go-changes:
|
||||
- 'app/**'
|
||||
- 'x/**'
|
||||
- 'cmd/**'
|
||||
- 'client/**'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
wasm-changes:
|
||||
- 'cmd/vault/**'
|
||||
- 'x/dwn/client/wasm/main.go'
|
||||
- 'x/dwn/Makefile'
|
||||
docker-changes:
|
||||
- 'Dockerfile'
|
||||
list-files: json
|
||||
- name: Set module outputs
|
||||
id: set-modules
|
||||
run: |
|
||||
modules=()
|
||||
if [[ "${{ steps.filter.outputs.dex }}" == "true" ]]; then
|
||||
modules+=("dex")
|
||||
fi
|
||||
if [[ "${{ steps.filter.outputs.did }}" == "true" ]]; then
|
||||
modules+=("did")
|
||||
fi
|
||||
if [[ "${{ steps.filter.outputs.dwn }}" == "true" ]]; then
|
||||
modules+=("dwn")
|
||||
fi
|
||||
if [[ "${{ steps.filter.outputs.svc }}" == "true" ]]; then
|
||||
modules+=("svc")
|
||||
fi
|
||||
|
||||
if [[ ${#modules[@]} -eq 0 ]]; then
|
||||
echo "modules=[]" >> $GITHUB_OUTPUT
|
||||
else
|
||||
printf -v joined '"%s",' "${modules[@]}"
|
||||
echo "modules=[${joined%,}]" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
@@ -0,0 +1,101 @@
|
||||
name: CI
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build:
|
||||
required: false
|
||||
type: string
|
||||
snapshot:
|
||||
required: false
|
||||
type: string
|
||||
test:
|
||||
required: false
|
||||
type: string
|
||||
continue-on-error:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
devbox-version:
|
||||
required: false
|
||||
default: 0.16.0
|
||||
type: string
|
||||
enable-cache:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
fetch-depth:
|
||||
required: false
|
||||
default: 0
|
||||
type: number
|
||||
persist-credentials:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
runs-on:
|
||||
required: false
|
||||
default: ubuntu-latest
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - ci
|
||||
if: ${{ inputs.test != '' }}
|
||||
name: Test
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Test ${{ inputs.test }}"
|
||||
run: devbox run test:${{ inputs.test }}
|
||||
if: ${{ inputs.test != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
|
||||
build:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - ci
|
||||
if: ${{ inputs.build != '' }}
|
||||
name: Build
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Build ${{ inputs.build }}"
|
||||
run: devbox run build:${{ inputs.build }}
|
||||
if: ${{ inputs.build != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
|
||||
snapshot:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - ci
|
||||
if: ${{ inputs.snapshot != '' }}
|
||||
name: Deploy
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Snapshot ${{ inputs.snapshot }}"
|
||||
run: devbox run snapshot:${{ inputs.snapshot }}
|
||||
if: ${{ inputs.snapshot != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
@@ -0,0 +1,137 @@
|
||||
name: Devbox Run
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
install:
|
||||
required: true
|
||||
default: go
|
||||
type: string
|
||||
build:
|
||||
required: false
|
||||
type: string
|
||||
deploy:
|
||||
required: false
|
||||
type: string
|
||||
publish:
|
||||
required: false
|
||||
type: string
|
||||
test:
|
||||
required: false
|
||||
type: string
|
||||
continue-on-error:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
devbox-version:
|
||||
required: false
|
||||
default: 0.16.0
|
||||
type: string
|
||||
enable-cache:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
fetch-depth:
|
||||
required: false
|
||||
default: 0
|
||||
type: number
|
||||
persist-credentials:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
runs-on:
|
||||
required: false
|
||||
default: ubuntu-latest
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - test
|
||||
if: ${{ inputs.test != '' }}
|
||||
name: Test
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Install ${{ inputs.install }}"
|
||||
run: devbox run install:${{ inputs.install }}
|
||||
- name: "Test ${{ inputs.test }}"
|
||||
run: devbox run test:${{ inputs.test }}
|
||||
if: ${{ inputs.test != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
|
||||
build:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - build
|
||||
if: ${{ inputs.build != '' }}
|
||||
name: Build
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Install ${{ inputs.install }}"
|
||||
run: devbox run install:${{ inputs.install }}
|
||||
- name: "Build ${{ inputs.build }}"
|
||||
run: devbox run build:${{ inputs.build }}
|
||||
if: ${{ inputs.build != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
|
||||
publish:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - publish
|
||||
if: ${{ inputs.publish != '' }}
|
||||
name: Publish
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Install ${{ inputs.install }}"
|
||||
run: devbox run install:${{ inputs.install }}
|
||||
- name: "Publish ${{ inputs.publish }}"
|
||||
run: devbox run publish:${{ inputs.publish }}
|
||||
if: ${{ inputs.publish != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
|
||||
deploy:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
environment: staging - deploy
|
||||
if: ${{ inputs.deploy != '' }}
|
||||
name: Deploy
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: ${{ inputs.persist-credentials }}
|
||||
fetch-depth: ${{ inputs.fetch-depth }}
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.13.0
|
||||
with:
|
||||
enable-cache: ${{ inputs.enable-cache }}
|
||||
devbox-version: ${{ inputs.devbox-version }}
|
||||
- name: "Install ${{ inputs.install }}"
|
||||
run: devbox run install:${{ inputs.install }}
|
||||
- name: "Deploy ${{ inputs.deploy }}"
|
||||
run: devbox run deploy:${{ inputs.deploy }}
|
||||
if: ${{ inputs.deploy != '' }}
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
@@ -0,0 +1,99 @@
|
||||
name: CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
GO_VERSION: 1.24.4
|
||||
NODE_VERSION: 20
|
||||
PNPM_VERSION: 10
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
packages: write
|
||||
jobs:
|
||||
detect-changes:
|
||||
name: Analyze
|
||||
uses: ./.github/workflows/changes.yml
|
||||
|
||||
client:
|
||||
name: Client
|
||||
needs: detect-changes
|
||||
if: ${{ needs.detect-changes.outputs.client == 'true' }}
|
||||
uses: ./.github/workflows/devbox.yml
|
||||
with:
|
||||
install: go
|
||||
test: client
|
||||
build: client
|
||||
|
||||
core:
|
||||
name: Core
|
||||
needs: detect-changes
|
||||
if: ${{ needs.detect-changes.outputs.go-changes == 'true' }}
|
||||
uses: ./.github/workflows/devbox.yml
|
||||
with:
|
||||
install: go
|
||||
test: app
|
||||
build: snrd
|
||||
|
||||
crypto:
|
||||
name: Crypto
|
||||
needs: detect-changes
|
||||
if: ${{ needs.detect-changes.outputs.crypto == 'true' }}
|
||||
uses: ./.github/workflows/devbox.yml
|
||||
with:
|
||||
install: go
|
||||
test: crypto
|
||||
|
||||
docker:
|
||||
name: Docker
|
||||
needs: detect-changes
|
||||
if: ${{ needs.detect-changes.outputs.docker-changes == 'true' }}
|
||||
uses: ./.github/workflows/devbox.yml
|
||||
with:
|
||||
install: go
|
||||
build: docker
|
||||
|
||||
hway:
|
||||
name: Highway
|
||||
needs: detect-changes
|
||||
if: ${{ needs.detect-changes.outputs.hway == 'true' }}
|
||||
uses: ./.github/workflows/devbox.yml
|
||||
with:
|
||||
install: go
|
||||
build: hway
|
||||
|
||||
packages:
|
||||
name: Packages
|
||||
needs: detect-changes
|
||||
if: ${{ needs.detect-changes.outputs.packages-changes == 'true' }}
|
||||
uses: ./.github/workflows/devbox.yml
|
||||
with:
|
||||
install: pnpm
|
||||
test: packages
|
||||
|
||||
web:
|
||||
name: Web
|
||||
needs: detect-changes
|
||||
if: ${{ needs.detect-changes.outputs.web-changes == 'true' }}
|
||||
uses: ./.github/workflows/devbox.yml
|
||||
with:
|
||||
install: pnpm
|
||||
test: web
|
||||
|
||||
x-modules:
|
||||
name: X
|
||||
needs: detect-changes
|
||||
if: ${{ needs.detect-changes.outputs.modules != '[]' && needs.detect-changes.outputs.modules != '' }}
|
||||
strategy:
|
||||
matrix:
|
||||
module: ${{ fromJSON(needs.detect-changes.outputs.modules) }}
|
||||
fail-fast: false
|
||||
uses: ./.github/workflows/devbox.yml
|
||||
with:
|
||||
install: go
|
||||
test: ${{ matrix.module }}
|
||||
Executable
+406
@@ -0,0 +1,406 @@
|
||||
name: Release
|
||||
|
||||
# This workflow handles the complete release process:
|
||||
# 1. Build binaries for multiple platforms (snrd, hway)
|
||||
# 2. Build WASM modules (vault, motor)
|
||||
# 3. Publish to GitHub releases, S3, and package registries
|
||||
# 4. Build and push Docker images for all services
|
||||
# 5. Publish NPM packages
|
||||
# 6. Push protobuf definitions to Buf Schema Registry
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+" # ignore rc
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
# Prepare job runs on multiple OS for native builds
|
||||
prepare:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
- os: ubuntu-latest
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
- os: macos-latest
|
||||
goos: darwin
|
||||
goarch: amd64
|
||||
- os: macos-latest
|
||||
goos: darwin
|
||||
goarch: arm64
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
flags: ""
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
check-latest: true
|
||||
cache-dependency-path: "**/*.sum"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
go mod download
|
||||
# Build WASM modules
|
||||
make build-motr
|
||||
make build-vault
|
||||
|
||||
# Set flags for workflow dispatch (nightly builds)
|
||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "flags=--nightly" >> $GITHUB_ENV
|
||||
|
||||
# Generate cache key
|
||||
- shell: bash
|
||||
run: |
|
||||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
|
||||
# Cache the built artifacts
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: dist/${{ matrix.goos }}
|
||||
key: ${{ matrix.goos }}-${{ matrix.goarch }}-${{ env.sha_short }}${{ env.flags }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
# Run goreleaser in split mode for snrd
|
||||
- name: Run GoReleaser for snrd (Split)
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser-pro
|
||||
version: latest
|
||||
args: release --clean --split --config cmd/snrd/.goreleaser.yml ${{ env.flags }}
|
||||
workdir: cmd/snrd
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
GGOOS: ${{ matrix.goos }}
|
||||
GGOARCH: ${{ matrix.goarch }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
# Run goreleaser in split mode for hway
|
||||
- name: Run GoReleaser for hway (Split)
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser-pro
|
||||
version: latest
|
||||
args: release --clean --split --config cmd/hway/.goreleaser.yml ${{ env.flags }}
|
||||
workdir: cmd/hway
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
GGOOS: ${{ matrix.goos }}
|
||||
GGOARCH: ${{ matrix.goarch }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
# WASM modules build job
|
||||
wasm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
check-latest: true
|
||||
|
||||
- name: Setup TinyGo
|
||||
uses: acifani/setup-tinygo@v2
|
||||
with:
|
||||
tinygo-version: '0.32.0'
|
||||
|
||||
- name: Build WASM modules
|
||||
run: |
|
||||
# Build vault WASM
|
||||
cd cmd/vault
|
||||
make build
|
||||
cd ../..
|
||||
|
||||
# Build motor WASM
|
||||
cd cmd/motr
|
||||
make build
|
||||
cd ../..
|
||||
|
||||
- name: Run GoReleaser for WASM modules
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser-pro
|
||||
version: latest
|
||||
args: release --clean --config cmd/vault/.goreleaser.yml
|
||||
workdir: cmd/vault
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Run GoReleaser for Motor WASM
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser-pro
|
||||
version: latest
|
||||
args: release --clean --config cmd/motr/.goreleaser.yml
|
||||
workdir: cmd/motr
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
# Merge and release job combines all artifacts
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare, wasm]
|
||||
env:
|
||||
flags: ""
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
check-latest: true
|
||||
cache-dependency-path: "**/*.sum"
|
||||
|
||||
# Set flags for workflow dispatch
|
||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "flags=--nightly" >> $GITHUB_ENV
|
||||
|
||||
# Generate cache key
|
||||
- shell: bash
|
||||
run: |
|
||||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
|
||||
# Restore all cached artifacts from prepare jobs
|
||||
- name: Restore Linux AMD64 artifacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dist/linux
|
||||
key: linux-amd64-${{ env.sha_short }}${{ env.flags }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Restore Linux ARM64 artifacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dist/linux
|
||||
key: linux-arm64-${{ env.sha_short }}${{ env.flags }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Restore Darwin AMD64 artifacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dist/darwin
|
||||
key: darwin-amd64-${{ env.sha_short }}${{ env.flags }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Restore Darwin ARM64 artifacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dist/darwin
|
||||
key: darwin-arm64-${{ env.sha_short }}${{ env.flags }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
# Merge and publish the release for snrd
|
||||
- name: Run GoReleaser for snrd (Merge)
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser-pro
|
||||
version: latest
|
||||
args: continue --merge --config cmd/snrd/.goreleaser.yml ${{ env.flags }}
|
||||
workdir: cmd/snrd
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
# Merge and publish the release for hway
|
||||
- name: Run GoReleaser for hway (Merge)
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser-pro
|
||||
version: latest
|
||||
args: continue --merge --config cmd/hway/.goreleaser.yml ${{ env.flags }}
|
||||
workdir: cmd/hway
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
# Protobuf publishing job
|
||||
protobuf:
|
||||
runs-on: ubuntu-latest
|
||||
needs: release
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Buf
|
||||
uses: bufbuild/buf-setup-action@v1
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Push to Buf Schema Registry
|
||||
uses: bufbuild/buf-push-action@v1
|
||||
with:
|
||||
input: proto
|
||||
buf_token: ${{ secrets.BUF_TOKEN }}
|
||||
github_token: ${{ secrets.GH_PAT_TOKEN }}
|
||||
|
||||
# NPM packages publishing job
|
||||
npm:
|
||||
runs-on: ubuntu-latest
|
||||
needs: release
|
||||
if: github.event_name == 'push' # Only on tag push, not workflow_dispatch
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 9
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build packages
|
||||
run: pnpm build
|
||||
|
||||
- name: Publish packages
|
||||
run: |
|
||||
# Update package versions to match git tag
|
||||
export VERSION=${GITHUB_REF#refs/tags/v}
|
||||
bash scripts/version-bump.sh sync-packages all
|
||||
|
||||
# Publish to npm
|
||||
pnpm --filter "./packages/*" publish --access public --no-git-checks
|
||||
pnpm --filter "./cli/*" publish --access public --no-git-checks
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
# Docker multi-platform build job
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: release
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- service: snrd
|
||||
dockerfile: cmd/snrd/Dockerfile
|
||||
description: "Sonr blockchain daemon"
|
||||
- service: hway
|
||||
dockerfile: cmd/hway/Dockerfile
|
||||
description: "Highway service - task processor"
|
||||
- service: auth
|
||||
dockerfile: web/auth/Dockerfile
|
||||
description: "Authentication web application"
|
||||
- service: dash
|
||||
dockerfile: web/dash/Dockerfile
|
||||
description: "Dashboard web application"
|
||||
- service: postgres
|
||||
dockerfile: etc/postgres/Dockerfile
|
||||
description: "PostgreSQL with extensions"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GH_PAT_TOKEN }}
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/sonr-io/${{ matrix.service }}
|
||||
onsonr/${{ matrix.service }}
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest
|
||||
type=raw,value=${{ inputs.tag || 'latest' }},enable=${{ github.event_name == 'workflow_dispatch' }}
|
||||
|
||||
- name: Build and push ${{ matrix.service }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: |
|
||||
${{ steps.meta.outputs.labels }}
|
||||
org.opencontainers.image.description=${{ matrix.description }}
|
||||
cache-from: type=gha,scope=${{ matrix.service }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.service }}
|
||||
@@ -1,63 +0,0 @@
|
||||
name: Check PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
merge_group:
|
||||
|
||||
permissions:
|
||||
contents: read # for TimonVS/pr-labeler-action to read config file
|
||||
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
|
||||
|
||||
jobs:
|
||||
verify-pr:
|
||||
name: Test Lints
|
||||
if: github.event_name == 'pull_request'
|
||||
permissions:
|
||||
contents: read # for TimonVS/pr-labeler-action to read config file
|
||||
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required to fetch all history for merging
|
||||
- uses: TimonVS/pr-labeler-action@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
|
||||
- name: Trunk Check
|
||||
uses: trunk-io/trunk-action@v1
|
||||
|
||||
test-builds:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
name: Test Builds
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.24"
|
||||
check-latest: true
|
||||
- name: Run Sonrd Build
|
||||
run: make build
|
||||
|
||||
test-unit:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
name: Test Unit
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.24"
|
||||
check-latest: true
|
||||
- run: make test-unit
|
||||
@@ -0,0 +1,18 @@
|
||||
name: CI Status
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["PR CI", "Post-Merge Release", "Nightly Snapshot"]
|
||||
types: [completed]
|
||||
|
||||
jobs:
|
||||
report:
|
||||
name: Report CI Status
|
||||
runs-on: builder
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- name: Report Failure
|
||||
run: |
|
||||
echo "❌ Workflow Failed: ${{ github.event.workflow_run.name }}"
|
||||
echo "Branch: ${{ github.event.workflow_run.head_branch }}"
|
||||
echo "Commit: ${{ github.event.workflow_run.head_sha }}"
|
||||
echo "URL: ${{ github.event.workflow_run.html_url }}"
|
||||
@@ -1,42 +0,0 @@
|
||||
name: Merge Group
|
||||
|
||||
on:
|
||||
merge_group:
|
||||
|
||||
permissions:
|
||||
contents: read # for TimonVS/pr-labeler-action to read config file
|
||||
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
|
||||
|
||||
jobs:
|
||||
test-race:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'merge_group'
|
||||
name: Test Race
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.12.0
|
||||
- run: make test-race
|
||||
|
||||
test-cover:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'merge_group'
|
||||
name: Test Coverage
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: onsonr/sonr
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- run: make test-cover
|
||||
@@ -0,0 +1,61 @@
|
||||
name: PR CI
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: pr-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
DEVBOX_VERSION: 0.16.0
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate & Test
|
||||
runs-on: builder # Self-hosted runner
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required for github-env.sh comparisons
|
||||
# Cache can be local on self-hosted runner for better performance
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
~/.local/share/pnpm/store
|
||||
~/.devbox
|
||||
key: deps-builder-${{ hashFiles('go.sum', 'pnpm-lock.yaml', 'devbox.json') }}
|
||||
restore-keys: deps-builder-
|
||||
|
||||
- name: Install Dependencies
|
||||
run: devbox install
|
||||
|
||||
- name: Test Affected Scopes
|
||||
run: |
|
||||
echo "🔍 Analyzing changes..."
|
||||
./scripts/github-env.sh git-context
|
||||
echo ""
|
||||
devbox run test
|
||||
|
||||
- name: Build Affected Scopes
|
||||
run: devbox run build
|
||||
|
||||
- name: Verify Build Artifacts
|
||||
run: |
|
||||
# Verify critical build outputs exist
|
||||
if [ -d "build/" ]; then
|
||||
ls -la build/
|
||||
fi
|
||||
|
||||
# Cleanup workspace for self-hosted runner
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
# Clean build artifacts to prevent disk fill
|
||||
make clean || true
|
||||
# Keep caches but remove build outputs
|
||||
rm -rf dist/ build/ || true
|
||||
Reference in New Issue
Block a user