d2d30df420
We introduce setup_stdio function to setup stdout/stderr properly. For python <-> python pipe, we always use 'utf8'/'ignore' encoding for not lost characters. For tty <-> python, we using native encoding with xmlcharrefreplace to encode, to preserve maximal information. For python <-> native program, we use naive encoding with 'ignore' to not cause error update_exclude_list with binary mode so that on win32 would not generate \r\n run-test-suite.py: Handling skiplist properly on win32 Fixes #4854 Fixes test262-harness.py complain cannot use a string pattern on a bytes-like object with running test262 with python3 For reading/writing to file, we use 'utf8' /'ignore' encoding for not lost characters. For decoding from process stdout, using native encoding with decoding error ignored for not lost data. Execute commands also ignore errors Fixes #4853 Fixes running test262-esnext failed with installed python3.9 on win32 with space in path Fixes #4852 support both / \ in --test262-test-list arg On win32. python tools/run-tests.py --test262-es2015=update --test262-test-list=built-ins/decodeURI/ python tools/run-tests.py --test262-es2015=update --test262-test-list=built-ins\decodeURI\ should be both valid, currently only --test262-test-list=built-ins\decodeURI\ are valid. Support snapshot-tests-skiplist.txt on win32 by use os.path.normpath Guard run-tests.py with timer. All run-tests.py are finished in 30 minutes in normal situation. May change the timeout by command line option Move Windows CI to github actions Define TERM colors for win32 properly flush stderr.write stdout.write On CI, the stderr are redirect to stdout, and if we don't flush stderr and stdout, The output from stderr/stdout would out of sync. `Testing new Date(-8640000000000000) and fixes date for win32` So that the CI can passed if sys.version_info.major >= 3: remove, as we do not support python2 anymore Fixes compiling warnings/errors for mingw/gcc JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
402 lines
14 KiB
YAML
402 lines
14 KiB
YAML
name: JerryScript CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
RUNNER: tools/run-tests.py
|
|
|
|
jobs:
|
|
Checks:
|
|
runs-on: ubuntu-22.04 # needed for checker version stability
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.10'
|
|
- run: sudo apt update
|
|
- run: sudo apt install pylint doxygen cppcheck clang-format-15
|
|
- run: $RUNNER --check-signed-off=gh-actions
|
|
if: ${{ always() }}
|
|
- run: $RUNNER --check-doxygen
|
|
if: ${{ always() }}
|
|
- run: $RUNNER --check-format
|
|
if: ${{ always() }}
|
|
- run: $RUNNER --check-license
|
|
if: ${{ always() }}
|
|
- run: $RUNNER --check-strings
|
|
if: ${{ always() }}
|
|
- run: $RUNNER --check-pylint
|
|
if: ${{ always() }}
|
|
- run: $RUNNER --check-cppcheck
|
|
if: ${{ always() }}
|
|
|
|
Linux_x86-64_Build_Correctness_Debugger_Tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: $RUNNER -q --jerry-tests
|
|
- run: $RUNNER -q --jerry-tests --build-debug
|
|
- run: $RUNNER -q --jerry-debugger
|
|
- run: $RUNNER -q --jerry-debugger --build-debug
|
|
|
|
Linux_x86_cpointer-32bit_Build_Correctness_Tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-multilib
|
|
- run: $RUNNER -q --jerry-tests --buildoptions=--compile-flag=-m32,--cpointer-32bit=on
|
|
- run: $RUNNER -q --jerry-tests --buildoptions=--compile-flag=-m32,--cpointer-32bit=on --build-debug
|
|
|
|
Win_x86-64_Conformance_Tests_ESNext:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: python $env:RUNNER --test262 update
|
|
|
|
Win_x86-64_Conformance_Tests_ESNext_Debug:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: python $env:RUNNER --test262 update --build-debug
|
|
|
|
Win_x86-64_Tests-MINGW:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
update: true
|
|
install: >-
|
|
mingw-w64-x86_64-python
|
|
mingw-w64-x86_64-cmake
|
|
mingw-w64-x86_64-make
|
|
mingw-w64-x86_64-toolchain
|
|
- run: python $RUNNER -q --jerry-tests
|
|
- run: python $RUNNER -q --unittests --build-config=''
|
|
# FIXME: enable it with upgrade valgrind - run: python $RUNNER -q --buildoption-test
|
|
|
|
Win_x86-64_Tests:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: python $env:RUNNER -q --jerry-tests
|
|
- run: python $env:RUNNER -q --unittests
|
|
- run: python $env:RUNNER -q --buildoption-test
|
|
|
|
Win_x86-64_Tests_Debug:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: python $env:RUNNER -q --jerry-tests --build-debug
|
|
- run: python $env:RUNNER -q --unittests --build-debug
|
|
- run: python $env:RUNNER -q --buildoption-test --build-debug
|
|
|
|
OSX_x86-64_Build_Correctness_Unit_Tests:
|
|
runs-on: macos-13
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: $RUNNER -q --jerry-tests
|
|
- run: $RUNNER -q --unittests
|
|
|
|
OSX_x86-64_Build_Correctness_Unit_Tests_Debug:
|
|
runs-on: macos-13
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: $RUNNER -q --jerry-tests --build-debug
|
|
- run: $RUNNER -q --unittests --build-debug
|
|
|
|
Linux_x86-64_Build_Option_Tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-multilib
|
|
- run: $RUNNER --buildoption-test
|
|
|
|
Conformance_Tests_ESNext:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: $RUNNER --test262 update
|
|
- uses: actions/upload-artifact@v4
|
|
if: success() || failure()
|
|
with:
|
|
name: Test262-ESNext-results
|
|
path: |
|
|
build/tests/test262_tests_esnext/local/bin/test262.report
|
|
|
|
Conformance_Tests_ESNext_Debug_A:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: $RUNNER --test262 update --build-debug --test262-test-list=built-ins,annexB,harness,intl402
|
|
- uses: actions/upload-artifact@v4
|
|
if: success() || failure()
|
|
with:
|
|
name: Test262-ESNext-Debug-A-results
|
|
path: |
|
|
build/tests/test262_tests_esnext-debug/local/bin/test262.report
|
|
|
|
Conformance_Tests_ESNext_Debug_B:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: $RUNNER --test262 update --build-debug --test262-test-list=language
|
|
- uses: actions/upload-artifact@v4
|
|
if: success() || failure()
|
|
with:
|
|
name: Test262-ESNext-Debug-B-results
|
|
path: |
|
|
build/tests/test262_tests_esnext-debug/local/bin/test262.report
|
|
|
|
Unit_Tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: $RUNNER -q --unittests
|
|
- run: $RUNNER -q --unittests --build-debug
|
|
|
|
Clang_Unit_Build_Option_Tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CC: clang
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-multilib
|
|
- run: $RUNNER -q --unittests
|
|
# clang has bug in supporting lto
|
|
- run: $RUNNER -q --buildoption-test --buildoptions=--lto=off
|
|
|
|
ASAN_Tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ASAN_OPTIONS: detect_stack_use_after_return=1:check_initialization_order=true:strict_init_order=true
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-multilib
|
|
- run: >-
|
|
$RUNNER -q --jerry-tests
|
|
--buildoptions=--stack-limit=0,--compile-flag=-fsanitize=address,--compile-flag=-m32,--compile-flag=-fno-omit-frame-pointer,--compile-flag=-fno-common,--compile-flag=-O2,--debug,--system-allocator=on,--linker-flag=-fuse-ld=gold
|
|
--skip-list=parser-oom.js,parser-oom2.js,stack-limit.js,regression-test-issue-4870.js,regression-test-issue-4901.js,regression-test-issue-4848.js,regression-test-issue-4890.js,regression-test-issue-2190.js,regression-test-issue-2258-2963.js,regression-test-issue-2448.js,regression-test-issue-2905.js,regression-test-issue-3785.js,proxy-evil-recursion.js,regression-test-issue-5101.js
|
|
|
|
ASAN_Tests_Debug:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ASAN_OPTIONS: detect_stack_use_after_return=1:check_initialization_order=true:strict_init_order=true
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-multilib
|
|
- run: >-
|
|
$RUNNER -q --jerry-tests --build-debug
|
|
--buildoptions=--stack-limit=0,--compile-flag=-fsanitize=address,--compile-flag=-m32,--compile-flag=-fno-omit-frame-pointer,--compile-flag=-fno-common,--compile-flag=-O2,--debug,--system-allocator=on,--linker-flag=-fuse-ld=gold
|
|
--skip-list=parser-oom.js,parser-oom2.js,stack-limit.js,regression-test-issue-4870.js,regression-test-issue-4901.js,regression-test-issue-4848.js,regression-test-issue-4890.js,regression-test-issue-2190.js,regression-test-issue-2258-2963.js,regression-test-issue-2448.js,regression-test-issue-2905.js,regression-test-issue-3785.js,proxy-evil-recursion.js,regression-test-issue-5101.js
|
|
|
|
UBSAN_Tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
UBSAN_OPTIONS: print_stacktrace=1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-multilib
|
|
- run: >-
|
|
$RUNNER -q --jerry-tests
|
|
--buildoptions=--compile-flag=-fsanitize=undefined,--compile-flag=-m32,--compile-flag=-fno-omit-frame-pointer,--compile-flag=-fno-common,--debug,--system-allocator=on,--linker-flag=-fuse-ld=gold
|
|
--skip-list=parser-oom.js,parser-oom2.js
|
|
- run: >-
|
|
$RUNNER -q --jerry-tests --build-debug
|
|
--buildoptions=--compile-flag=-fsanitize=undefined,--compile-flag=-m32,--compile-flag=-fno-omit-frame-pointer,--compile-flag=-fno-common,--debug,--system-allocator=on,--linker-flag=-fuse-ld=gold
|
|
--skip-list=parser-oom.js,parser-oom2.js
|
|
|
|
Linux_ARMv7l_Tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUNTIME: qemu-arm-static
|
|
TIMEOUT: 300
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
|
|
- run: >-
|
|
$RUNNER -q --jerry-tests
|
|
--buildoptions=--toolchain=cmake/toolchain_linux_armv7l.cmake,--linker-flag=-static
|
|
|
|
Linux_ARMv7l_Tests_Debug:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUNTIME: qemu-arm-static
|
|
TIMEOUT: 300
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
|
|
- run: >-
|
|
$RUNNER -q --jerry-tests --build-debug
|
|
--buildoptions=--toolchain=cmake/toolchain_linux_armv7l.cmake,--linker-flag=-static
|
|
|
|
Linux_AArch64_Tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUNTIME: qemu-aarch64-static
|
|
TIMEOUT: 300
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-aarch64-linux-gnu libc6-dev-armhf-cross qemu-user-static
|
|
- run: >-
|
|
$RUNNER -q --jerry-tests
|
|
--buildoptions=--toolchain=cmake/toolchain_linux_aarch64.cmake,--linker-flag=-static
|
|
|
|
Linux_AArch64_Tests_Debug:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUNTIME: qemu-aarch64-static
|
|
TIMEOUT: 300
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-aarch64-linux-gnu libc6-dev-armhf-cross qemu-user-static
|
|
- run: >-
|
|
$RUNNER -q --jerry-tests --build-debug
|
|
--buildoptions=--toolchain=cmake/toolchain_linux_aarch64.cmake,--linker-flag=-static
|
|
|
|
MbedOS_K64F_Build_Test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-arm-none-eabi ninja-build
|
|
- run: make -f ./targets/os/mbedos/Makefile.travis install
|
|
- run: make -f ./targets/os/mbedos/Makefile.travis script
|
|
|
|
Zephyr_STM32F4_Build_Test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gperf dfu-util device-tree-compiler
|
|
- run: make -f ./targets/os/zephyr/Makefile.travis install
|
|
- run: make -f ./targets/os/zephyr/Makefile.travis script
|
|
|
|
NuttX_STM32F4_Build_Test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.6'
|
|
- run: sudo apt update
|
|
- run: sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi gperf
|
|
- run: make -f ./targets/os/nuttx/Makefile.travis install-noapt
|
|
- run: make -f ./targets/os/nuttx/Makefile.travis script
|
|
|
|
RIOT_STM32F4_Build_Test:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CC: clang
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: sudo apt -y install clang gcc-arm-none-eabi
|
|
- run: make -f ./targets/os/riot/Makefile.travis install-noapt
|
|
- run: make -f ./targets/os/riot/Makefile.travis script
|
|
|
|
ESP8266_RTOS_SDK_Build_Test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '>=3.8'
|
|
- run: make -f ./targets/baremetal-sdk/espressif/esp8266-rtos-sdk/Makefile.travis install-noapt
|
|
- run: make -f ./targets/baremetal-sdk/espressif/esp8266-rtos-sdk/Makefile.travis script
|
|
|
|
ESP_IDF_Build_Test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '==3.8'
|
|
- run: make -f ./targets/baremetal-sdk/espressif/esp-idf/Makefile.travis install-noapt
|
|
- run: make -f ./targets/baremetal-sdk/espressif/esp-idf/Makefile.travis script
|
|
|
|
Notification:
|
|
runs-on: ubuntu-latest
|
|
if: false && github.event_name == 'push' && github.repository == 'jerryscript-project/jerryscript'
|
|
steps:
|
|
- uses: rectalogic/notify-irc@v1
|
|
with:
|
|
channel: '#jerryscript'
|
|
nickname: jerryscript-notification
|
|
message: |
|
|
@${{ github.actor }}: ${{ github.repository }} (${{ github.ref }}#${{ github.sha }})
|
|
${{ join(github.event.commits.*.message) }}
|
|
${{ github.event.compare }}
|