From: Dmitry Volyntsev Date: Sat, 24 Oct 2026 05:51:50 +0000 (-0700) Subject: CI: split test262 runs into independent PR checks X-Git-Url: https://git.kaiwu.me/http/%7B@url%7D?a=commitdiff_plain;h=14a570f3259c4e4c15cd86afa40b732709789c86;p=njs.git CI: split test262 runs into independent PR checks Previously, normal, UBSan and ASan runs shared one test262 job, so the PR checks page did not distinguish their results. A failure in an earlier run also prevented the remaining configurations from running. Use a named matrix with fail-fast disabled, following the CLI workflow. Each configuration builds from a fresh checkout and retains its configure flags, sanitizer options, suite revision, failure baseline and test timeouts. --- diff --git a/.github/workflows/test262.yml b/.github/workflows/test262.yml index aa9961b1..5afc41fc 100644 --- a/.github/workflows/test262.yml +++ b/.github/workflows/test262.yml @@ -13,8 +13,19 @@ concurrency: jobs: test262: + name: test262 ${{ matrix.name }} runs-on: ubuntu-24.04 timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + include: + - name: normal + mode: normal + - name: UBSan + mode: ubsan + - name: ASan + mode: asan steps: - name: Checkout njs @@ -36,46 +47,35 @@ jobs: - name: Build test262 run: | - ./configure + case "${{ matrix.mode }}" in + normal) + ./configure + ;; + ubsan) + CC=clang-18 ./configure \ + --cc-opt='-O2 -fsanitize=undefined' \ + --ld-opt='-fsanitize=undefined' + ;; + asan) + CC=clang-18 ./configure \ + --address-sanitizer=YES --cc-opt=-O2 + ;; + esac make -j$(nproc) njs_test262 - name: Run test262 run: | + case "${{ matrix.mode }}" in + ubsan) + export UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 + ;; + asan) + export ASAN_OPTIONS=detect_leaks=0 + ;; + esac TZ=UTC timeout 15m build/njs_test262 \ --config test/njs_test262.conf \ --suite "$GITHUB_WORKSPACE/test262" \ --failures "$GITHUB_WORKSPACE/test/njs_test262.failures" \ --isolation=process \ --timeout=5 - - - name: Build test262 with UBSan - run: | - make clean - CC=clang-18 ./configure --cc-opt='-O2 -fsanitize=undefined' \ - --ld-opt='-fsanitize=undefined' - make -j$(nproc) njs_test262 - - - name: Run test262 with UBSan - run: | - TZ=UTC UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 \ - timeout 15m build/njs_test262 \ - --config test/njs_test262.conf \ - --suite "$GITHUB_WORKSPACE/test262" \ - --failures "$GITHUB_WORKSPACE/test/njs_test262.failures" \ - --isolation=process \ - --timeout=5 - - - name: Build test262 with ASan - run: | - make clean - CC=clang-18 ./configure --address-sanitizer=YES --cc-opt=-O2 - make -j$(nproc) njs_test262 - - - name: Run test262 with ASan - run: | - TZ=UTC ASAN_OPTIONS=detect_leaks=0 timeout 15m build/njs_test262 \ - --config test/njs_test262.conf \ - --suite "$GITHUB_WORKSPACE/test262" \ - --failures "$GITHUB_WORKSPACE/test/njs_test262.failures" \ - --isolation=process \ - --timeout=5