Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
6ed115e
all changes
birkskyum Jul 31, 2025
3d32eee
cleanup
birkskyum Jul 31, 2025
19f9c16
remove fixup
birkskyum Jul 31, 2025
e29c63e
fixes
birkskyum Jul 31, 2025
9b4f689
cleanup
birkskyum Jul 31, 2025
90ddba9
add vulkan preset
birkskyum Jul 31, 2025
778afc8
add arm64 build guide
birkskyum Jul 31, 2025
4ca3390
move windows presets together
birkskyum Jul 31, 2025
a117488
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 31, 2025
c35dcdf
cleanup windows.cmake
birkskyum Jul 31, 2025
8ad6c8f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 31, 2025
a5f3e11
move build guide eto docs
birkskyum Jul 31, 2025
b4c1dc1
add msvc arm64 runner for opengl/vulkan
birkskyum Jul 31, 2025
5ef11cf
Revert "add msvc arm64 runner for opengl/vulkan"
birkskyum Jul 31, 2025
b951821
update workflow runners
acalcutt Aug 26, 2025
c61c6e1
update NAN to 2.23.0
acalcutt Aug 26, 2025
188d01b
remove excluded abi 137 (node v24)
acalcutt Aug 26, 2025
ac74554
use @acalcutt/node-pre-gyp to support node v24
acalcutt Aug 26, 2025
7853cc5
Update package-lock.json
acalcutt Aug 26, 2025
4e1b26d
Update publish.sh
acalcutt Aug 26, 2025
dca0899
remove cmake specified version
acalcutt Aug 26, 2025
12b7366
add arm64 detection to module.cmake
acalcutt Aug 26, 2025
6a98a8e
add windows-11-arm to workflows
acalcutt Aug 26, 2025
7c6920e
try adding DCMAKE_PREFIX_PATH on arm windows
acalcutt Aug 26, 2025
1ada8b7
test ai fixes
acalcutt Aug 26, 2025
ce8a246
ai test 2
acalcutt Aug 26, 2025
e073936
ai test 3
acalcutt Aug 26, 2025
bcea78f
Revert "try adding DCMAKE_PREFIX_PATH on arm windows"
acalcutt Aug 26, 2025
be5dc11
try to use alternate toolchain for arm64
acalcutt Aug 26, 2025
ba0042b
Revert "try to use alternate toolchain for arm64"
acalcutt Aug 27, 2025
5f57d15
add debug to TRIPLETS
acalcutt Aug 27, 2025
8b78bb7
set arm64 in workflow
acalcutt Aug 27, 2025
d456323
Update node-ci.yml
acalcutt Aug 27, 2025
708597e
Try to install dlfcn-win32 for ARM64
acalcutt Aug 27, 2025
f2a90b5
dlfcn-win32 arm64 fallback
acalcutt Aug 27, 2025
5d9fafe
fix tabs to spaces
acalcutt Aug 27, 2025
a69d762
revert Get-VendorPackages.ps1
acalcutt Aug 27, 2025
a3d77d0
revert windows.cmake
acalcutt Aug 27, 2025
0950de0
set NODE_MODULE_MINIMUM_ABI 115 (node v20)
acalcutt Aug 27, 2025
c7778df
try to fix < 3.10 warning
acalcutt Aug 27, 2025
8296b7a
remove unneeded workflow, try to use ninja again
acalcutt Aug 27, 2025
2e95fd3
try to get test to pass on arm64
acalcutt Aug 27, 2025
326f105
try to simplify msvc dev cmd, test VSCMD_ARG_TGT_ARCH
acalcutt Aug 27, 2025
72795a8
Update node-ci.yml
acalcutt Aug 27, 2025
376035c
try removing 'Setup ARM64 Build Environment'
acalcutt Aug 27, 2025
0ad051d
try removing old workaround
acalcutt Aug 27, 2025
7d61c64
adjust presets
acalcutt Aug 27, 2025
44790ef
try to fix syntax
acalcutt Aug 27, 2025
465745c
try to fix pre-commit
acalcutt Aug 27, 2025
2a503ce
Update actionlint.yaml
acalcutt Aug 27, 2025
6d75077
try to get preset working
acalcutt Aug 27, 2025
6d1d9c1
try to use presets for linux,change windows preset
acalcutt Aug 27, 2025
8f3645e
turn off MLN_WITH_WAYLAND
acalcutt Aug 27, 2025
d9893be
try to turn on MLN_WITH_X11
acalcutt Aug 27, 2025
c158f6c
bump node version to 24
acalcutt Aug 27, 2025
641742b
syntax fix
acalcutt Aug 27, 2025
270a98d
Revert "bump node version to 24"
acalcutt Aug 27, 2025
c400852
Update .nvmrc
acalcutt Aug 27, 2025
914381c
Update README.md
acalcutt Aug 27, 2025
b06f34f
Revert "Update .nvmrc"
acalcutt Aug 27, 2025
058c46c
Update node-ci.yml
acalcutt Aug 27, 2025
c8badb9
Merge branch 'main-3-17' into test-arm-node
acalcutt Aug 31, 2025
2638a4e
try separate windows-node-arm64 preset
acalcutt Aug 31, 2025
0f2a4cf
see if removing hidden make preset found
acalcutt Aug 31, 2025
69a5f67
more workflow fixes
acalcutt Aug 31, 2025
b921f90
try to format preset names better, fix inherits
acalcutt Aug 31, 2025
2f110ee
remove new presets unrelated to node from other PR
acalcutt Aug 31, 2025
432d892
fix preset name
acalcutt Aug 31, 2025
04bd413
Update node-release.yml
acalcutt Aug 31, 2025
4c579bd
fix whitespace
acalcutt Aug 31, 2025
b82b8c0
Update .nvmrc
acalcutt Aug 31, 2025
3a83f6e
re-org presets
acalcutt Aug 31, 2025
19a9745
update test abi version
acalcutt Aug 31, 2025
6ded9f3
test if other compiler is actually needed
acalcutt Aug 31, 2025
797c3f9
update min node version
acalcutt Aug 31, 2025
b5f147e
Revert "test if other compiler is actually needed"
acalcutt Aug 31, 2025
843eaa0
fix: The contents of <stdfloat> are available only with C++23 or later.
acalcutt Aug 31, 2025
5b76216
Update CMakePresets.json
acalcutt Sep 1, 2025
2139247
Update CMakePresets.json
acalcutt Sep 1, 2025
fe71b77
test setting VSCMD_ARG_TGT_ARCH enc in presets
acalcutt Sep 1, 2025
3e6988d
bring node-ci changes to node-release, get rid of VSCMD_ARG_TGT_ARCH …
acalcutt Sep 1, 2025
2e0711b
revert test setting VSCMD_ARG_TGT_ARCH enc in presets
acalcutt Sep 1, 2025
42f2db1
Merge branch 'main' into test-arm-node
acalcutt Sep 1, 2025
9e2aa22
Merge branch 'main-3-17' into test-arm-node
acalcutt Sep 2, 2025
3a90be6
put VSCMD_ARG_TGT_ARCH back into CMakePresets.json
acalcutt Sep 2, 2025
ef2fe63
Bump version and add changelog
acalcutt Sep 2, 2025
8c2e031
Update CHANGELOG.md
acalcutt Sep 2, 2025
e8d8244
adjust ccache keys
acalcutt Sep 2, 2025
ef10925
turn off fail-fast in windows ci
acalcutt Sep 2, 2025
683f5b7
fix fail-fast syntax
acalcutt Sep 2, 2025
90ee6e1
Update windows.cmake
acalcutt Sep 2, 2025
94518e4
Update windows.cmake
acalcutt Sep 2, 2025
d97b296
Update windows.cmake
acalcutt Sep 2, 2025
c3bbb2f
Update windows.cmake
acalcutt Sep 2, 2025
986d714
Revert windows-ci.yml
acalcutt Sep 2, 2025
32956a0
Revert windows.cmake
acalcutt Sep 2, 2025
ba1fc0f
Merge branch 'main' into test-arm-node
acalcutt Sep 2, 2025
24750c5
Merge branch 'main' into test-arm-node
acalcutt Sep 2, 2025
7272840
Merge branch 'main' into test-arm-node
acalcutt Sep 2, 2025
f75ba9f
Merge branch 'main' into test-arm-node
acalcutt Sep 6, 2025
8918ba8
Merge branch 'main' into test-arm-node
acalcutt Sep 8, 2025
789acae
Merge branch 'main' into test-arm-node
acalcutt Sep 11, 2025
01cc694
Merge branch 'main' into test-arm-node
acalcutt Sep 15, 2025
160c883
Merge branch 'main' into test-arm-node
acalcutt Sep 19, 2025
4fb4bba
Merge branch 'main' into test-arm-node
acalcutt Sep 19, 2025
265e9f7
Update platform/node/cmake/module.cmake
acalcutt Sep 20, 2025
73c545d
publish binaries as draft
acalcutt Sep 20, 2025
7fc828a
Update node-release.yml
acalcutt Sep 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels:
- macos-14 # can be removed once actionlint is updated
- ubuntu-24.04 # can be removed once actionlint is updated
- windows-11-arm # can be removed once actionlint is updated
- MapLibre_Native_Ubuntu_22_04_ARM_8_core
- MapLibre_Native_Ubuntu_24_04_x84_16_core
# Configuration variables in array of strings defined in your repository or
Expand Down
102 changes: 56 additions & 46 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,18 @@ jobs:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-22.04
- runs-on: ubuntu-24.04
arch: x86_64
- runs-on: ubuntu-22.04-arm
arch: arm64
- runs-on: macos-14
- runs-on: ubuntu-24.04-arm
arch: arm64
- runs-on: macos-13
arch: x86_64
- runs-on: macos-14
arch: arm64
- runs-on: windows-2022
arch: x86_64
- runs-on: windows-11-arm
arch: arm64
continue-on-error: true
env:
BUILDTYPE: "Release"
Expand Down Expand Up @@ -147,24 +149,21 @@ jobs:
working-directory: platform/node
run: npm ci --ignore-scripts

