Skip to content

Commit

Permalink
Parallel execution of tests in the CI
Browse files Browse the repository at this point in the history
Signed-off-by: Hernan Ponce de Leon <[email protected]>
  • Loading branch information
hernan-poncedeleon committed Feb 25, 2025
1 parent d82d2ef commit 7edca6c
Show file tree
Hide file tree
Showing 89 changed files with 51 additions and 14 deletions.
65 changes: 51 additions & 14 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,39 @@ jobs:
- name: Set DAT3M_OUTPUT
run: echo "DAT3M_OUTPUT=$(echo $DAT3M_HOME)/output" >> $GITHUB_ENV

- name: Build with Maven
run: mvn --batch-mode --update-snapshots install
litmus-tests:
needs: build
runs-on: ubuntu-latest

- name: Build the Docker image
run: docker build . --file Dockerfile
- name: Litmus tests
run: mvn test -Dtest="com/dat3m/dartagnan/litmus/*"

llvm-tests:
needs: build
runs-on: ubuntu-latest

- name: LLVM tests
run: mvn test -Dtest="com/dat3m/dartagnan/llvm/*"

other-tests:
needs: build
runs-on: ubuntu-latest

- name: Other tests
run: mvn test -Dtest="com/dat3m/dartagnan/others/*"

spirv-tests:
needs: build
runs-on: ubuntu-latest

- name: SPIRV tests
run: mvn test -Dtest="com/dat3m/dartagnan/spirv/*"


coverage:
needs: [litmus-tests, llvm-tests, other-tests, spirv-tests]
runs-on: ubuntu-latest

- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
badges-directory: badges
coverage-badge-filename: coverage.svg
generate-branches-badge: true
branches-badge-filename: branches.svg
jacoco-csv-file: dartagnan/target/site/jacoco/jacoco.csv

- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
Expand All @@ -73,3 +90,23 @@ jobs:
git commit -m "Autogenerated JaCoCo coverage badge" *.svg
git push
fi
badge:
needs: [litmus-tests, llvm-tests, other-tests, spirv-tests]
runs-on: ubuntu-latest

- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
badges-directory: badges
coverage-badge-filename: coverage.svg
generate-branches-badge: true
branches-badge-filename: branches.svg
jacoco-csv-file: dartagnan/target/site/jacoco/jacoco.csv

docker:
runs-on: ubuntu-latest

- name: Build the Docker image
run: docker build . --file Dockerfile

0 comments on commit 7edca6c

Please sign in to comment.