Skip to content

Commit 55cb608

Browse files
committed
refactor: update build scripts and replace deno scripts with node.js for metadata generation, add CI that actually works
- Changed the `metagen` script from Deno to Node.js in `package.json`. - Added new build scripts for `libffi` and `metagen` in `package.json`. - Updated CMakeLists to reflect the change from Deno to Node.js for metadata writing. - Removed obsolete Deno scripts related to `build_libffi` and `metagen`. - Deleted GitHub workflows for npm release and pull requests as part of the cleanup.
1 parent 1d54e67 commit 55cb608

16 files changed

Lines changed: 441 additions & 682 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v5
12+
with:
13+
submodules: 'recursive'
14+
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '24.x'
19+
20+
- name: Install Dependencies
21+
run: npm install
22+
23+
- name: Build libffi
24+
run: npm run build-libffi
25+
26+
- name: Build metadata generator
27+
run: npm run build-metagen
28+
29+
- name: Build NativeScript
30+
run: npm run build

.github/workflows/npm_release.yml

Lines changed: 0 additions & 192 deletions
This file was deleted.

.github/workflows/pull_request.yml

Lines changed: 0 additions & 111 deletions
This file was deleted.

NativeScript/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ if(NOT METADATA_SIZE EQUAL 0)
335335
)
336336

337337
add_custom_command(TARGET ${NAME} POST_BUILD
338-
COMMAND deno run -A ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/write_metadata.ts $<TARGET_FILE:${NAME}> ${METADATA_FILE}
338+
COMMAND node ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/write_metadata.js $<TARGET_FILE:${NAME}> ${METADATA_FILE}
339339
)
340340

341341
add_custom_command(TARGET ${NAME} POST_BUILD

NativeScript/libffi/iphonesimulator-universal/include/ffi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is generated by scripts/build_libffi.ts
1+
// This file is generated by scripts/build_libffi.js
22
// Merged from build_iphonesimulator-arm64/include/ffi.h and build_iphonesimulator-x86_64/include/ffi.h
33

44
#if defined(__aarch64__)
@@ -1070,4 +1070,4 @@ ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
10701070
#else
10711071
#error "Unsupported architecture"
10721072
#endif
1073-
1073+

NativeScript/libffi/iphonesimulator-universal/include/ffitarget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is generated by scripts/build_libffi.ts
1+
// This file is generated by scripts/build_libffi.js
22
// Merged from build_iphonesimulator-arm64/include/ffitarget.h and build_iphonesimulator-x86_64/include/ffitarget.h
33

44
#if defined(__aarch64__)
@@ -269,4 +269,4 @@ typedef enum ffi_abi {
269269
#else
270270
#error "Unsupported architecture"
271271
#endif
272-
272+

NativeScript/libffi/macosx-universal/include/ffi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is generated by scripts/build_libffi.ts
1+
// This file is generated by scripts/build_libffi.js
22
// Merged from build_macosx-arm64/include/ffi.h and build_macosx-x86_64/include/ffi.h
33

44
#if defined(__aarch64__)
@@ -1070,4 +1070,4 @@ ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
10701070
#else
10711071
#error "Unsupported architecture"
10721072
#endif
1073-
1073+

NativeScript/libffi/macosx-universal/include/ffitarget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is generated by scripts/build_libffi.ts
1+
// This file is generated by scripts/build_libffi.js
22
// Merged from build_macosx-arm64/include/ffitarget.h and build_macosx-x86_64/include/ffitarget.h
33

44
#if defined(__aarch64__)
@@ -269,4 +269,4 @@ typedef enum ffi_abi {
269269
#else
270270
#error "Unsupported architecture"
271271
#endif
272-
272+

0 commit comments

Comments
 (0)