-
Notifications
You must be signed in to change notification settings - Fork 71
131 lines (116 loc) · 5.17 KB
/
reports.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
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
on: [push, pull_request, workflow_dispatch]
name: Reports Workflow
concurrency:
group: ci-${{ github.ref }}-reports
cancel-in-progress: true
jobs:
reports-setup:
name: Check Reports
runs-on: ubuntu-latest
outputs:
rust-nightly: nightly-2025-01-01
strategy:
fail-fast: false
matrix:
task:
- report-workflow
- uniswap_profile-workflow
- sablier
- adhoc-sol-files-workflow
- nft-workflow
- nft-workflow-env
- ccip-functions-report
- hardhat-playground-report
- prb-math-report
- report-json
- adhoc-sol-files-highs-only-json
- sarif-report
- empty-report
steps:
- name: Install Foundry Toolchain
uses: foundry-rs/foundry-toolchain@v1.2.0
- name: Checkout Sources
uses: actions/checkout@v4
- name: Install Rust Nightly (2025-01-01)
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-01-01
override: true
- name: Cache Rust Dependencies
uses: Swatinem/rust-cache@v2
- name: Checkout Submodules
run: git submodule update --init --recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Install JS Dependencies
run: |
pnpm install --prefix tests/2024-05-Sablier/v2-core
pnpm install --prefix tests/prb-math/
- name: Checkout Sources
uses: actions/checkout@v4
- name: Restore Rust Cache
uses: Swatinem/rust-cache@v2
- name: Generate Report (${{ matrix.task }})
run: |
case "${{ matrix.task }}" in
report-workflow)
cargo run -- -o ./reports/report-workflow.md --src src/ ./tests/contract-playground/ --skip-update-check
diff ./reports/report.md ./reports/report-workflow.md
;;
uniswap_profile-workflow)
FOUNDRY_PROFILE=uniswap cargo run -- -o ./reports/uniswap_profile-workflow.md ./tests/contract-playground/ --skip-update-check
diff reports/uniswap_profile.md reports/uniswap_profile-workflow.md
;;
sablier)
FOUNDRY_PROFILE=uniswap cargo run -- -o ./reports/sablier.md ./tests/2024-05-Sablier --skip-update-check
diff reports/sablier-aderyn-toml-nested-root.md reports/sablier.md
;;
adhoc-sol-files-workflow)
cargo run -- -o ./reports/adhoc-sol-files-report-workflow.md ./tests/adhoc-sol-files --skip-update-check
diff ./reports/adhoc-sol-files-report.md ./reports/adhoc-sol-files-report-workflow.md
;;
nft-workflow)
cargo run -- -o ./reports/nft-workflow-report.md --src src/ ./tests/foundry-nft-f23 --skip-update-check
diff ./reports/nft-report.md ./reports/nft-workflow-report.md
;;
nft-workflow-env)
cargo run -- -o ./reports/nft-workflow-report-icm.md ./tests/foundry-nft-f23-icm --skip-update-check
diff ./reports/nft-report-icm.md ./reports/nft-workflow-report-icm.md
;;
ccip-functions-report)
cargo run -- -o reports/ccip-functions-report-workflow.md tests/ccip-contracts/contracts --src src/v0.8/functions/ -x "tests/,test/,mocks/" --skip-update-check
diff ./reports/ccip-functions-report.md ./reports/ccip-functions-report-workflow.md
;;
hardhat-playground-report)
cargo run -- tests/hardhat-js-playground -o reports/hardhat-playground-report-workflow.md --skip-update-check
diff ./reports/hardhat-playground-report.md ./reports/hardhat-playground-report-workflow.md
;;
prb-math-report)
cargo run -- ./tests/prb-math -o ./reports/prb-math-report-workflow.md --skip-update-check
diff ./reports/prb-math-report.md ./reports/prb-math-report-workflow.md
;;
report-json)
cargo run -- -o ./reports/report-workflow.json -i src/ -x lib/ ./tests/contract-playground/ --skip-update-check
diff ./reports/report.json ./reports/report-workflow.json
;;
adhoc-sol-files-highs-only-json)
cargo run -- -o ./reports/adhoc-sol-files-highs-only-report-workflow.json ./tests/adhoc-sol-files --skip-update-check --highs-only
diff ./reports/adhoc-sol-files-highs-only-report.json ./reports/adhoc-sol-files-highs-only-report-workflow.json
;;
sarif-report)
cargo run -- -o ./reports/ci-report.sarif ./tests/contract-playground/ --skip-update-check
diff ./reports/report.sarif ./reports/ci-report.sarif
;;
empty-report)
cargo run -- tests/contract-playground -o reports/empty_report_workflow.md -i IgnoreEverything.sol
diff ./reports/empty_report.md ./reports/empty_report_workflow.md
;;
esac