Skip to content

Commit 97ef461

Browse files
authored
Merge pull request #309 from paramsiddharth/chore/tests
Created a working test workflow for Linux
2 parents 5f16ca1 + 9398a37 commit 97ef461

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

.github/workflows/test.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_dispatch:
55
pull_request:
66

7+
env:
8+
METACALL_BASE_IMAGE: debian:bullseye-slim
9+
710
jobs:
811
linux-test:
912
name: Linux (Ubuntu) GCC Test
@@ -16,7 +19,22 @@ jobs:
1619

1720
# Revert the NodeJS version in order to use the system one instead (needed due to libnode)
1821
- name: Delete latest version of NodeJS
19-
run: yes | sudo n uninstall
22+
run: |
23+
yes | sudo n uninstall
24+
# Source: https://github.com/tj/n/issues/540#issuecomment-443844202
25+
sudo rm -f "/usr/local/bin/node"
26+
sudo rm -f "/usr/local/bin/npm"
27+
sudo rm -f "/usr/local/bin/npx"
28+
sudo rm -rf "/usr/local/include/node"
29+
sudo rm -rf "/usr/local/lib/dtrace/node.d"
30+
sudo rm -rf "/usr/local/lib/node_modules/npm"
31+
sudo rm -rf "/usr/local/share/doc/node"
32+
sudo rm -rf "/usr/local/share/man/man1/node.1"
33+
sudo rm -rf "/usr/local/share/systemtap/tapset/node.stp"
34+
# Creating a symbolic link to bypass path reference bug
35+
sudo ln -s /usr/bin/node /usr/local/bin/node
36+
sudo ln -s /usr/bin/npm /usr/local/bin/npm
37+
sudo ln -s /usr/bin/npx /usr/local/bin/npx
2038
2139
- name: Set up the environment
2240
run: sudo ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS
@@ -47,3 +65,21 @@ jobs:
4765
DEBIAN_FRONTEND: noninteractive
4866
NODE_PATH: /usr/lib/node_modules
4967
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
68+
69+
- name: Build
70+
run: |
71+
export "METACALL_PATH=$(pwd)"
72+
export "LOADER_LIBRARY_PATH=$METACALL_PATH/build"
73+
export "LOADER_SCRIPT_PATH=$METACALL_PATH/build/scripts"
74+
export "CONFIGURATION_PATH=$METACALL_PATH/build/configurations/global.json"
75+
export "SERIAL_LIBRARY_PATH=$METACALL_PATH/build"
76+
export "DETOUR_LIBRARY_PATH=$METACALL_PATH/build"
77+
export "PORT_LIBRARY_PATH=$METACALL_PATH/build"
78+
cd "$METACALL_PATH/build"
79+
sudo "$METACALL_PATH/tools/metacall-build.sh" $METACALL_BUILD_OPTIONS
80+
env:
81+
METACALL_BUILD_TYPE: debug
82+
METACALL_BUILD_OPTIONS: root python ruby netcore5 nodejs typescript file rpc wasm java c cobol examples tests scripts ports dynamic install pack benchmarks # sanitizer v8 coverage
83+
DEBIAN_FRONTEND: noninteractive
84+
NODE_PATH: /usr/lib/node_modules
85+
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'

0 commit comments

Comments
 (0)