a781a4f27e
BREAKING CHANGE: requires node >= 16 and some cli options have been renamed
57 lines
1.2 KiB
YAML
57 lines
1.2 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
|
|
check-latest: true
|
|
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
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
|
|
- name: Clear the cargo caches
|
|
run: |
|
|
cargo install cargo-cache --no-default-features --features ci-autoclean
|
|
cargo-cache
|