vm: Fix UB with signed int overflow #561
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: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| debug: | |
| name: debug-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}} | |
| runs-on: ${{matrix.config.image}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| image: ubuntu-22.04, | |
| arch: x86_64, | |
| os: ubuntu, | |
| compiler: clang13, | |
| cc: clang-13, | |
| cxx: clang++-13 | |
| } | |
| - { | |
| image: windows-2022, | |
| arch: x86_64, | |
| os: windows, | |
| compiler: vs2022, | |
| generator: vs2022 | |
| } | |
| env: | |
| CC: ${{matrix.config.cc}} | |
| CXX: ${{matrix.config.cxx}} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: install-unix | |
| if: matrix.config.os != 'windows' | |
| run: | | |
| echo "Installing llvm-13"; sudo apt install llvm-13 | |
| sudo ln -s /usr/bin/llvm-cov-13 /usr/bin/llvm-cov | |
| sudo ln -s /usr/bin/llvm-profdata-13 /usr/bin/llvm-profdata | |
| - name: configure-unix | |
| if: matrix.config.os != 'windows' | |
| run: ./scripts/configure.sh --type Debug --sanitize --coverage --tests --fuzz --lint | |
| - name: configure-windows | |
| if: matrix.config.os == 'windows' | |
| run: pwsh .\scripts\configure.ps1 -Gen ${{matrix.config.generator}} -Type Debug -Tests | |
| - name: build-unix | |
| if: matrix.config.os != 'windows' | |
| run: ./scripts/build.sh | |
| - name: build-windows | |
| if: matrix.config.os == 'windows' | |
| run: pwsh .\scripts\build.ps1 | |
| - name: test-unix | |
| if: matrix.config.os != 'windows' | |
| run: ./scripts/test.sh | |
| - name: test-windows | |
| if: matrix.config.os == 'windows' | |
| run: pwsh .\scripts\test.ps1 | |
| - name: fuzz-corpus-cache | |
| if: matrix.config.os != 'windows' | |
| uses: actions/cache@v3 | |
| with: | |
| path: ./fuzz/corpus | |
| key: fuzz-corpus | |
| - name: fuzz-lex | |
| if: matrix.config.os != 'windows' | |
| run: ./scripts/fuzz.sh --path bin/novfuzz-lex --duration 60 | |
| - name: fuzz-parse | |
| if: matrix.config.os != 'windows' | |
| run: ./scripts/fuzz.sh --path bin/novfuzz-parse --duration 60 | |
| - name: upload-coverage | |
| if: matrix.config.os != 'windows' | |
| env: | |
| CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} | |
| run: ./scripts/upload_coverage.sh --token "${CODECOV_TOKEN}" | |
| release: | |
| name: release-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}} | |
| runs-on: ${{matrix.config.image}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| image: ubuntu-22.04, | |
| arch: x86_64, | |
| os: ubuntu, | |
| compiler: gcc9, | |
| cc: gcc-9, | |
| cxx: g++-9 | |
| } | |
| - { | |
| image: ubuntu-22.04, | |
| arch: x86_64, | |
| os: ubuntu, | |
| compiler: clang13, | |
| cc: clang-13, | |
| cxx: clang++-13 | |
| } | |
| - { | |
| image: macos-13, | |
| arch: x86_64, | |
| os: macos, | |
| compiler: appleclang, | |
| cc: clang, | |
| cxx: clang++ | |
| } | |
| - { | |
| image: windows-2022, | |
| arch: x86_64, | |
| os: windows, | |
| compiler: mingw-w64-12, | |
| generator: MinGW, | |
| cc: 'C:\ProgramData\Chocolatey\bin\gcc.exe', | |
| cxx: 'C:\ProgramData\Chocolatey\bin\g++.exe' | |
| } | |
| - { | |
| image: windows-2022, | |
| arch: x86_64, | |
| os: windows, | |
| compiler: vs2022, | |
| generator: vs2022 | |
| } | |
| - { | |
| image: windows-2022, | |
| arch: x86_64, | |
| os: windows, | |
| compiler: vs2022-clang, | |
| generator: vs2022-clang | |
| } | |
| env: | |
| CC: ${{matrix.config.cc}} | |
| CXX: ${{matrix.config.cxx}} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install-windows-mingw | |
| if: matrix.config.os == 'windows' && matrix.config.generator == 'MinGW' | |
| run: | | |
| echo "Installing mingw-w64-12" | |
| choco install mingw --version=12.1.0 --force | |
| echo "where g++.exe:"; where.exe g++.exe | |
| echo "g++.exe --version:"; g++.exe --version | |
| - name: configure-unix | |
| if: matrix.config.os != 'windows' | |
| run: ./scripts/configure.sh --type Release --tests | |
| - name: configure-windows | |
| if: matrix.config.os == 'windows' | |
| run: pwsh .\scripts\configure.ps1 -Gen ${{matrix.config.generator}} -Type Release -Tests | |
| - name: build-unix | |
| if: matrix.config.os != 'windows' | |
| run: ./scripts/build.sh | |
| - name: build-windows | |
| if: matrix.config.os == 'windows' | |
| run: pwsh .\scripts\build.ps1 | |
| - name: test-unix | |
| if: matrix.config.os != 'windows' | |
| run: ./scripts/test.sh | |
| - name: test-windows | |
| if: matrix.config.os == 'windows' | |
| run: pwsh .\scripts\test.ps1 | |
| - name: archive | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: novus-release-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}} | |
| path: bin |