Skip to content

Commit

Permalink
Run all categories of C tests.
Browse files Browse the repository at this point in the history
I do not want to stop running tests when one category fails. I would
also like to experiment with increasing the amount of parallelism.
  • Loading branch information
petervdonovan committed Jun 4, 2023
1 parent f30599a commit 05ba9c5
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 4 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/c-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ on:
required: false
default: true
type: boolean
selected-tests:
required: false
default: "" # "" means run all tests until failure
type: string

jobs:
regular-tests:
name: ${{ inputs.selected-tests }}
strategy:
matrix:
platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }}
Expand Down Expand Up @@ -55,15 +60,23 @@ jobs:
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 }}
if: ${{ !inputs.use-cpp && !inputs.scheduler && inputs.selected-tests == '' }}
- 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 }}
if: ${{ !inputs.use-cpp && inputs.scheduler && inputs.selected-tests == '' }}
- name: Perform tests for CCpp target with default scheduler
run: ./gradlew targetTest -Ptarget=CCpp
if: ${{ inputs.use-cpp && !inputs.scheduler }}
if: ${{ inputs.use-cpp && !inputs.scheduler && inputs.selected-tests == '' }}
- name: Perform tests for C target with default scheduler
run: ./gradlew core:integrationTest --tests org.lflang.tests.runtime.CTest.${{ inputs.selected-tests }}
if: ${{ !inputs.use-cpp && !inputs.scheduler && inputs.selected-tests != '' }}
- name: Perform tests for C target with specified scheduler (no LSP tests)
run: |
echo "Specified scheduler: ${{ inputs.scheduler }}"
./gradlew core:integrationTest --tests org.lflang.tests.runtime.CTest.${{ inputs.selected-tests }} -Dscheduler=${{ inputs.scheduler }}
if: ${{ inputs.use-cpp && !inputs.scheduler && inputs.selected-tests != '' }}
- name: Collect code coverage
run: ./gradlew jacocoTestReport
- name: Report to CodeCov
Expand Down
87 changes: 86 additions & 1 deletion .github/workflows/only-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,96 @@ concurrency:

jobs:
# Run the C integration tests.
default:
default0:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runGenericTests

default1:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runTargetSpecificTests

default2:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runMultiportTests

default3:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runTypeParameterTests

default4:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runAsFederated

default5:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runConcurrentTests

default6:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runFederatedTests

default7:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runModalTests

default8:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runNoInliningTests

default9:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runDockerTests

default10:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runDockerFederatedTests

default11:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runWithThreadingOff

default12:
if: ${{ inputs.all || github.event.pull_request.draft }}
uses: ./.github/workflows/c-tests.yml
with:
all-platforms: ${{ !github.event.pull_request.draft }}
selected-tests: runEnclaveTests

# Run the C benchmark tests.
benchmarking:
Expand Down

0 comments on commit 05ba9c5

Please sign in to comment.