napi-rs/.github/workflows/windows-i686.yml
2022-04-01 14:33:34 +08:00

85 lines
2 KiB
YAML

name: Windows i686
env:
DEBUG: 'napi:*'
on:
push:
branches:
- main
pull_request:
jobs:
build_and_test:
name: stable - windows-latest - i686 - node@16
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
check-latest: true
architecture: 'x64'
cache: 'yarn'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-windows-i686-msvc-node@16
- name: 'Install dependencies'
run: |
yarn install --mode=skip-build --immutable
- name: 'Build TypeScript'
run: yarn build
- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: i686-pc-windows-msvc
- name: Cache cargo
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: stable-windows-i686-node@lts-cargo-registry
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: stable-windows-i686-node@lts-cargo-index
- name: Check build
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests --target i686-pc-windows-msvc -vvv
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
check-latest: true
architecture: 'x86'
- name: Build Tests
run: |
yarn workspace compat-mode-examples build-i686 --release
yarn workspace examples build-i686 --release
yarn test --verbose
env:
RUST_BACKTRACE: 1
- name: Clear the cargo caches
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache