Skip to content
Snippets Groups Projects

Add options to wasm build

Merged Mateusz Tyszczak requested to merge tm-add-options-to-wasm-build into develop
include:
- local: templates/npm_projects.gitlab-ci.yml
.wasm_compare_job_template:
extends: .npm_based_job_base
variables:
# Output directory where should be stored binaries - it should be overrided by derived job
BINARIES_DIR: ""
script:
- |
first_checksum=""
find "${BINARIES_DIR}" -type f -name '*.wasm' | while read -r wasm_file; do
checksum=$(sha256sum "$wasm_file" | awk '{ print $1 }')
if [[ -z "$first_checksum" ]]; then
first_checksum="$checksum"
fi
if [[ "$checksum" != "$first_checksum" ]]; then
echo "Error: Checksum mismatch found for file $wasm_file"
exit 1
fi
done
echo "All .wasm files have the same SHA-256 checksum: $first_checksum"
.wasm_build_job_template:
extends: .npm_based_job_base
variables:
Loading