-
Notifications
You must be signed in to change notification settings - Fork 12
166 lines (146 loc) · 4.72 KB
/
Copy pathethdebug.yml
File metadata and controls
166 lines (146 loc) · 4.72 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
155
156
157
158
159
160
161
162
163
164
165
166
name: ETHDebug
on:
pull_request:
paths:
- ".github/workflows/ethdebug.yml"
- "package.json"
- "yarn.lock"
- "tsconfig*.json"
- "schemas/**"
- "packages/format/**"
- "packages/conformance/**"
workflow_dispatch:
inputs:
solidity_ref:
description: Solidity ref to build for solc
default: develop
required: true
soldb_ref:
description: SolDB ref to build
default: main
required: true
concurrency:
group: ethdebug-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FOUNDRY_VERSION: v1.0.0
SOLIDITY_REF: ${{ github.event.inputs.solidity_ref || 'develop' }}
SOLDB_REF: ${{ github.event.inputs.soldb_ref || 'main' }}
jobs:
conformance:
name: solc + soldb conformance
runs-on: ubuntu-24.04
steps:
- name: Checkout ethdebug/format
uses: actions/checkout@v4
with:
path: format
- name: Checkout SolDB
uses: actions/checkout@v4
with:
repository: walnuthq/soldb
ref: ${{ env.SOLDB_REF }}
path: soldb
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: format/yarn.lock
- name: Install format dependencies
run: yarn install --frozen-lockfile
working-directory: format
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Fetch prebuilt solc with ETHDebug support
id: fetch-solc
continue-on-error: true
env:
CIRCLECI_TOKEN: ${{ secrets.CIRCLECI_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
run: |
python -m pip install git+https://github.com/argotorg/solc-bench.git
solc-bench fetch "${SOLIDITY_REF}" \
--output "${GITHUB_WORKSPACE}/solidity/build/solc/solc" \
--force
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- name: Cache Cargo build
uses: actions/cache@v4
with:
path: |
~/.cargo/git
~/.cargo/registry
soldb/target
key: ${{ runner.os }}-soldb-cargo-${{ hashFiles('soldb/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-soldb-cargo-
- name: Build SolDB
run: cargo build --bin soldb
working-directory: soldb
- name: Checkout Solidity
if: steps.fetch-solc.outcome != 'success'
uses: actions/checkout@v4
with:
repository: argotorg/solidity
ref: ${{ env.SOLIDITY_REF }}
path: solidity
submodules: recursive
- name: Install Solidity build dependencies
if: steps.fetch-solc.outcome != 'success'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
ccache \
cmake \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-test-dev \
libcln-dev \
ninja-build
- name: Cache Solidity ccache
if: steps.fetch-solc.outcome != 'success'
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ runner.os }}-solidity-ccache-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-solidity-ccache-
- name: Build solc with ETHDebug support
if: steps.fetch-solc.outcome != 'success'
run: |
cmake \
-S solidity \
-B solidity/build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DTESTS=OFF \
-DTOOLS=OFF \
-DPEDANTIC=OFF \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build solidity/build --target solc --parallel 2
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: ${{ env.FOUNDRY_VERSION }}
- name: Show external tool versions
run: |
solidity/build/solc/solc --version
soldb/target/debug/soldb --version
anvil --version
cast --version
- name: Run ETHDebug conformance tests
env:
ETHDEBUG_CONFORMANCE_SOLC: ${{ github.workspace }}/solidity/build/solc/solc
ETHDEBUG_CONFORMANCE_SOLDB: ${{ github.workspace }}/soldb/target/debug/soldb
ETHDEBUG_CONFORMANCE_ANVIL: anvil
ETHDEBUG_CONFORMANCE_CAST: cast
run: yarn --cwd packages/conformance test:external
working-directory: format