Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .devcontainer
Submodule .devcontainer added at 57229e
2 changes: 1 addition & 1 deletion .github/workflows/ci-win.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Node.js CI Windows Platform

on: [push, pull_request]
on: [workflow_dispatch]

env:
PYTHON_VERSION: '3.11'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Node.js CI Unix Platform

on: [push, pull_request]
on: [workflow_dispatch]

env:
PYTHON_VERSION: '3.11'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]
on: [workflow_dispatch]

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Style Checks

on: [push, pull_request]
on: [workflow_dispatch]

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-api-headers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Node.js CI with node-api-headers

on: [push, pull_request]
on: [workflow_dispatch]

env:
PYTHON_VERSION: '3.11'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: "Close stale issues"
on:
schedule:
- cron: "0 0 * * *"
on: [workflow_dispatch]

permissions:
contents: read
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/xpbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
workflow_dispatch:
jobs:
linux:
uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1
with:
cmake-workflow-preset: LinuxRelease
runon: ubuntu-latest
secrets: inherit
linux-arm64:
uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1
with:
cmake-workflow-preset: LinuxRelease
runon: ubuntu-24.04-arm
secrets: inherit
macos:
uses: externpro/externpro/.github/workflows/build-macos.yml@25.05.1
with:
cmake-workflow-preset: DarwinRelease
secrets: inherit
windows:
uses: externpro/externpro/.github/workflows/build-windows.yml@25.05.1
with:
cmake-workflow-preset: WindowsRelease
secrets: inherit
20 changes: 20 additions & 0 deletions .github/workflows/xprelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release
on:
workflow_dispatch:
inputs:
workflow_run_url:
description: 'URL of the workflow run containing artifacts to upload (e.g., https://github.com/owner/repo/actions/runs/123456789)'
required: true
type: string
jobs:
# Upload build artifacts as release assets
release-from-build:
uses: externpro/externpro/.github/workflows/release-from-build.yml@25.05.1
with:
workflow_run_url: ${{ github.event.inputs.workflow_run_url }}
artifact_pattern: "*.tar.xz"
permissions:
contents: write
id-token: write
attestations: write
secrets: inherit
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
/test/require_basic_finalizers/addons
/.vscode

# externpro
.env
_bld*/
docker-compose.override.yml

# ignore node-gyp generated files outside its build directory
/test/*.Makefile
/test/*.mk
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".devcontainer"]
path = .devcontainer
url = https://github.com/externpro/externpro
28 changes: 28 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.31)
set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake)
project(node-addon-api VERSION 8.5.0)
include(xpflags)
include(GNUInstallDirs)
set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) # xpPackageDevel
set(XP_NAMESPACE xpro)
set(targetsFile ${PROJECT_NAME}-targets)
set(lib_name ${PROJECT_NAME})
xpFindPkg(PKGS nodexp)
xpPackageDevel(TARGETS_FILE ${targetsFile} DEPS nodexp LIBRARIES ${XP_NAMESPACE}::${lib_name})
########################################
set(libsrcs
napi-inl.deprecated.h
napi-inl.h
napi.h
)
########################################
add_library(${lib_name} INTERFACE ${libsrcs})
target_include_directories(${lib_name} INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_compile_definitions(${lib_name} INTERFACE NODE_ADDON_API_DISABLE_DEPRECATED NAPI_CPP_EXCEPTIONS)
target_link_libraries(${lib_name} INTERFACE ${XP_NAMESPACE}::node)
########################################
install(TARGETS ${lib_name} EXPORT ${targetsFile})
install(FILES ${libsrcs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} NAMESPACE ${XP_NAMESPACE}::)
install(FILES CHANGELOG.md LICENSE.md README.md DESTINATION ${CMAKE_INSTALL_DATADIR})
install(DIRECTORY doc DESTINATION ${CMAKE_INSTALL_DATADIR})
8 changes: 8 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": 8,
"include": [
".devcontainer/cmake/presets/xpLinuxNinja.json",
".devcontainer/cmake/presets/xpDarwinNinja.json",
".devcontainer/cmake/presets/xpWindowsVs2022.json"
]
}
10 changes: 10 additions & 0 deletions CMakePresetsBase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": 8,
"configurePresets": [
{
"name": "config-base",
"hidden": true,
"binaryDir": "${sourceDir}/_bld-${presetName}"
}
]
}
1 change: 1 addition & 0 deletions docker-compose.sh
1 change: 1 addition & 0 deletions docker-compose.yml