name: ci on: pull_request: paths: - '**' - '!.gitignore' - '!LICENSE' - '!TODO' - '!doc/**' - '!examples/**' - '.github/workflows/ci.yml' push: branches: - '*' jobs: linux: name: Linux (Ubuntu) runs-on: ubuntu-latest strategy: fail-fast: false steps: - uses: actions/checkout@v4 with: submodules: true - name: Build run: | make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y - name: Stats run: | ./qjs -qd - name: Run built-in tests run: | make test - name: Run microbench run: | make microbench linux-asan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true - name: Build run: | make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y - name: Run built-in tests env: ASAN_OPTIONS: halt_on_error=1 run: | make CONFIG_ASAN=y test linux-msan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true - name: Build env: CC: clang run: | make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_MSAN=y CONFIG_CLANG=y - name: Run built-in tests env: MSAN_OPTIONS: halt_on_error=1 run: | make CONFIG_MSAN=y CONFIG_CLANG=y test linux-ubsan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true - name: Build run: | make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y - name: Run built-in tests env: UBSAN_OPTIONS: halt_on_error=1 run: | make CONFIG_UBSAN=y test macos: name: macOS runs-on: macos-latest strategy: fail-fast: false steps: - uses: actions/checkout@v4 - name: Build run: | make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y - name: Stats run: | ./qjs -qd - name: Run built-in tests run: | make test macos-asan: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: Build run: | make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y - name: Run built-in tests env: ASAN_OPTIONS: halt_on_error=1 run: | make CONFIG_ASAN=y test macos-ubsan: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: Build run: | make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y - name: Run built-in tests env: UBSAN_OPTIONS: halt_on_error=1 run: | make CONFIG_UBSAN=y test freebsd: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build + test uses: vmactions/freebsd-vm@v1 with: usesh: true prepare: | pkg install -y gmake run: | gmake ./qjs -qd gmake test 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"