Add Linux 32bit and Cosmopolitan CI #140
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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-32bit: | |
| name: Linux 32bit (Ubuntu) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install gcc-multilib | |
| run: | | |
| 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 | |
| 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 | |
| cosmopolitan: | |
| name: Cosmopolitan | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install Cosmopolitan | |
| run: | | |
| mkdir ~/cosmocc | |
| cd ~/cosmocc | |
| wget https://cosmo.zip/pub/cosmocc/cosmocc.zip | |
| unzip cosmocc.zip | |
| echo "$HOME/cosmocc/bin" >> "$GITHUB_PATH" | |
| - name: Build | |
| run: | | |
| make CONFIG_COSMO=y | |
| - name: Run built-in tests | |
| run: | | |
| make CONFIG_COSMO=y test | |
| qemu-alpine: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - linux/386 | |
| - linux/riscv64 | |
| - linux/arm64 | |
| - linux/arm/v6 | |
| - linux/arm/v7 | |
| - linux/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 --platform ${{ matrix.platform }} alpine sh -c "apk add git patch make gcc libc-dev && cd /host && make test" |