fix(vm): Don't try to cast subscript index before checking its range #1203
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
| on: | |
| push: | |
| branches: [main, windows] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| tests: | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zig-version: | |
| - "0.16.0-dev.747+493ad58ff" | |
| operating-system: [ ubuntu-latest, macos-latest ] | |
| optimize: | |
| - "Debug" | |
| - "ReleaseSafe" | |
| - "ReleaseFast" | |
| - "ReleaseSmall" | |
| options: | |
| - "" | |
| - "-Djit_always_on" | |
| steps: | |
| - name: Checkout project | |
| uses: actions/[email protected] | |
| - name: Checkout submodules | |
| run: git submodule update --init --recursive | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: ${{ matrix.zig-version }} | |
| - name: Build test ffi lib | |
| run: zig build-lib -dynamic tests/utils/foreign.zig && mv libforeign.* tests/utils/ | |
| - name: Run tests ${{ matrix.optimize }} | |
| run: zig build -Doptimize=${{ matrix.optimize }} ${{ matrix.options }} test | |
| - name: Run behavior tests ${{ matrix.optimize }} | |
| run: zig build -Doptimize=${{ matrix.optimize }} ${{ matrix.options }} test-behavior | |
| - name: Cleanup | |
| run: rm -rf zig-out zig-cache | |
| wasm-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout project | |
| uses: actions/[email protected] | |
| - name: Checkout submodules | |
| run: git submodule update --init --recursive | |
| - name: Setup nightly Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: master | |
| - name: Build for wasm | |
| run: zig build -Dtarget=wasm32-freestanding -Doptimize=ReleaseSmall | |
| - name: Cleanup | |
| run: rm -rf zig-out zig-cache | |
| lint: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: master | |
| - run: zig fmt --check src/*.zig src/**/*.zig |