Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
- name: Run microbench
run: |
make microbench
- name: Run test262
run: |
make test2-bootstrap
make test2

linux-lto:
name: Linux LTO
Expand Down Expand Up @@ -67,13 +71,18 @@ jobs:
submodules: true
- name: Install gcc-multilib
run: |
sudo apt update
Copy link
Contributor Author

@nickva nickva Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After ubuntu images receive an update for a about a day or two CI will start failing unless the CI jobs perform an apt update so that's why I added it here.

More info at actions/runner-images#12599

sudo apt install -y gcc-multilib
- name: Build
run: |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_M32=y
- name: Run built-in tests
run: |
make CONFIG_M32=y test
- name: Run test262
run: |
make test2-bootstrap
make CONFIG_M32=y test2

linux-asan:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -138,6 +147,10 @@ jobs:
- name: Run built-in tests
run: |
make test
- name: Run test262
run: |
make test2-bootstrap
make test2

macos-asan:
runs-on: macos-latest
Expand Down Expand Up @@ -173,6 +186,8 @@ jobs:
uses: vmactions/freebsd-vm@v1
with:
usesh: true
copyback: false
mem: 16384
prepare: |
pkg install -y gmake
run: |
Expand Down Expand Up @@ -202,6 +217,10 @@ jobs:
- name: Run built-in tests
run: |
make CONFIG_COSMO=y test
- name: Run test262
run: |
make test2-bootstrap
make CONFIG_COSMO=y test2

mingw-windows:
name: MinGW Windows target
Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ PREFIX?=/usr/local
# use UB sanitizer
#CONFIG_UBSAN=y

# TEST262 bootstrap config: commit id and shallow "since" parameter
TEST262_COMMIT?=a5e69a1534de88d1eb29b76657d84c8541b72df7
TEST262_SINCE?=2025-09-01

OBJDIR=.obj

ifdef CONFIG_ASAN
Expand Down Expand Up @@ -464,6 +468,15 @@ stats: qjs$(EXE)
microbench: qjs$(EXE)
$(WINE) ./qjs$(EXE) --std tests/microbench.js

ifeq ($(wildcard test262/features.txt),)
test2-bootstrap:
git clone --single-branch --shallow-since=$(TEST262_SINCE) https://github.com/tc39/test262.git
(cd test262 && git checkout -q $(TEST262_COMMIT) && patch -p1 < ../tests/test262.patch && cd ..)
else
test2-bootstrap:
(cd test262 && git fetch && git reset --hard $(TEST262_COMMIT) && patch -p1 < ../tests/test262.patch && cd ..)
endif

ifeq ($(wildcard test262o/tests.txt),)
test2o test2o-update:
@echo test262o tests not installed
Expand Down
1 change: 1 addition & 0 deletions test262.conf
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ for-of
generators
globalThis
hashbang
immutable-arraybuffer=skip
import-attributes
import-defer=skip
import.meta
Expand Down
6 changes: 3 additions & 3 deletions tests/test262.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ index 9828b15..4a5919d 100644
+// small: 200,
+// long: 1000,
+// huge: 10000,
+ yield: 20,
+ small: 20,
+ long: 100,
+ yield: 40,
+ small: 40,
+ long: 200,
+ huge: 1000,
};

Expand Down
Loading