Fix c-tests.yml #11
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/CCpp tests | ||
on: | ||
workflow_call: | ||
inputs: | ||
compiler-ref: | ||
required: false | ||
type: string | ||
runtime-ref: 'network-structure' | ||
required: true | ||
type: string | ||
use-cpp: | ||
required: false | ||
type: boolean | ||
default: false | ||
scheduler: | ||
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 }} | ||
# ref: 'network-structure' | ||
fetch-depth: 0 | ||
- name: Prepare build environment | ||
uses: ./.github/actions/prepare-build-env | ||
- name: Check out specific ref of reactor-c | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: lf-lang/reactor-c | ||
path: core/src/main/resources/lib/c/reactor-c | ||
ref: ${{ inputs.runtime-ref }} | ||
# ref: 'network-structure' | ||
if: ${{ inputs.runtime-ref }} | ||
- name: Install dependencies OS X | ||
run: | | ||
brew install coreutils | ||
brew install openssl | ||
brew link openssl --force | ||
if: ${{ runner.os == 'macOS' }} | ||
- name: Install RTI | ||
uses: ./.github/actions/install-rti | ||
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }} | ||
- name: Perform tests for C target with default scheduler | ||
run: ./gradlew targetTest -Ptarget=C | ||
if: ${{ !inputs.use-cpp && !inputs.scheduler }} | ||
- name: Perform tests for C target with specified scheduler (no LSP tests) | ||
run: | | ||
echo "Specified scheduler: ${{ inputs.scheduler }}" | ||
./gradlew targetTest -Ptarget=C -Dscheduler=${{ inputs.scheduler }} | ||
if: ${{ !inputs.use-cpp && inputs.scheduler }} | ||
- name: Perform tests for CCpp target with default scheduler | ||
run: ./gradlew targetTest -Ptarget=CCpp | ||
if: ${{ inputs.use-cpp && !inputs.scheduler }} | ||
- name: Report to CodeCov | ||
uses: ./.github/actions/report-code-coverage | ||
with: | ||
files: core/build/reports/jacoco/integrationTestCodeCoverageReport/integrationTestCodeCoverageReport.xml | ||
if: ${{ github.repository == 'lf-lang/lingua-franca' }} |