Skip to content

Commit 09b2c15

Browse files
committed
CI: Don't require a solc-js checkout just to inject the tarball
1 parent feeb5d6 commit 09b2c15

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.circleci/config.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ commands:
131131
- run:
132132
name: "Sanity check: all transitive dependencies successfully replaced with the tarball"
133133
command: |
134-
solc_version=$(jq --raw-output .version solc-js/package.json)
134+
solc_version=$(
135+
tar --extract --to-stdout --file "<<parameters.tarball-path>>" package/package.json |
136+
jq --raw-output .version
137+
)
135138
cd "<<parameters.path>>"
136139
if [[ "<<parameters.package-manager>>" == "pnpm" ]]; then
137140
dependency_version=$(pnpm list --depth Infinity solc | grep "solc" | grep -v "solc ${solc_version}" || true)
@@ -266,11 +269,12 @@ jobs:
266269
- run:
267270
name: Run hardhat-core test suite with latest solc
268271
command: |
269-
HARDHAT_TESTS_SOLC_PATH="${PWD}/solc-js/soljson.js"
270-
HARDHAT_TESTS_SOLC_VERSION=$(jq --raw-output .version solc-js/package.json)
272+
cd hardhat/
273+
HARDHAT_TESTS_SOLC_PATH="${PWD}/node_modules/solc/soljson.js"
274+
HARDHAT_TESTS_SOLC_VERSION=$(jq --raw-output .version node_modules/solc/package.json)
271275
export HARDHAT_TESTS_SOLC_PATH HARDHAT_TESTS_SOLC_VERSION
272276
273-
cd hardhat/packages/hardhat-core
277+
cd packages/hardhat-core/
274278
pnpm install
275279
pnpm test
276280
@@ -300,10 +304,10 @@ jobs:
300304
- run:
301305
name: Configure the boilerplate project to force Hardhat not to use a native binary
302306
command: |
303-
solc_version=$(jq --raw-output .version solc-js/package.json)
304-
305307
cd boilerplate/
306308
309+
solc_version=$(jq --raw-output .version node_modules/solc/package.json)
310+
307311
sed -i 's|pragma solidity [^;]\+;|pragma solidity *;|g' contracts/Token.sol
308312
309313
{
@@ -313,7 +317,7 @@ jobs:
313317
echo "subtask(TASK_COMPILE_SOLIDITY_GET_SOLC_BUILD, async (args, hre, runSuper) => {"
314318
echo " assert(args.solcVersion == '${solc_version}', 'Unexpected solc version: ' + args.solcVersion);"
315319
echo " return {"
316-
echo " compilerPath: '$(realpath "../solc-js/soljson.js")',"
320+
echo " compilerPath: '$(realpath "node_modules/solc/soljson.js")',"
317321
echo " isSolcJs: true,"
318322
echo " version: args.solcVersion,"
319323
echo " longVersion: args.solcVersion"

0 commit comments

Comments
 (0)