Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for debug builds of the fuzzer #660

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
4 changes: 2 additions & 2 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ jobs:
run: npm install [email protected]/fuzzer
- name: build and upload prebuilds
run: >
npm run prebuild [email protected]/fuzzer -- ${{ matrix.opts }}
--upload ${{secrets.GITHUB_TOKEN}}
npm run build-native [email protected]/fuzzer -- ${{ matrix.opts
}} --upload ${{secrets.GITHUB_TOKEN}}
18 changes: 12 additions & 6 deletions end-to-end/package-jazzer-js.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/sh
#!/usr/bin/env bash
set -e

cd ..
npm install
npm run build
npm run build --workspace='@jazzer.js/fuzzer'
main() {
cd ..
npm install
npm run build
npm run build --workspace='@jazzer.js/fuzzer'

local tarballs=$(npm pack --workspaces | grep ".tgz")
echo "$tarballs" | sed_version_and_mv
}

sed_version_and_mv() {
while read data; do
Expand All @@ -13,4 +19,4 @@ sed_version_and_mv() {
done
}

npm pack --workspaces | sed_version_and_mv
main
7 changes: 4 additions & 3 deletions packages/fuzzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
"main": "dist/fuzzer.js",
"types": "dist/fuzzer.d.ts",
"scripts": {
"prebuild": "prebuild --runtime napi --backend cmake-js --all --strip --verbose",
"install": "prebuild-install --runtime napi || npm run prebuild",
"build": "cmake-js build --out build",
"build-native": "prebuild --runtime napi --backend cmake-js --all --strip --verbose",
"install": "prebuild-install --runtime napi || npm run build-native",
"build:dev": "cmake-js configure --out build --debug && cmake-js build",
"build": "cmake-js configure --out build && cmake-js build",
"format:fix": "clang-format -i *.cpp shared/*.cpp shared/*.h",
"lint": "find . -path ./build -prune -type f -o -iname '*.h' -o -iname '*.cpp' | xargs clang-tidy"
},
Expand Down
Loading