From d20d8cbbb9d5af7719e80a13bb4d6ac1cc56c693 Mon Sep 17 00:00:00 2001 From: larsk21 <57503246+larsk21@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:13:33 +0100 Subject: [PATCH 1/3] split CI workflow jobs --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16bb2463..ec1732da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,12 +44,10 @@ jobs: - name: Verify build with Sonar if: matrix.os == 'ubuntu-latest' run: > - ./mvnw clean verify javadoc:javadoc-no-fork sonar:sonar -P coverage + ./mvnw clean verify --batch-mode --update-snapshots --no-transfer-progress - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Stage build results run: mkdir staging-${{ matrix.os }} && cp **/target/*.jar staging-${{ matrix.os }}/ @@ -60,6 +58,61 @@ jobs: name: Build Results path: staging-*/ + verify-javadoc: + name: Verify JavaDoc + runs-on: ubuntu-latest + needs: [verify] + strategy: + fail-fast: true + + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + + - name: Setup Java and Maven cache + uses: actions/setup-java@v4.5.0 + with: + distribution: 'temurin' + java-version: '17' + check-latest: true + cache: 'maven' + + - name: Verify JavaDoc + run: > + ./mvnw clean compile javadoc:javadoc + -DskipTests + --batch-mode + --update-snapshots + --no-transfer-progress + + sonar: + name: SonarQube analysis + runs-on: ubuntu-latest + needs: [verify] + strategy: + fail-fast: true + + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + + - name: Setup Java and Maven cache + uses: actions/setup-java@v4.5.0 + with: + distribution: 'temurin' + java-version: '17' + check-latest: true + cache: 'maven' + + - name: Run SonarQube analysis + run: > + ./mvnw clean verify sonar:sonar -P coverage + --batch-mode + --update-snapshots + --no-transfer-progress + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + deploy-snapshot: name: Deploy snapshot runs-on: ubuntu-latest From 250bb7be9063c70693f70db8f5dccd093ce951fb Mon Sep 17 00:00:00 2001 From: larsk21 <57503246+larsk21@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:27:36 +0100 Subject: [PATCH 2/3] remove unnecessary distinction in verify CI step --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6d30d19..6324a99c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,15 +34,6 @@ jobs: cache: 'maven' - name: Verify build - if: matrix.os != 'ubuntu-latest' - run: > - ./mvnw clean verify - --batch-mode - --update-snapshots - --no-transfer-progress - - - name: Verify build with Sonar - if: matrix.os == 'ubuntu-latest' run: > ./mvnw clean verify --batch-mode From d53e6fd3c598783529c11b31609171239cd269df Mon Sep 17 00:00:00 2001 From: larsk21 <57503246+larsk21@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:59:53 +0100 Subject: [PATCH 3/3] package modules in JavaDoc CI job apparently Xtext DSLs need to be packaged in order to be used by other modules in the same project --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6324a99c..d6fc4774 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: - name: Verify JavaDoc run: > - ./mvnw clean compile javadoc:javadoc + ./mvnw clean package javadoc:javadoc -DskipTests --batch-mode --update-snapshots