problem: ethereum-js requires node >=18 #302
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Vault | |
on: [push, pull_request] | |
jobs: | |
build-native: | |
name: Native (${{ matrix.os }}, ${{ matrix.node }}) | |
strategy: | |
matrix: | |
node: ["electron", "node"] | |
os: [ "windows-latest", "macos-latest", "ubuntu-latest" ] | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18.x" | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install LLVM (windows) | |
run: choco install -y llvm | |
if: runner.os == 'Windows' | |
- name: Install system libs (not windows) | |
run: sudo apt-get install libusb-1.0-0-dev libudev-dev | |
if: runner.os == 'Linux' | |
- name: Install build tools (windows) | |
run: choco install -y visualcpp-build-tools | |
if: runner.os == 'Windows' | |
- name: Install JS dependencies | |
run: yarn install | |
- name: Build Rust lib (windows) | |
run: yarn workspace @emeraldpay/emerald-vault-native run build:rs:${{ matrix.node }} | |
if: runner.os == 'Windows' | |
env: | |
# dynamic linkage may be a problem for Windows users who would need to install some extra DLLs just to make Emerald works | |
# so better to link them statically. | |
RUSTFLAGS: "-C target-feature=+crt-static" | |
RUST_BACKTRACE: "1" | |
- name: Build Rust lib (not windows) | |
run: yarn workspace @emeraldpay/emerald-vault-native run build:rs:${{ matrix.node }} | |
if: runner.os != 'Windows' | |
env: | |
RUST_BACKTRACE: "1" | |
# support macOS High Sierra | |
MACOSX_DEPLOYMENT_TARGET: "10.13" | |
- name: Show lib details | |
run: | | |
node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp reveal --directory packages/native | |
ls packages/native/native | |
- name: Build Typescript | |
run: yarn workspaces run build:ts | |
- name: Test | |
run: yarn workspace @emeraldpay/emerald-vault-native run test:${{ matrix.node }} | |
- name: Clean Before Package | |
run: yarn workspace @emeraldpay/emerald-vault-native run clean:rs | |
if: matrix.node == 'electron' | |
- name: Package | |
run: yarn workspace @emeraldpay/emerald-vault-native run package:${{ matrix.node }} | |
build-core: | |
name: Core | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "18.x" | |
- run: yarn install | |
- run: yarn workspace @emeraldpay/emerald-vault-core run build:ts | |
- name: Test | |
run: yarn workspace @emeraldpay/emerald-vault-core run test |