Skip to content

Commit

Permalink
📦 Setup contract development env
Browse files Browse the repository at this point in the history
cargo generate gh:xxuejie/ckb-script-templates workspace
  • Loading branch information
doitian committed Feb 2, 2024
1 parent 3f61fe8 commit 936ecd1
Show file tree
Hide file tree
Showing 16 changed files with 1,856 additions and 3 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: cargo

on:
push:
branches: [main, develop]
pull_request:
types: [opened, synchronize]

env:
RUST_LOG: debug
RUST_BACKTRACE: "1"
CARGO_TERM_COLOR: always

jobs:
linters:
name: Contract - Linters
timeout-minutes: 15
runs-on: ubuntu-latest

strategy:
matrix:
target:
- fmt
- check
- clippy

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: 17

- name: Setup up Rust
run: |
rustup target add riscv64imac-unknown-none-elf
- name: Run Command
run: |
make -f contracts.mk ${{ matrix.target }}
if [ "${{ magrix.target }}" = "fmt" ]; then
git diff --exit-code .
fi
build-and-test:
name: Contract - Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: 17

- name: Setup up Rust
run: |
rustup target add riscv64imac-unknown-none-elf
- name: Build & Test
run: make contract
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml → .github/workflows/pnpm.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: CI
name: pnpm

on:
push:
branches: [main, develop]
pull_request:
types: [opened, synchronize]

jobs:
build:
name: Build and Test
pnpm:
name: pnpm
timeout-minutes: 15
runs-on: ubuntu-latest

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
/migrations/joyid
/migrations/omnilock

# Contract
/target
/contracts/__tests__/failed_txs

# CKB
/ckb-miner.toml
/ckb.toml
Expand Down
Loading

0 comments on commit 936ecd1

Please sign in to comment.