- name: Set up msvc dev cmd (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Set up msvc dev cmd (Windows x64)
if: runner.os == 'Windows' && matrix.arch == 'x86_64'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1

# Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598
- name: Remove Strawberry Perl from PATH (Windows)
- name: Set up msvc dev cmd (Windows ARM64)
if: runner.os == 'Windows' && matrix.arch == 'arm64'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1
with:
arch: amd64_arm64

- name: Test VSCMD_ARG_TGT_ARCH Environment
if: runner.os == 'Windows'
shell: pwsh
run: |
$env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", ""
"PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Setup cmake
# linux arm not supported https://github.com/jwlawson/actions-setup-cmake/issues/79
if: ${{contains(runner.name, 'GitHub Actions') && matrix.runs-on != 'ubuntu-22.04-arm' }}
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
with:
cmake-version: '3.31'
echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%"
shell: cmd

- name: cmake version
run: |
Expand All @@ -174,22 +173,24 @@ jobs:
if: runner.os == 'MacOS' || runner.os == 'Linux'
uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
with:
key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }}
key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }}
restore-keys: |
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}

- name: Set up ccache (Windows)
if: runner.os == 'Windows'
uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
with:
variant: "sccache"
key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }}
key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }}
restore-keys: |
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}

- name: Cache cmake-node-module deps
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
Expand All @@ -201,18 +202,12 @@ jobs:
- name: Configure maplibre-native (MacOS)
if: runner.os == 'MacOS'
run: |
cmake --preset macos-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}
cmake --preset macos-metal-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}

