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

73 lines
1.8 KiB
YAML
Raw Normal View History

name: Windows arm64
env:
DEBUG: 'napi:*'
on:
push:
branches:
- main
pull_request:
jobs:
build_and_test:
2021-11-19 15:58:21 +09:00
name: stable - windows-latest - arm64 - node@16
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
2021-11-19 15:58:21 +09:00
node-version: 16
check-latest: true
cache: 'yarn'
- name: 'Install dependencies'
run: yarn install --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
- name: 'Build TypeScript'
run: yarn build
- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install arm64 toolchain
run: rustup target add aarch64-pc-windows-msvc
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- name: Cache cargo registry
2021-07-30 14:20:40 +09:00
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: stable-windows-arm64-node@lts-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
2021-07-30 14:20:40 +09:00
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: stable-windows-arm64-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 aarch64-pc-windows-msvc -vvv
- name: Build release target
run: cargo build --release --target aarch64-pc-windows-msvc
- name: Clear the cargo caches
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache