1717 RESOLC_VERSION : 0.3.0
1818 DLRP_API_KEY : ${{ secrets.DLRP_API_KEY }}
1919 ETHERSCAN_API_KEYS : ${{ secrets.ETHERSCAN_API_KEYS }}
20- ETH_RPC_VERSION : 0.5.0
21- SUBSTRATE_NODE_COMMIT_SHA : f4dba53bfac614b054735aa725d2b0c44efda414
20+ SNAPSHOTS : overwrite
2221
2322jobs :
2423 matrices :
@@ -41,107 +40,11 @@ jobs:
4140 echo "::debug::test-matrix=$output"
4241 echo "test-matrix=$output" >> $GITHUB_OUTPUT
4342
44- cache-binaries :
45- name : cache binaries (${{ matrix.os }})
46- runs-on : ${{ matrix.runner }}
47- timeout-minutes : 120
48- strategy :
49- fail-fast : false
50- matrix :
51- include :
52- - os : ubuntu
53- runner : parity-large-new
54- - os : macos
55- runner : macos-latest
56- - os : windows
57- runner : windows-latest
58- steps :
59- - uses : actions/checkout@v4
60- - uses : dtolnay/rust-toolchain@1.88.0
61-
62- # Check existing caches first
63- - name : Cache substrate-node binary
64- id : cache-substrate
65- uses : actions/cache@v4
66- with :
67- path : polkadot-sdk/target/release/substrate-node${{ matrix.os == 'windows' && '.exe' || '' }}
68- key : substrate-node-${{ matrix.runner }}-${{ env.SUBSTRATE_NODE_COMMIT_SHA }}
69-
70- - name : Cache eth-rpc binary
71- id : cache-ethrpc
72- uses : actions/cache@v4
73- with :
74- path : ~/.cargo/bin/eth-rpc${{ matrix.os == 'windows' && '.exe' || '' }}
75- key : eth-rpc-${{ matrix.runner }}-${{ env.ETH_RPC_VERSION }}
76-
77- # Install dependencies for building
78- - name : Install clang on ubuntu
79- if : matrix.os == 'ubuntu'
80- run : |
81- sudo apt-get update
82- sudo apt-get install -y clang libclang-dev unzip build-essential
83-
84- - name : Install protobuf-compiler
85- uses : arduino/setup-protoc@v3
86- with :
87- repo-token : ${{ secrets.GITHUB_TOKEN }}
88-
89- # macOS-specific setup
90- - name : Install libusb 1.0.27 (macOS)
91- if : matrix.os == 'macos'
92- run : |
93- brew install autoconf automake libtool pkg-config
94- wget https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.tar.bz2
95- tar -xvjf libusb-1.0.27.tar.bz2
96- cd libusb-1.0.27
97- ./configure --prefix=/usr/local
98- make
99- sudo make install
100-
101- - name : Install clang (macOS)
102- if : matrix.os == 'macos'
103- run : |
104- brew install llvm
105- brew link llvm
106- echo "LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config" >> $GITHUB_ENV
107- echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV
108-
109- - name : Install Rust toolchain
110- uses : dtolnay/rust-toolchain@1.88.0
111- with :
112- target : ${{ matrix.target }}, wasm32-unknown-unknown
113- components : rust-src
114-
115- # Build substrate-node (if not cached)
116- - name : Build substrate-node
117- if : steps.cache-substrate.outputs.cache-hit != 'true' && matrix.os == 'ubuntu'
118- run : |
119- git init polkadot-sdk
120- cd polkadot-sdk
121- git remote add origin https://github.com/paritytech/polkadot-sdk
122- git fetch --depth 1 origin ${{ env.SUBSTRATE_NODE_COMMIT_SHA }}
123- git checkout FETCH_HEAD
124- cargo build --release --bin substrate-node
125-
126- # Install eth-rpc proxy (if not cached)
127- - name : Install eth-rpc proxy
128- if : steps.cache-ethrpc.outputs.cache-hit != 'true' && matrix.os == 'ubuntu'
129- run : cargo install pallet-revive-eth-rpc --version ${{ env.ETH_RPC_VERSION }} --locked
130-
131- # Verify binaries exist
132- - name : Verify binaries
133- if : matrix.os == 'ubuntu'
134- run : |
135- echo "=== Substrate binary ==="
136- ls -lh polkadot-sdk/target/release/substrate-node || echo "substrate-node not found"
137- echo "=== eth-rpc binary ==="
138- ls -lh ~/.cargo/bin/eth-rpc || echo "eth-rpc not found"
139-
14043 test :
14144 name : test ${{ matrix.name }}
14245 runs-on : ${{ matrix.runner_label }}
14346 timeout-minutes : 90
144- needs : [matrices, cache-binaries ]
47+ needs : [matrices]
14548 strategy :
14649 fail-fast : false
14750 matrix : ${{ fromJson(needs.matrices.outputs.test-matrix) }}
@@ -151,21 +54,6 @@ jobs:
15154 steps :
15255 - uses : actions/checkout@v4
15356 - uses : taiki-e/install-action@nextest
154-
155- - name : Restore substrate-node binary
156- uses : actions/cache/restore@v4
157- with :
158- path : polkadot-sdk/target/release/substrate-node${{ contains(matrix.runner_label, 'windows') && '.exe' || '' }}
159- key : substrate-node-${{ matrix.runner_label }}-${{ env.SUBSTRATE_NODE_COMMIT_SHA }}
160- fail-on-cache-miss : ${{ contains(matrix.runner_label, 'ubuntu') }}
161-
162- - name : Restore eth-rpc binary
163- uses : actions/cache/restore@v4
164- with :
165- path : ~/.cargo/bin/eth-rpc${{ contains(matrix.runner_label, 'windows') && '.exe' || '' }}
166- key : eth-rpc-${{ matrix.runner_label }}-${{ env.ETH_RPC_VERSION }}
167- fail-on-cache-miss : ${{ contains(matrix.runner_label, 'ubuntu') }}
168-
16957 - name : Install dependencies for building (Ubuntu)
17058 if : contains(matrix.runner_label, 'parity-large-new')
17159 run : |
20795 rvm install ${{ env.RESOLC_VERSION }}
20896 rvm use ${{ env.RESOLC_VERSION }}
20997
210- - name : Add substrate-node to $PATH
211- run : echo "${{github.workspace}}/polkadot-sdk/target/release" >> $GITHUB_PATH
212-
21398 - name : Check Resolc Version
21499 run : resolc --version
215100
0 commit comments