diff --git a/.github/actions/setup-patmos/action.yml b/.github/actions/setup-patmos/action.yml new file mode 100644 index 0000000000..d640876b9a --- /dev/null +++ b/.github/actions/setup-patmos/action.yml @@ -0,0 +1,17 @@ +name: Install Patmos and dependencies (Linux only) +description: Install Patmos and dependencies (Linux only) +runs: + using: "composite" + steps: + - name: Setup + run: | + # Clone the Patmos repository + mkdir ~/t-crest + cd ~/t-crest + git clone https://github.com/t-crest/patmos-misc.git misc + ./misc/build.sh + + # Save location in PATH + export PATH=$PATH:$HOME/t-crest/misc + shell: bash + diff --git a/.github/workflows/c-embedded.yml b/.github/workflows/c-embedded.yml index f36bf3c73b..cfa1f73349 100644 --- a/.github/workflows/c-embedded.yml +++ b/.github/workflows/c-embedded.yml @@ -23,3 +23,7 @@ jobs: # Run the C FlexPRET integration tests. flexpret: uses: ./.github/workflows/c-flexpret-tests.yml + + # Run the C Patmos integration tests. + patmos: + uses: ./.github/workflows/c-patmos-tests.yml \ No newline at end of file diff --git a/.github/workflows/c-patmos-tests.yml b/.github/workflows/c-patmos-tests.yml new file mode 100644 index 0000000000..5cffb01ce9 --- /dev/null +++ b/.github/workflows/c-patmos-tests.yml @@ -0,0 +1,53 @@ +name: C Patmos tests + +on: + workflow_call: + inputs: + compiler-ref: + required: false + type: string + runtime-ref: + required: false + type: string + use-cpp: + required: false + type: boolean + default: false + scheduler: + required: false + type: string + all-platforms: + required: false + default: true + type: boolean + +jobs: + Patmos-tests: + runs-on: ubuntu-latest + 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: Setup and build Patmos + uses: ./.github/actions/setup-patmos + - 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 }} + if: ${{ inputs.runtime-ref }} + - name: Run Patmos smoke tests + run: | + rm -rf test/C/src-gen + - 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' }} diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 89b0e3617d..543b738636 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 89b0e3617db1d2730552a418fd35f1395afe114a +Subproject commit 543b7386362f0a17e4804c8b6eee5c5f1f64cf8b