Build - Win - Arm64 #14
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: Build - Win - Arm64 | |
on: | |
workflow_dispatch: | |
# push: | |
# tags: | |
# - v* | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
jobs: | |
build-windows-arm64: | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Set Up MSVC for ARM64 Cross Compilation | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64_arm64 # Sets up cross-compilation from x64 to ARM64 | |
- name: install vcpkg | |
run: | | |
git submodule update --init --recursive vcpkg | |
.\vcpkg\bootstrap-vcpkg.bat | |
shell: cmd | |
- name: Install npm | |
run: | | |
npm install --ignore-scripts | |
- name: Build | |
run: | | |
node_modules/.bin/prebuild -r napi --backend cmake-js --arch arm64 --upload -u ${{ secrets.GITHUB_TOKEN }} | |
env: | |
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | |
VCPKG_TARGET_TRIPLET: arm64-windows-static | |
CI: true |