🚀 Deploy verifier to testnet (#53) #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cargo | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
types: [opened, synchronize] | |
env: | |
RUST_LOG: debug | |
RUST_BACKTRACE: "1" | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-schemas: | |
name: Contract - Check Schemas | |
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: Schemas Is Up to Date | |
run: | | |
cargo install moleculec --locked | |
make clean-schemas schemas | |
git diff --exit-code . | |
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 [ "${{ matrix.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: | | |
touch crates/ckb-dao-cobuild-schemas/src/schemas/* | |
make contract | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: contracts | |
path: build/release/ |