aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/gh-actions.yml
blob: 3977a5f95a488724f8682fd91116b7bcfa507f9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
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
# TODO: update checkers to current versions available in ubuntu 22.04
#      - run: sudo apt install clang-format-10 python-serial
      - run: sudo apt install pylint doxygen cppcheck
      - 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

  OSX_x86-64_Build_Correctness_Unit_Tests:
    runs-on: macos-latest
    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-latest
    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@v2
        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@v2
        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@v2
        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-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

  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-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

  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

# TODO: update to ubuntu-22.04
#  MbedOS_K64F_Build_Test:
#    runs-on: ubuntu-18.04 # needed due to ppa:team-gcc-arm-embedded/ppa
#    steps:
#      - uses: actions/checkout@v2
#      - uses: actions/setup-python@v2
#        with:
#          python-version: '3.8' # needed due to 'intelhex' module
#      - run: sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
#      - run: sudo apt update
#      - run: sudo apt install gcc-arm-embedded python3-setuptools mercurial
#      - 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

# TODO: update to ubuntu-22.04
#  RIOT_STM32F4_Build_Test:
#    runs-on: ubuntu-18.04 # needed due to ppa:team-gcc-arm-embedded/ppa
#    env:
#      CC: clang
#    steps:
#      - uses: actions/checkout@v2
#      - run: sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
#      - run: sudo apt update
#      - run: sudo apt install clang gcc-arm-embedded gcc-multilib
#      - 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@v2
#        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 }}