Skip to content

Commit

Permalink
feat: the first version of implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
yangby-cryptape committed Aug 5, 2024
1 parent b8ea370 commit fd81bf3
Show file tree
Hide file tree
Showing 51 changed files with 6,992 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI
on:
push:
branches: [ master, develop, release/* ]
pull_request:
branches: [ master, release/* ]
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: 1.80.0
jobs:
rustfmt:
name: Checks / Format
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v4
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component rustfmt
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Format Check
run: make fmt
clippy:
name: Checks / Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v4
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component clippy
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Lint Check
run: make clippy
test:
name: Tests / Build & Test
needs: [ rustfmt, clippy ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-2019 ]
fail-fast: true
max-parallel: 3
steps:
- name: Checkout the Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install LLVM on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
rm llvm.sh
- name: Install LLVM on macOS
if: matrix.os == 'macos-latest'
run: brew install llvm@16
- name: Install LLVM on Windows
if: matrix.os == 'windows-2019'
shell: pwsh
run: |
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
scoop install llvm yasm
echo "$env:USERPROFILE\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal
rustup override set ${{ env.RUST_TOOLCHAIN }}
rustup target add riscv64imac-unknown-none-elf
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Build Libraries
run: cargo build
- name: Build Contracts
run: make build
- name: Unit Testing
run: make test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/build
/target
/tests/failed_txs
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "deps/ckb-c-stdlib"]
path = deps/ckb-c-stdlib
url = https://github.com/nervosnetwork/ckb-c-stdlib
Loading

0 comments on commit fd81bf3

Please sign in to comment.