2024-03-03 07:14:23 -06:00
name : ci
on :
pull_request :
paths :
- '**'
- '!.gitignore'
- '!LICENSE'
- '!TODO'
- '!doc/**'
- '!examples/**'
- '.github/workflows/ci.yml'
push :
branches :
2024-03-03 14:57:38 -06:00
- '*'
2024-03-03 07:14:23 -06:00
jobs :
linux :
2024-03-03 14:57:38 -06:00
name : Linux (Ubuntu)
2024-03-03 07:14:23 -06:00
runs-on : ubuntu-latest
strategy :
fail-fast : false
steps :
2024-03-03 14:57:38 -06:00
- uses : actions/checkout@v4
2024-03-03 07:14:23 -06:00
with :
submodules : true
2024-03-03 14:57:38 -06:00
- name : Build
2024-03-03 07:14:23 -06:00
run : |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y
2024-03-03 14:57:38 -06:00
- name : Stats
2024-03-03 07:14:23 -06:00
run : |
./qjs -qd
2024-03-03 14:57:38 -06:00
- name : Run built-in tests
2024-03-03 07:14:23 -06:00
run : |
make test
2024-03-03 14:57:38 -06:00
- name : Run microbench
2024-03-03 07:14:23 -06:00
run : |
make microbench
linux-asan :
runs-on : ubuntu-latest
steps :
2024-03-03 14:57:38 -06:00
- uses : actions/checkout@v4
2024-03-03 07:14:23 -06:00
with :
submodules : true
2024-03-03 14:57:38 -06:00
- name : Build
2024-03-03 07:14:23 -06:00
run : |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y
2024-03-03 14:57:38 -06:00
- name : Run built-in tests
2024-03-03 07:14:23 -06:00
env :
ASAN_OPTIONS : halt_on_error=1
run : |
make CONFIG_ASAN=y test
linux-msan :
runs-on : ubuntu-latest
steps :
2024-03-03 14:57:38 -06:00
- uses : actions/checkout@v4
2024-03-03 07:14:23 -06:00
with :
submodules : true
2024-03-03 14:57:38 -06:00
- name : Build
2024-03-03 07:14:23 -06:00
env :
CC : clang
run : |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_MSAN=y CONFIG_CLANG=y
2024-03-03 14:57:38 -06:00
- name : Run built-in tests
2024-03-03 07:14:23 -06:00
env :
MSAN_OPTIONS : halt_on_error=1
run : |
make CONFIG_MSAN=y CONFIG_CLANG=y test
linux-ubsan :
runs-on : ubuntu-latest
steps :
2024-03-03 14:57:38 -06:00
- uses : actions/checkout@v4
2024-03-03 07:14:23 -06:00
with :
submodules : true
2024-03-03 14:57:38 -06:00
- name : Build
2024-03-03 07:14:23 -06:00
run : |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y
2024-03-03 14:57:38 -06:00
- name : Run built-in tests
2024-03-03 07:14:23 -06:00
env :
UBSAN_OPTIONS : halt_on_error=1
run : |
make CONFIG_UBSAN=y test
macos :
2024-03-03 14:57:38 -06:00
name : macOS
2024-03-03 07:14:23 -06:00
runs-on : macos-latest
strategy :
fail-fast : false
steps :
2024-03-03 14:57:38 -06:00
- uses : actions/checkout@v4
- name : Build
2024-03-03 07:14:23 -06:00
run : |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y
2024-03-03 14:57:38 -06:00
- name : Stats
2024-03-03 07:14:23 -06:00
run : |
./qjs -qd
2024-03-03 14:57:38 -06:00
- name : Run built-in tests
2024-03-03 07:14:23 -06:00
run : |
make test
macos-asan :
runs-on : macos-latest
steps :
2024-03-03 14:57:38 -06:00
- uses : actions/checkout@v4
- name : Build
2024-03-03 07:14:23 -06:00
run : |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y
2024-03-03 14:57:38 -06:00
- name : Run built-in tests
2024-03-03 07:14:23 -06:00
env :
ASAN_OPTIONS : halt_on_error=1
run : |
make CONFIG_ASAN=y test
macos-ubsan :
runs-on : macos-latest
steps :
2024-03-03 14:57:38 -06:00
- uses : actions/checkout@v4
- name : Build
2024-03-03 07:14:23 -06:00
run : |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y
2024-03-03 14:57:38 -06:00
- name : Run built-in tests
2024-03-03 07:14:23 -06:00
env :
UBSAN_OPTIONS : halt_on_error=1
run : |
make CONFIG_UBSAN=y test
freebsd :
runs-on : ubuntu-latest
steps :
2024-03-03 14:57:38 -06:00
- uses : actions/checkout@v4
- name : Build + test
2024-03-03 07:14:23 -06:00
uses : vmactions/freebsd-vm@v1
with :
usesh : true
prepare : |
pkg install -y gmake
run : |
gmake
./qjs -qd
gmake test
2024-03-03 14:57:38 -06:00
qemu-alpine :
runs-on : ubuntu-latest
strategy :
fail-fast : false
matrix :
platform :
- i386
- arm32v6
- arm32v7
- arm64v8
- s390x
steps :
- uses : actions/checkout@v4
with :
submodules : recursive
- name : Get qemu
run : docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name : Run tests on ${{ matrix.platform }}
run : docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/alpine sh -c "apk add git patch make gcc libc-dev && cd /host && make test"