- name: Configure maplibre-native (Linux)
if: runner.os == 'Linux'
run: |
cmake . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER=gcc-12 \
-DMLN_WITH_NODE=ON \
-DMLN_WITH_OPENGL=ON
cmake --preset linux-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}

- name: Get vcpkg commit id
if: runner.os == 'Windows'
Expand All @@ -228,19 +223,23 @@ jobs:
path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives
key: vcpkg-${{ env.VCPKG_COMMIT_ID }}

- name: Configure maplibre-native (Windows)
if: runner.os == 'Windows'
- name: Configure maplibre-native (Windows x64)
if: runner.os == 'Windows' && matrix.arch == 'x86_64'
shell: pwsh
env:
VCPKG_INSTALL_OPTIONS: "--debug"
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite"
run: |
cmake --preset windows-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}

- name: Configure maplibre-native (Windows arm64)
if: runner.os == 'Windows' && matrix.arch == 'arm64'
shell: pwsh
env:
VCPKG_INSTALL_OPTIONS: "--debug"
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite"
run: |
cmake . -B build `
-G Ninja `
-DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} `
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache `
-DMLN_WITH_NODE=ON `
-DMLN_WITH_OPENGL=ON
cmake --preset windows-arm64-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}

- name: Build maplibre-native (MacOS/Linux)
if: runner.os == 'MacOS' || runner.os == 'Linux'
Expand Down Expand Up @@ -276,18 +275,29 @@ jobs:
working-directory: platform/node
run: npm test

- name: Test (Windows)
if: runner.os == 'Windows'
- name: Test (Windows x64)
if: runner.os == 'Windows' && matrix.arch == 'x86_64'
shell: pwsh
working-directory: platform/node
env:
LIBGL_ALWAYS_SOFTWARE: true
GALLIUM_DRIVER: llvmpipe
run: |
(Invoke-WebRequest https://api.github.com/repos/pal1000/mesa-dist-win/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa3d-.+-release-msvc\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z }
& 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v131 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll
& 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v137 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll
npm test

- name: Test (Windows ARM64)
if: runner.os == 'Windows' && matrix.arch == 'arm64'
shell: pwsh
working-directory: platform/node
env:
LIBGL_ALWAYS_SOFTWARE: true
GALLIUM_DRIVER: llvmpipe
run: |
(Invoke-WebRequest https://api.github.com/repos/mmozeiko/build-mesa/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa-llvmpipe-arm64-.+\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z }
& 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v137 .\mesa3d.7z opengl32.dll libGLESv2.dll
npm test
# On PRs make sure that the npm package can be packaged.
- name: Pack
working-directory: platform/node
Expand Down
118 changes: 60 additions & 58 deletions .github/workflows/node-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,18 @@ jobs:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-22.04
- runs-on: ubuntu-24.04
arch: x86_64
- runs-on: ubuntu-22.04-arm
arch: arm64
- runs-on: macos-14
- runs-on: ubuntu-24.04-arm
arch: arm64
- runs-on: macos-13
arch: x86_64
- runs-on: macos-14
arch: arm64
- runs-on: windows-2022
arch: x86_64
- runs-on: windows-11-arm
arch: arm64
continue-on-error: true
env:
BUILDTYPE: "Release"
Expand All @@ -64,10 +66,13 @@ jobs:
shell: bash

steps:
- if: runner.os == 'Windows'
run: git config --global core.longpaths true

- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
with:
submodules: true
submodules: recursive
persist-credentials: false

- name: Get OS Architecture
Expand Down Expand Up @@ -114,23 +119,21 @@ jobs:
working-directory: platform/node
run: npm ci --ignore-scripts

- name: Set up msvc dev cmd (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Set up msvc dev cmd (Windows x64)
if: runner.os == 'Windows' && matrix.arch == 'x86_64'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1

- name: Set up msvc dev cmd (Windows ARM64)
if: runner.os == 'Windows' && matrix.arch == 'arm64'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1
with:
arch: amd64_arm64

# Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598
- name: Remove Strawberry Perl from PATH (Windows)
- name: Test VSCMD_ARG_TGT_ARCH Environment
if: runner.os == 'Windows'
shell: pwsh
run: |
$env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", ""
"PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Setup cmake
if: ${{contains(runner.name, 'GitHub Actions')}}
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
with:
cmake-version: '3.31'
echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%"
shell: cmd

- name: cmake version
run: |
Expand All @@ -140,22 +143,24 @@ jobs:
if: runner.os == 'MacOS' || runner.os == 'Linux'
uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
with:
key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }}
key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }}
restore-keys: |
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}

- name: Set up ccache (Windows)
if: runner.os == 'Windows'
uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
with:
variant: "sccache"
key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }}
key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }}
restore-keys: |
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}
${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}

- name: Cache cmake-node-module deps
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
Expand All @@ -167,47 +172,44 @@ jobs:
- name: Configure maplibre-native (MacOS)
if: runner.os == 'MacOS'
run: |
cmake --preset macos-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}
cmake --preset macos-metal-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}

- name: Configure maplibre-native (Linux)
if: runner.os == 'Linux'
run: |
cmake . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER=gcc-12 \
-DMLN_WITH_NODE=ON \
-DMLN_WITH_OPENGL=ON

- name: "Create directory '${{ github.workspace }}/platform/windows/vendor/vcpkg/bincache' (Windows)"
cmake --preset linux-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}

- name: Get vcpkg commit id
if: runner.os == 'Windows'
run: mkdir -p ${{ github.workspace }}/platform/windows/vendor/vcpkg/bincache
shell: bash
shell: pwsh
run: |
$vcpkg_commit_id = ($(git submodule status .\platform\windows\vendor\vcpkg).Trim() -split ' ')[0]
Add-Content -Path $env:GITHUB_ENV -Value "VCPKG_COMMIT_ID=${vcpkg_commit_id}"

- name: Restore vcpkg cache (Windows)
- name: Restore vcpkg binary cache
if: runner.os == 'Windows'
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
${{ github.workspace }}/platform/windows/vendor/vcpkg
!${{ github.workspace }}/platform/windows/vendor/vcpkg/buildtrees
!${{ github.workspace }}/platform/windows/vendor/vcpkg/packages
!${{ github.workspace }}/platform/windows/vendor/vcpkg/downloads
!${{ github.workspace }}/platform/windows/vendor/vcpkg/installed
key: |
${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ hashFiles( '.git/modules/platform/windows/vendor/vcpkg/HEAD' ) }}-${{ hashFiles( 'platform/windows/Get-VendorPackages.ps1' ) }}

- name: Configure maplibre-native (Windows)
if: runner.os == 'Windows'
path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives
key: vcpkg-${{ env.VCPKG_COMMIT_ID }}

- name: Configure maplibre-native (Windows x64)
if: runner.os == 'Windows' && matrix.arch == 'x86_64'
shell: pwsh
env:
VCPKG_INSTALL_OPTIONS: "--debug"
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite"
run: |
cmake --preset windows-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}

- name: Configure maplibre-native (Windows arm64)
if: runner.os == 'Windows' && matrix.arch == 'arm64'
shell: pwsh
env:
VCPKG_INSTALL_OPTIONS: "--debug"
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite"
run: |
cmake . -B build `
-G Ninja `
-DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} `
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache `
-DMLN_WITH_NODE=ON \
-DMLN_WITH_OPENGL=ON
cmake --preset windows-arm64-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}

- name: Build maplibre-native (MacOS/Linux)
if: runner.os == 'MacOS' || runner.os == 'Linux'
Expand Down
Loading
Loading