From 17643cddd5fc7e7baaeca6da3fb45a596a872448 Mon Sep 17 00:00:00 2001 From: Nils Werner Date: Fri, 14 Nov 2025 12:03:45 +0100 Subject: [PATCH 1/3] Add GitHub Actions workflows for build and PR cleanup --- .cirrus.yml | 7 ------- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++ .github/workflows/pr-cleanup.yml | 11 +++++++++++ 3 files changed, 45 insertions(+), 7 deletions(-) delete mode 100644 .cirrus.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/pr-cleanup.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 36997f7..0000000 --- a/.cirrus.yml +++ /dev/null @@ -1,7 +0,0 @@ -container: - image: maven:3.9.7-eclipse-temurin-17 - -build_task: - maven_cache: - folder: ~/.m2/repository - build_script: ./build.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..553e008 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build + +on: + schedule: + # Run every day at 4:17 + - cron: "17 4 * * *" + push: + branches: + - master + - branch-* + - dogfood-* + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} + +jobs: + build: + name: Build + runs-on: github-ubuntu-latest-s + permissions: + contents: write + steps: + - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0 + with: + version: 2025.7.12 + tool_versions: | + maven: 3.9 + java: 17 + - run: + bash build.sh diff --git a/.github/workflows/pr-cleanup.yml b/.github/workflows/pr-cleanup.yml new file mode 100644 index 0000000..d06e792 --- /dev/null +++ b/.github/workflows/pr-cleanup.yml @@ -0,0 +1,11 @@ +name: Cleanup PR Resources +on: + pull_request: + types: [closed] +jobs: + cleanup: + runs-on: sonar-xs + permissions: + actions: write + steps: + - uses: SonarSource/ci-github-actions/pr_cleanup@v1 From acc2bc305deac5e3484ac17265124eff21a1b0d8 Mon Sep 17 00:00:00 2001 From: Nils Werner Date: Fri, 14 Nov 2025 12:05:25 +0100 Subject: [PATCH 2/3] Enhance workflow by adding source code checkout step and improving build script execution --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 553e008..9b290f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,11 +24,14 @@ jobs: permissions: contents: write steps: + - name: Checkout source code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0 with: version: 2025.7.12 tool_versions: | maven: 3.9 java: 17 - - run: - bash build.sh + - name: Run build script + run: + bash ./build.sh From 5695e08d0a3f89d90d0946c6a098fe94b06f9797 Mon Sep 17 00:00:00 2001 From: Nils Werner Date: Fri, 14 Nov 2025 13:20:23 +0100 Subject: [PATCH 3/3] Address review comments --- .github/workflows/pr-cleanup.yml | 2 +- build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-cleanup.yml b/.github/workflows/pr-cleanup.yml index d06e792..a05b2e5 100644 --- a/.github/workflows/pr-cleanup.yml +++ b/.github/workflows/pr-cleanup.yml @@ -4,7 +4,7 @@ on: types: [closed] jobs: cleanup: - runs-on: sonar-xs + runs-on: github-ubuntu-latest-s permissions: actions: write steps: diff --git a/build.sh b/build.sh index 1bdfb6f..f9f1043 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash RunMaven() { - typeset MAVEN_CMD="mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package" + typeset MAVEN_CMD="mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package --batch-mode" typeset RETURN_CODE echo $MAVEN_CMD