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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .env.example

This file was deleted.

2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

18 changes: 0 additions & 18 deletions .github/dependabot.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/build.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/contract-release.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/dapp-ipfs.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Rust CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

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

- name: Run clippy
run: cargo clippy -- -D warnings

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

- name: Build release
run: cargo build --release --verbose

soroban:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
override: true

- name: Install Soroban CLI
run: |
cargo install --locked soroban-cli --features opt

- name: Build WASM
run: |
cd stellar-contract
cargo build --target wasm32-unknown-unknown --release

- name: Optimize WASM
run: |
soroban contract optimize --wasm target/wasm32-unknown-unknown/release/stellar_scavngr_contract.wasm

- name: Upload WASM artifact
uses: actions/upload-artifact@v4
with:
name: contract-wasm
path: target/wasm32-unknown-unknown/release/*.wasm
66 changes: 30 additions & 36 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,39 @@
# stellar/soroban/Rust output
target
.soroban

# project identity and alias files will be in .config/stellar
.config

# test snapshot folders from sample contracts
test_snapshots
# Rust
target/
Cargo.lock
**/*.rs.bk
*.pdb

# Soroban
.soroban/
*.wasm
*.optimized.wasm

# IDE
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# build output
dist
dist-ssr
# Environment
.env
.env.local
.env.*.local

# dependencies
# Node (for frontend)
node_modules/

# logs
logs
dist/
.cache/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# environment variables
.env
.env.*
!.env.example

# easy way to create temporary local-only files and folders
*.local.*

# macOS-specific files
.DS_Store

# generated contract clients
packages/*
# if you have other workspace packages, add them here
!packages/.gitkeep
# Build artifacts
build/
out/

# generated contract client imports
src/contracts/*
!src/contracts/util.ts
# OS
Thumbs.db
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

Loading
Loading