File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 4141 - name : rust:build-browser
4242 run : |
4343 npm run rust:build-browser
44+ check-warns :
45+ if : github.event.review && (github.event.review.state == 'approved' || contains(github.event.review.body, '/check'))
46+ runs-on : ubuntu-latest
47+ steps :
48+ - uses : actions/checkout@v2
49+ with :
50+ submodules : ' recursive'
51+ - uses : actions/setup-node@v1
52+ with :
53+ node-version : ' 12.18.1'
54+ - name : Cache node modules
55+ uses : actions/cache@v1
56+ with :
57+ path : ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
58+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
59+ restore-keys : |
60+ ${{ runner.os }}-build-${{ env.cache-name }}-
61+ ${{ runner.os }}-build-
62+ ${{ runner.os }}-
63+ - name : prepare-rust
64+ run : |
65+ rustup install stable
66+ rustup target add wasm32-unknown-unknown --toolchain stable
67+ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
68+ - name : rust:check-warnings
69+ run : |
70+ npm run rust:check-warnings
Original file line number Diff line number Diff line change 99 "rust:build-asm" : " (rimraf ./rust/pkg && cd rust; wasm-pack build --target=browser; wasm-pack pack) && npm run asm:build && npm run js:flowgen" ,
1010 "rust:publish" : " cd rust && cargo publish && cd ../" ,
1111 "asm:build" : " ./binaryen/bin/wasm2js ./rust/pkg/cardano_serialization_lib_bg.wasm --output ./rust/pkg/cardano_serialization_lib.asm.js && node ./scripts/wasm-to-asm" ,
12+ "rust:check-warnings" : " (cd rust; RUSTFLAGS=\" -D warnings\" cargo build)" ,
1213 "rust:test" : " (cd rust; cargo test)" ,
1314 "js:flowgen" : " flowgen ./rust/pkg/cardano_serialization_lib.d.ts -o ./rust/pkg/cardano_serialization_lib.js.flow --add-flow-header" ,
1415 "js:prepublish" : " npm run rust:test && rimraf ./publish && cp -r ./rust/pkg ./publish && cp README.md publish/ && cp LICENSE publish/" ,
You can’t perform that action at this time.
0 commit comments