[github] Enable Binaryen LiveTests by providing wasm-opt #1318
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_test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build_test: | |
| timeout-minutes: 30 | |
| strategy: | |
| # If macos-latest fails, we still don't want to cancel ubuntu-latest or the other way around. | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, ubuntu-latest] | |
| kind: [debug] | |
| include: | |
| # On linux also build and test release. | |
| - os: ubuntu-latest | |
| kind: release | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install jsvu | |
| run: npm install jsvu -g | |
| - name: Install d8 | |
| run: jsvu --os=default --engines=v8 | |
| - name: d8 version | |
| run: ~/.jsvu/engines/v8/v8 --version | |
| - name: Install Binaryen | |
| run: | | |
| Tools/bootstrap-binaryen.sh ~/.binaryen | |
| echo "$HOME/.binaryen/bin" >> $GITHUB_PATH | |
| - name: Install Node.js dependencies for Compiler/Parser tests | |
| working-directory: ./Sources/Fuzzilli/Compiler/Parser | |
| run: npm install | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 27-nightly | |
| - name: V8 version used by Node.js | |
| run: node -p process.versions.v8 | |
| - name: Swift Version | |
| run: swift --version | |
| - name: Build | |
| run: swift build -c ${{ matrix.kind }} | |
| - name: Install protobuf | |
| # Install protoc so the presubmit can also validate the generated *.pb.swift files. | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.kind == 'debug' }} | |
| run: sudo apt update && sudo apt install -y protobuf-compiler | |
| - name: Run presubmit checks | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.kind == 'debug' }} | |
| run: python3 Tools/presubmit.py | |
| - name: Run tests with Node.js | |
| run: Tools/run_tests.py Tests/failing_nodejs.txt -c ${{ matrix.kind }} --no-parallel | |
| - name: Run tests with d8 | |
| run: FUZZILLI_TEST_SHELL=~/.jsvu/engines/v8/v8 Tools/run_tests.py Tests/failing_jsvu.txt -c ${{ matrix.kind }} --no-parallel | |
| asan: | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install jsvu | |
| run: npm install jsvu -g | |
| - name: Install d8 | |
| run: jsvu --os=default --engines=v8 | |
| - name: d8 version | |
| run: ~/.jsvu/engines/v8/v8 --version | |
| - name: Install Binaryen | |
| run: | | |
| Tools/bootstrap-binaryen.sh ~/.binaryen | |
| echo "$HOME/.binaryen/bin" >> $GITHUB_PATH | |
| - name: Swift Version | |
| run: swift --version | |
| - name: Install LLVM | |
| run: sudo apt update && sudo apt install -y llvm | |
| - name: Run tests with leak sanitization | |
| run: | | |
| set -o pipefail | |
| export ASAN_SYMBOLIZER_PATH=$(which llvm-symbolizer) | |
| export FUZZILLI_TEST_SHELL=~/.jsvu/engines/v8/v8 | |
| export ASAN_OPTIONS=detect_leaks=1 | |
| export LSAN_OPTIONS=suppressions=$PWD/Tests/lsan_suppressions.txt | |
| swift test --sanitize=address --no-parallel 2>&1 | swift demangle |