retry codecov step #2
Workflow file for this run
This file contains 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: C++ tests | ||
on: | ||
workflow_call: | ||
inputs: | ||
compiler-ref: | ||
required: false | ||
type: string | ||
runtime-ref: | ||
required: false | ||
type: string | ||
all-platforms: | ||
required: false | ||
default: true | ||
type: boolean | ||
jobs: | ||
regular-tests: | ||
strategy: | ||
matrix: | ||
platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Check out lingua-franca repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: lf-lang/lingua-franca | ||
submodules: true | ||
ref: ${{ inputs.compiler-ref }} | ||
fetch-depth: 0 | ||
- name: Prepare build environment | ||
uses: ./.github/actions/prepare-build-env | ||
- name: Install Dependencies OS X | ||
run: brew install coreutils | ||
if: runner.os == 'macOS' | ||
- name: Install clang-tidy and lcov on Ubuntu | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y clang-tidy | ||
sudo apt-get install -y lcov | ||
if: matrix.platform == 'ubuntu-latest' | ||
- name: Check out specific ref of reactor-cpp | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: lf-lang/reactor-cpp | ||
path: core/src/main/resources/lib/cpp/reactor-cpp | ||
ref: ${{ inputs.runtime-ref }} | ||
if: ${{ inputs.runtime-ref }} | ||
- name: Run C++ tests; | ||
run: | | ||
./gradlew targetTest -Ptarget=Cpp | ||
- name: Report to CodeCov | ||
uses: Wandalen/wretry.action@1.3.0 | ||
with: | ||
attempt_limit: 3 | ||
attempt_delay: 2000 | ||
action: uses: codecov/codecov-action@v3.1.4 | ||
with: | | ||
files: core/build/reports/jacoco/integrationTestCodeCoverageReport/integrationTestCodeCoverageReport.xml | ||
fail_ci_if_error: true | ||
verbose: true | ||
if: ${{ !inputs.runtime-ref && inputs.all-platforms }} # i.e., if this is part of the main repo's CI | ||
- name: Collect reactor-cpp coverage data | ||
run: | | ||
lcov --capture --directory test/Cpp --output-file coverage.info | ||
lcov --extract coverage.info ${GITHUB_WORKSPACE}/test/Cpp/src-gen/reactor-cpp-default/\* --output-file reactor-cpp.info | ||
genhtml reactor-cpp.info --output-directory reactor-cpp.coverage | ||
if: matrix.platform == 'ubuntu-latest' | ||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: reactor-cpp.coverage | ||
path: reactor-cpp.coverage | ||
if: matrix.platform == 'ubuntu-latest' | ||
- name: Report to CodeCov | ||
uses: Wandalen/wretry.action@1.3.0 | ||
with: | ||
attempt_limit: 3 | ||
attempt_delay: 2000 | ||
action: uses: codecov/codecov-action@v3.1.4 | ||
with: | | ||
file: reactor-cpp.info | ||
fail_ci_if_error: true | ||
verbose: true | ||
if: ${{ runner.os == 'Linux' && inputs.all-platforms }} |