Skip to content

Commit f5eba67

Browse files
committed
Add github actions.
Disable check sign off first. IoT.js-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
1 parent 615856f commit f5eba67

16 files changed

+173
-157
lines changed

.github/workflows/gh-actions.yml

+108-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,111 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- run: echo "Empty action"
13+
- run: OPTS="host-linux" $RUNNER
14+
15+
"Mock_Linux_Build_and_Correctness_Tests":
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- run: OPTS="mock-linux" $RUNNER
20+
21+
"Linux-x86-64_Build_with_N-API_support_and_Correctness_Tests":
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- run: OPTS="n-api" $RUNNER
26+
27+
"Linux-x86-64_Build_with_N-API_ES_2015_support_and_Correctness_Tests":
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- run: OPTS="n-api-es2015-subset" $RUNNER
32+
33+
"Raspberry_Pi_2_Build_Test":
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
- run: OPTS="rpi2" $RUNNER
38+
39+
"STM32f4_Discovery_with_Nuttx_Build_Test":
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v2
43+
- run: OPTS="stm32f4dis" $RUNNER
44+
45+
"Tizen_Build_Test":
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v2
49+
- run: OPTS="tizen" $RUNNER
50+
51+
"ECMAScript_2015_features_Build_and_Correctness_Tests":
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v2
55+
- run: OPTS="es2015" $RUNNER
56+
57+
"External_modules_Build_and_Correctness_Tests":
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v2
61+
- run: OPTS="external-modules" $RUNNER
62+
63+
"Linux-x86-64_without_snapshot_Build_and_Correctness_Tests":
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v2
67+
- run: OPTS="no-snapshot" $RUNNER
68+
69+
"Misc_checks_style_checker":
70+
runs-on: ubuntu-18.04
71+
steps:
72+
- uses: actions/checkout@v2
73+
- run: sudo apt update
74+
- run: sudo apt install -y npm valgrind clang-format-3.9
75+
- run: npm install eslint
76+
- run: OPTS="misc" $RUNNER
77+
78+
"OSX-x86-64_Build_and_Correctness_Tests":
79+
runs-on: macos-latest
80+
steps:
81+
- uses: actions/checkout@v2
82+
- run: OPTS="host-darwin" $RUNNER
83+
84+
"ASAN_Tests":
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: actions/checkout@v2
88+
- run: OPTS="asan" $RUNNER
89+
90+
"UBSAN_Tests":
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@v2
94+
- run: OPTS="ubsan" $RUNNER
95+
96+
"Win":
97+
runs-on: windows-latest
98+
strategy:
99+
matrix:
100+
include:
101+
- configuration: Debug
102+
sys_arch: x86_64
103+
- configuration: Release
104+
sys_arch: x86_64
105+
- configuration: Debug
106+
sys_arch: i686
107+
- configuration: Release
108+
sys_arch: i686
109+
env:
110+
CONFIGURATION: ${{ matrix.configuration }}
111+
SYS_ARCH: ${{ matrix.sys_arch }}
112+
JERRY_PROFILE: es.next
113+
steps:
114+
- run: |
115+
git config --global core.autocrlf false
116+
git config --global core.eol lf
117+
- uses: actions/checkout@v2
118+
- run: npm install
119+
- run: python tools\build.py "--cmake-param=-GVisual Studio 16 2019" --experimental --buildtype=${{ matrix.configuration }} --target-arch=${{ matrix.sys_arch }} --jerry-profile=$env:JERRY_PROFILE --n-api
120+
- run: python tools\testrunner.py build\$env:SYS_ARCH-windows\$env:CONFIGURATION\bin\$env:CONFIGURATION\iotjs.exe

.travis.yml

-100
This file was deleted.

appveyor.yml

-43
This file was deleted.

cmake/config/arm-linux.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l)
1717

1818
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
1919
set(CMAKE_C_COMPILER_WORKS TRUE)
20+
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
21+
set(CMAKE_CXX_COMPILER_WORKS TRUE)

cmake/config/arm-nuttx.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l)
1717

