Additional platform-specific tests (#387)

* Additional platform-specific tests

* align casing

* Step rename

* lenIn/lenOut for deno

* Remove install ls

* Run deno tests on full suite

* trigger
This commit is contained in:
Jaco
2022-07-06 12:46:38 +03:00
committed by GitHub
parent 0b838d2055
commit f31ec881ef
31 changed files with 209 additions and 134 deletions
+17 -11
View File
@@ -13,18 +13,24 @@ cd packages
PKG_NAME=wasm-crypto ../scripts/build-wasm.sh
yarn test:wasm-crypto:js
if [ -z "$WITH_DENO" ]; then
yarn test:wasm-crypto:js
else
yarn test:wasm-crypto:deno
fi
echo ""
echo "*** wasm-crypto"
ls -alR wasm-crypto/build
echo ""
echo "*** wasm-crypto-asmjs"
ls -alR wasm-crypto-asmjs/build
echo ""
echo "*** wasm-crypto-wasm"
ls -alR wasm-crypto-wasm/build
# echo ""
# echo "*** wasm-crypto"
# ls -alR wasm-crypto/build
# echo ""
# echo "*** wasm-crypto-asmjs"
# ls -alR wasm-crypto-asmjs/build
# echo ""
# echo "*** wasm-crypto-wasm"
# ls -alR wasm-crypto-wasm/build
cd ..
yarn build:rollup
if [ -z "$WITH_DENO" ]; then
yarn build:rollup
fi
+2 -2
View File
@@ -48,12 +48,12 @@ if [ ! -d "binaryen" ]; then
echo "*** Downloading binaryen"
curl -L $BINARYEN_REPO/releases/download/$BINARYEN_VER/$BINARYEN_ZIP.tar.gz | tar xz
mv binaryen-$BINARYEN_VER binaryen
ls -alR binaryen
# ls -alR binaryen
fi
if [ ! -d "bindgen" ]; then
echo "*** Downloading bindgen"
curl -L $BINDGEN_REPO/releases/download/$BINDGEN_VER/$BINDGEN_ZIP.tar.gz | tar xz
mv $BINDGEN_ZIP bindgen
ls -alR bindgen
# ls -alR bindgen
fi
+5 -5
View File
@@ -19,11 +19,11 @@ fs.writeFileSync(`./${process.env.PKG_NAME}-wasm/build/cjs/bytes.js`, `// Copyri
// Generated as part of the build, do not edit
const sizeCompressed = ${compressed.length};
const sizeUncompressed = ${data.length};
const lenIn = ${compressed.length};
const lenOut = ${data.length};
const bytes = '${compressed.toString('base64')}';
module.exports = { bytes, sizeCompressed, sizeUncompressed };
module.exports = { bytes, lenIn, lenOut };
`);
fs.writeFileSync(`${denoDir}/bytes.js`, `// Copyright 2019-${new Date().getFullYear()} @polkadot/${process.env.PKG_NAME}-wasm authors & contributors
@@ -31,9 +31,9 @@ fs.writeFileSync(`${denoDir}/bytes.js`, `// Copyright 2019-${new Date().getFullY
// Generated as part of the build, do not edit
export const sizeCompressed = ${compressed.length};
export const lenIn = ${compressed.length};
export const sizeUncompressed = ${data.length};
export const lenOut = ${data.length};
export const bytes = '${compressed.toString('base64')}';
`);