Analysis #446
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: Analysis | |
| on: | |
| schedule: | |
| # trigger on every monday, wednesday and friday | |
| - cron: '30 22 * * 1,3,5' | |
| workflow_dispatch: | |
| jobs: | |
| coverity-scan: | |
| if: github.repository == 'Samsung/escargot' | |
| runs-on: [self-hosted, linux, x64, test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download Coverity Tool | |
| env: | |
| TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
| run: | | |
| wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=Samsung%2Fescargot" -O cov-analysis-linux64.tar.gz | |
| mkdir cov-analysis-linux64 | |
| tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 | |
| - name: Build | |
| env: | |
| BUILD_OPTIONS: -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_CODE_CACHE=ON -DESCARGOT_WASM=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TEST=ON -DESCARGOT_SHADOWREALM=ON -DESCARGOT_OUTPUT=shell -GNinja | |
| run: | | |
| export PATH=$GITHUB_WORKSPACE/cov-analysis-linux64/bin:$PATH | |
| LDFLAGS=" -L/usr/icu78-64/lib/ -Wl,-rpath=/usr/icu78-64/lib/" PKG_CONFIG_PATH="/usr/icu78-64/lib/pkgconfig/" cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -H. -Bout/coverity_scan $BUILD_OPTIONS | |
| cov-build --dir cov-int ninja -Cout/coverity_scan | |
| - name: Submit | |
| env: | |
| TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
| NOTI_MAIL: ${{ secrets.COVERITY_SCAN_MAIL }} | |
| run: | | |
| tar czvf escargot.tgz cov-int | |
| curl \ | |
| --form token=$TOKEN \ | |
| --form email=$NOTI_MAIL \ | |
| --form [email protected] \ | |
| --form version="4.3.0" \ | |
| --form description="escargot coverity scan" \ | |
| https://scan.coverity.com/builds?project=Samsung%2Fescargot | |
| coverage-scan: | |
| if: github.repository == 'Samsung/escargot' | |
| runs-on: [self-hosted, linux, x64, test] | |
| timeout-minutes: 600 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Build x64 | |
| env: | |
| BUILD_OPTIONS: -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_COVERAGE=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TEST=ON -DESCARGOT_SHADOWREALM=ON -DESCARGOT_OUTPUT=shell -GNinja | |
| run: | | |
| LDFLAGS=" -L/usr/icu78-64/lib/ -Wl,-rpath=/usr/icu78-64/lib/" PKG_CONFIG_PATH="/usr/icu78-64/lib/pkgconfig/" cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -H. -Bout/coverage64 -DESCARGOT_ARCH=x64 $BUILD_OPTIONS | |
| ninja -Cout/coverage64 | |
| LDFLAGS=" -L/usr/icu78-32/lib/ -Wl,-rpath=/usr/icu78-32/lib/" PKG_CONFIG_PATH="/usr/icu78-32/lib/pkgconfig/" cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -H. -Bout/coverage32 -DESCARGOT_ARCH=x86 $BUILD_OPTIONS | |
| ninja -Cout/coverage32 | |
| - name: Run test262 and collect coverage data | |
| # test262 is unstable in actions env, but coverage data will be accumulated | |
| continue-on-error: true | |
| run: | | |
| # set locale | |
| sudo locale-gen en_US.UTF-8 | |
| export LANG=en_US.UTF-8 | |
| locale | |
| LD_LIBRARY_PATH=/usr/icu78-64/lib/ GC_FREE_SPACE_DIVISOR=1 tools/run-tests.py --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/coverage64/escargot" new-es regression-tests test262 octane chakracore sunspider-js modifiedVendorTest jsc-stress v8 spidermonkey intl jetstream-only-cdjs | |
| LD_LIBRARY_PATH=/usr/icu78-32/lib/ GC_FREE_SPACE_DIVISOR=1 tools/run-tests.py --arch=x86 --engine="$GITHUB_WORKSPACE/out/coverage32/escargot" new-es regression-tests test262 octane chakracore sunspider-js modifiedVendorTest jsc-stress v8 spidermonkey intl jetstream-only-cdjs | |
| - name: Generate coverage report | |
| run: | | |
| gcovr --gcov-ignore-parse-errors --exclude-unreachable-branches --exclude-throw-branches --exclude '.*third_party/' --exclude '.*api/' -r . --xml coverage.xml | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| files: ./coverage.xml | |
| name: codecov-umbrella | |
| verbose: true |