Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NodeJS tests in GitHub CI #364

Merged
merged 10 commits into from
Jan 12, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Set up the environment
run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS"
env:
METACALL_INSTALL_OPTIONS: python # nodejs ruby # netcore5 typescript file rpc wasm java c cobol rust rapidjson funchook swig pack # clangformat v8rep51 coverage
METACALL_INSTALL_OPTIONS: python nodejs # ruby # netcore5 typescript file rpc wasm java c cobol rust rapidjson funchook swig pack # clangformat v8rep51 coverage

- name: Configure
run: |
Expand All @@ -47,7 +47,7 @@ jobs:
cd "$METACALL_PATH\build"
cmd.exe /c "powershell ..\tools\metacall-configure.ps1 $Env:METACALL_BUILD_OPTIONS"
env:
METACALL_BUILD_OPTIONS: ${{ matrix.buildtype }} scripts ports tests python # nodejs ruby # netcore5 typescript file rpc wasm java c cobol rust examples dynamic install pack benchmarks # v8 coverage
METACALL_BUILD_OPTIONS: ${{ matrix.buildtype }} scripts ports tests python nodejs # ruby # netcore5 typescript file rpc wasm java c cobol rust examples dynamic install pack benchmarks # v8 coverage

- name: Build
working-directory: ./build
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ ketangupta34 <ketangupta34@gmail.com>
onkardahale <dahaleonkar@gmail.com>
Akshit Garg <garg.akshit@gmail.com>
burnerlee <avi.aviral140@gmail.com>
Praveen Kumar <pkspyder007@gmail.com>
17 changes: 14 additions & 3 deletions tools/metacall-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ function sub-build {

# Prerequisites
$files = @(
"..\runtimes\nodejs\lib\libnode.dll",
"..\runtimes\nodejs\lib\libnode.lib",
"..\runtimes\ruby\bin\x64-vcruntime140-ruby310.dll"
".\runtimes\nodejs\lib\libnode.dll",
".\runtimes\nodejs\lib\libnode.lib",
".\runtimes\ruby\bin\x64-vcruntime140-ruby310.dll",
".\source\loaders\node_loader\bootstrap\acorn",
".\source\loaders\node_loader\bootstrap\acorn.cmd",
".\source\loaders\node_loader\bootstrap\acorn.ps1"
)

ForEach ($file in $files) {
Expand All @@ -68,6 +71,14 @@ function sub-build {
}
}

# copy scripts and node_module for test
$nmPath = ".\source\loaders\node_loader\bootstrap\node_modules"
$scriptsPath = ".\scripts"

robocopy /e "$nmPath" ".\$BUILD_TYPE\node_modules" /NFL /NDL /NJH /NJS /NC /NS /NP
robocopy /e "$scriptsPath" ".\$BUILD_TYPE\scripts" /NFL /NDL /NJH /NJS /NC /NS /NP


ctest "-j$((Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors)" --output-on-failure -C $BUILD_TYPE

if ( -not $? ) {
Expand Down