-
Notifications
You must be signed in to change notification settings - Fork 37
154 lines (139 loc) · 4.08 KB
/
Copy pathci.yml
File metadata and controls
154 lines (139 loc) · 4.08 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '23 4 * * *'
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
evm: ${{ steps.filter.outputs.evm }}
stellar: ${{ steps.filter.outputs.stellar }}
solana: ${{ steps.filter.outputs.solana }}
ckb: ${{ steps.filter.outputs.ckb }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
evm:
- 'evm/**'
stellar:
- 'stellar/**'
solana:
- 'solana/**'
ckb:
- 'ckb/**'
evm:
needs: changes
if: needs.changes.outputs.evm == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: evm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npx prettier --check --ignore-path ../.prettierignore .
- run: npx hardhat compile
- run: npx hardhat test
stellar:
needs: changes
if: needs.changes.outputs.stellar == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: stellar
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install pnpm
run: npm install -g pnpm
- name: Install Node dependencies
run: pnpm install
working-directory: .
- name: Setup Stellar CLI
uses: stellar/setup-soroban@v1
with:
version: "22.0.1"
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components: rustfmt
targets: wasm32-unknown-unknown
- run: cargo fmt --all --check
- run: cargo test --workspace
- run: cargo build --target wasm32-unknown-unknown --release
- name: Optimize and Check WASM Size
run: |
for wasm in target/wasm32-unknown-unknown/release/*.wasm; do
soroban contract optimize --wasm "$wasm"
opt_wasm="${wasm%.*}_optimized.wasm"
SIZE=$(stat -c%s "$opt_wasm")
echo "$opt_wasm size is $SIZE bytes"
if [ "$SIZE" -gt 112640 ]; then
echo "Error: $opt_wasm exceeds 110 KB limit"
exit 1
fi
done
- name: Run Upgrade Authority Enforcement Tests
run: cargo test upgrade_auth --workspace
- name: Generate Stellar TypeScript bindings
run: pnpm bindings:stellar
working-directory: .
- name: Check for bindings drift (diff detection)
run: git diff --exit-code
working-directory: .
stellar-nightly:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
defaults:
run:
working-directory: stellar
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all --check
- run: WRAITH_PROPTEST_CASES=16384 cargo test --workspace --test properties
solana:
needs: changes
if: needs.changes.outputs.solana == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: solana
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.89.0
- uses: heyAyushh/setup-anchor@v4.2
with:
anchor-version: 0.30.1
- run: anchor build
ckb:
needs: changes
if: needs.changes.outputs.ckb == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ckb
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: riscv64imac-unknown-none-elf
- run: sudo apt-get update && sudo apt-get install -y gcc-riscv64-unknown-elf
- run: CC_riscv64imac_unknown_none_elf=riscv64-unknown-elf-gcc cargo build --target riscv64imac-unknown-none-elf --release -p wraith-stealth-lock