@@ -17,8 +17,6 @@ workflows:
1717 - node-current :
1818 run_coveralls : true
1919 - build-package
20- - hardhat-core-default-solc : *requires_package
21- - hardhat-core-latest-solc : *requires_package
2220 - hardhat-sample-project : *requires_package
2321 - cli-smoke-test : *requires_package
2422 - solidity-solcjs-ext-test
@@ -35,8 +33,6 @@ workflows:
3533 jobs :
3634 - node-current
3735 - build-package
38- - hardhat-core-default-solc : *requires_package
39- - hardhat-core-latest-solc : *requires_package
4036 - hardhat-sample-project : *requires_package
4137 - cli-smoke-test : *requires_package
4238 - solidity-solcjs-ext-test
@@ -56,12 +52,6 @@ commands:
5652 yarn --version
5753 pnpm version || >&2 echo "pnpm not installed"
5854
59- install-pnpm :
60- steps :
61- - run :
62- name : Install pnpm
63- command : sudo npm install -g pnpm
64-
6555 install-dependencies :
6656 parameters :
6757 cache-id :
@@ -164,25 +154,11 @@ commands:
164154 --fail \
165155 --show-error \
166156 "${EXTRA_HEADERS[@]}" \
167- https://api.github.com/repos/nomiclabs/hardhat/releases/latest \
168- | jq --raw-output .tag_name \
157+ https://api.github.com/repos/nomiclabs/hardhat/releases \
158+ | jq --raw-output 'map(select( .tag_name | test("^hardhat@"))) | .[0].tag_name' \
169159 )
170160 echo "export HARDHAT_LATEST_RELEASE_TAG='${HARDHAT_LATEST_RELEASE_TAG}'" >> "$BASH_ENV"
171161
172- provision-hardhat-with-packaged-solcjs :
173- description : " Clones Hardhat repository and configures it to use a local clone of solc-js."
174- steps :
175- - fetch-latest-hardhat-release-tag
176- - run : git clone --depth 1 https://github.com/nomiclabs/hardhat.git --branch "$HARDHAT_LATEST_RELEASE_TAG" hardhat/
177- - install-dependencies :
178- cache-id : hardhat
179- path : hardhat
180- package-manager : pnpm
181- dependency-file : pnpm-lock.yaml
182- - inject-solc-js-tarball :
183- path : hardhat/
184- package-manager : pnpm
185-
186162jobs :
187163 node-base : &node-base
188164 working_directory : ~/solc-js
@@ -261,67 +237,6 @@ jobs:
261237 - store_artifacts :
262238 path : artifacts/
263239
264- hardhat-core-default-solc :
265- # Runs out of memory on 'medium'.
266- resource_class : medium+
267- environment :
268- NODE_OPTIONS : " --max-old-space-size=4096"
269- docker :
270- - image : cimg/rust:1.74.0-node
271- steps :
272- - install-pnpm
273- - show-npm-version
274- - attach_workspace :
275- at : workspace
276- - provision-hardhat-with-packaged-solcjs
277- - run :
278- name : Restore the default solc binary expected by Hardhat
279- command : |
280- # Hardhat downloader tests are hard-coded to expect the version that comes with the solc-js.
281- # We forced latest solc-js but we still want the default binary with it.
282- hardhat_default_solc_version=$(jq --raw-output '.dependencies.solc' hardhat/packages/hardhat-core/package.json)
283- mkdir hardhat-default-solc/
284- pushd hardhat-default-solc/
285- pnpm install --node-linker=hoisted "solc@${hardhat_default_solc_version}"
286- popd
287- ln -sf ../../../hardhat-default-solc/node_modules/solc/soljson.js hardhat/node_modules/solc/soljson.js
288- - run :
289- name : Run hardhat-core test suite with its default solc binary
290- command : |
291- cd hardhat/packages/hardhat-core
292- # The install command is required again here to create the correct symlinks under the hardhat-core/node_modules
293- # In our case that is something like: solc -> ../../../node_modules/.pnpm/file+..+solc-js.tgz/node_modules/solc
294- # See: https://pnpm.io/symlinked-node-modules-structure
295- pnpm install --no-frozen-lockfile
296- # TODO: temporarily set hardhat stack traces tests to use cancun hardfork
297- # Remove this when hardhat switch to cancun by default: https://github.com/NomicFoundation/hardhat/issues/4851
298- sed -i 's/hardfork: "shanghai",/hardfork: "cancun",/' test/internal/hardhat-network/stack-traces/execution.ts
299- pnpm test
300-
301- hardhat-core-latest-solc :
302- docker :
303- - image : cimg/rust:1.74.0-node
304- steps :
305- - install-pnpm
306- - show-npm-version
307- - attach_workspace :
308- at : workspace
309- - provision-hardhat-with-packaged-solcjs
310- - run :
311- name : Run hardhat-core test suite with latest solc
312- command : |
313- cd hardhat/
314- HARDHAT_TESTS_SOLC_PATH="${PWD}/node_modules/solc/soljson.js"
315- HARDHAT_TESTS_SOLC_VERSION=$(jq --raw-output .version node_modules/solc/package.json)
316- export HARDHAT_TESTS_SOLC_PATH HARDHAT_TESTS_SOLC_VERSION
317-
318- cd packages/hardhat-core/
319- pnpm install --no-frozen-lockfile
320- # TODO: temporarily set hardhat stack traces tests to use cancun hardfork
321- # Remove this when hardhat switch to cancun by default: https://github.com/NomicFoundation/hardhat/issues/4851
322- sed -i 's/hardfork: "shanghai",/hardfork: "cancun",/' test/internal/hardhat-network/stack-traces/execution.ts
323- pnpm test
324-
325240 hardhat-sample-project :
326241 docker :
327242 - image : cimg/node:current
0 commit comments