52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: Cli Build Binary
|
|
|
|
env:
|
|
DEBUG: 'napi:*'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build_binary_crate:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'yarn'
|
|
|
|
- name: Install
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: stable-cargo-cache-build-binary
|
|
|
|
- name: 'Install dependencies'
|
|
run: yarn install --mode=skip-build --immutable
|
|
|
|
- name: Build and run binary
|
|
run: |
|
|
yarn workspace binary build
|
|
./examples/binary/napi-examples-binary
|
|
yarn workspace binary build --profile napi-rs-custom
|
|
env:
|
|
RUST_BACKTRACE: 1
|