napi-rs/.github/workflows/windows-i686.yml

85 lines
2.1 KiB
YAML
Raw Normal View History

name: Windows i686
env:
DEBUG: 'napi:*'
on:
push:
branches: [master, develop]
pull_request:
jobs:
build_and_test:
name: stable - windows-latest - i686 - node@14
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
2020-11-10 12:09:25 +09:00
run: choco install nodejs-lts --x86 -y --force
- name: Set 32bit NodeJS path
run: |
echo "C:\\Program Files (x86)\\nodejs" >> $GITHUB_PATH
shell: bash
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
2020-11-10 12:09:25 +09:00
path: node_modules
key: npm-cache-windows-i686-node@lts-${{ hashFiles('yarn.lock') }}
restore-keys: |
npm-cache-
2020-11-10 12:09:25 +09:00
- name: 'Install dependencies'
run: yarn install --frozen-lockfile --registry https://registry.npmjs.org
2020-11-10 12:09:25 +09:00
- name: 'Build TypeScript'
run: yarn build
- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install i686 toolchain
run: rustup target add i686-pc-windows-msvc
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
2020-11-10 12:09:25 +09:00
key: stable-windows-i686-node@lts-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
2020-11-10 12:09:25 +09:00
key: stable-windows-i686-node@lts-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Check build
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests --target i686-pc-windows-msvc -vvv
2020-11-10 12:09:25 +09:00
- name: Build Tests
run: |
yarn --cwd ./test_module build-i686
yarn test
env:
RUST_BACKTRACE: 1
- name: Clear the cargo caches
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache