-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (84 loc) · 2.09 KB
/
cargo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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/