1818
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
1919
set(CMAKE_C_COMPILER_WORKS TRUE)
20+
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
21+
set(CMAKE_CXX_COMPILER_WORKS TRUE)

cmake/config/arm-tizen.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ endif()
2828
if("${CMAKE_C_COMPILER}" STREQUAL "")
2929
set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc)
3030
endif()
31+
32+
if("${CMAKE_CXX_COMPILER}" STREQUAL "")
33+
set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++)
34+
endif()

cmake/config/arm-tizenrt.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l)
1717

1818
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
1919
set(CMAKE_C_COMPILER_WORKS TRUE)
20+
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
21+
set(CMAKE_CXX_COMPILER_WORKS TRUE)

cmake/config/i686-windows.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ set(CMAKE_SYSTEM_NAME Windows)
1616
set(CMAKE_SYSTEM_PROCESSOR i686)
1717

1818
set(CMAKE_C_COMPILER CL.exe)
19-
set(CMAKE_C_COMPILER_WORKS TRUE)
19+
set(CMAKE_CXX_COMPILER CL.exe)

cmake/config/mips-openwrt.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ set(CMAKE_SYSTEM_PROCESSOR mips)
1818
set(CMAKE_C_COMPILER mips-openwrt-linux-gcc)
1919
set(CMAKE_C_COMPILER_WORKS TRUE)
2020

21+
set(CMAKE_CXX_COMPILER mips-openwrt-linux-g++)
22+
set(CMAKE_CXX_COMPILER_WORKS TRUE)

cmake/config/x86_64-windows.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ set(CMAKE_SYSTEM_NAME Windows)
1616
set(CMAKE_SYSTEM_PROCESSOR x64)
1717

1818
set(CMAKE_C_COMPILER CL.exe)
19-
set(CMAKE_C_COMPILER_WORKS TRUE)
19+
set(CMAKE_CXX_COMPILER CL.exe)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"eslint": "^4.7.2"
1212
},
1313
"dependencies": {
14-
"node-gyp": "^3.8.0"
14+
"node-gyp": "^7.1.2"
1515
}
1616
}

tools/build.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,10 @@ def build_cmake_args(options):
292292
if options.target_os == 'tizenrt':
293293
include_dirs.append('%s/../framework/include/iotbus' % options.sysroot)
294294
elif options.target_os == 'windows':
295-
cmake_args.append("-GVisual Studio 15 2017")
296295
if options.target_arch == "x86_64":
297296
cmake_args.append("-Ax64")
297+
elif options.target_arch == "i686":
298+
cmake_args.append("-AWin32")
298299

299300
include_dirs.extend(options.external_include_dir)
300301
cmake_args.append("-DEXTERNAL_INCLUDE_DIR='%s'" % (' '.join(include_dirs)))
@@ -398,7 +399,7 @@ def build_iotjs(options):
398399
ex.check_run_cmd('cmake', cmake_opt)
399400

400401
if options.target_os == 'windows':
401-
print("\nPlease open the iot.js solution file in Visual Studio!")
402+
ex.check_run_cmd('cmake', ['--build', options.build_root, '--config', options.buildtype])
402403
else:
403404
run_make(options, options.build_root)
404405

tools/check_tidy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def parse_option():
4444

4545
class StyleChecker(object):
4646

47-
column_limit = 80
47+
column_limit = 100
4848

4949
def __init__(self):
5050
self.count_lines = 0

tools/testrunner.py

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
from common_py.system.executor import Terminal
3939
from common_py.system.sys_platform import Platform
4040

41+
import util
42+
4143
# Defines the folder that will contain the coverage info.
4244
# The path must be consistent with the measure_coverage.sh script.
4345
JS_COVERAGE_FOLDER = fs.join(path.PROJECT_ROOT, '.coverage_output')
@@ -345,6 +347,7 @@ def get_args():
345347

346348

347349
def main():
350+
util.setup_stdio()
348351
options = get_args()
349352

350353
testrunner = TestRunner(options)

0 commit comments

Comments
 (0)