From 3fe13bfe2933ae5b3ba4eeca971ff964d5a45199 Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Mon, 21 Oct 2024 20:10:50 +0200 Subject: [PATCH 1/5] Fixed restarting --- .github/actions/benchexec-report/action.yml | 4 ++-- .github/workflows/check-copyright.yml | 2 +- .github/workflows/check-formatting.yml | 2 +- .github/workflows/check-version.yml | 2 +- .github/workflows/linux-build-test-deploy.yml | 2 +- .github/workflows/mac-build-test.yml | 2 +- .github/workflows/sonar.yml | 2 +- .github/workflows/win-build-test.yml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/benchexec-report/action.yml b/.github/actions/benchexec-report/action.yml index 2fc30c965c..ea031af136 100644 --- a/.github/actions/benchexec-report/action.yml +++ b/.github/actions/benchexec-report/action.yml @@ -48,7 +48,7 @@ runs: then printf "\n| $task | " >> $GITHUB_OUTPUT fi lasttask="$task" - printf " $emoji ($correct / $incorrect / $all) [HTML](https://theta.mit.bme.hu/benchmark-results/${{ github.head_ref }}/$i/$(ls *.html))/[CSV](https://theta.mit.bme.hu/benchmark-results/${{ github.head_ref }}/$i/$(ls *.csv)) | " >> $GITHUB_OUTPUT + printf " $emoji ($correct / $incorrect / $all) [HTML](https://theta.mit.bme.hu/benchmark-results/${{ github.ref }}/$i/$(ls *.html))/[CSV](https://theta.mit.bme.hu/benchmark-results/${{ github.ref }}/$i/$(ls *.csv)) | " >> $GITHUB_OUTPUT popd else rm -rf $i @@ -68,7 +68,7 @@ runs: with: branch: gh-pages folder: artifacts - target-folder: benchmark-results/${{ github.head_ref }}/ + target-folder: benchmark-results/${{ github.ref }}/ single-commit: true - name: Comment on PR if: github.event_name == 'pull_request' diff --git a/.github/workflows/check-copyright.yml b/.github/workflows/check-copyright.yml index c441a8d667..74e14ec9d1 100644 --- a/.github/workflows/check-copyright.yml +++ b/.github/workflows/check-copyright.yml @@ -7,7 +7,7 @@ on: permissions: write-all concurrency: - group: copyright-${{ github.head_ref }} + group: copyright-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index 213bdcb52d..92661091a4 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -7,7 +7,7 @@ on: permissions: write-all concurrency: - group: formatting-${{ github.head_ref }} + group: formatting-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/check-version.yml b/.github/workflows/check-version.yml index 343ed50f53..ac0484a98a 100644 --- a/.github/workflows/check-version.yml +++ b/.github/workflows/check-version.yml @@ -4,7 +4,7 @@ on: types: [opened, synchronize, reopened] concurrency: - group: version-${{ github.head_ref }} + group: version-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/linux-build-test-deploy.yml b/.github/workflows/linux-build-test-deploy.yml index 6d5b209e16..4c101aca95 100644 --- a/.github/workflows/linux-build-test-deploy.yml +++ b/.github/workflows/linux-build-test-deploy.yml @@ -13,7 +13,7 @@ on: permissions: write-all concurrency: - group: deploy-${{ github.head_ref }}-${{ github.event_name }} + group: deploy-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: diff --git a/.github/workflows/mac-build-test.yml b/.github/workflows/mac-build-test.yml index 4a0f2183b0..71994579a5 100644 --- a/.github/workflows/mac-build-test.yml +++ b/.github/workflows/mac-build-test.yml @@ -7,7 +7,7 @@ on: permissions: write-all concurrency: - group: mac-${{ github.head_ref }} + group: mac-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index c291bdc97c..c66a14c329 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -8,7 +8,7 @@ on: permissions: read-all concurrency: - group: sonar-${{ github.head_ref }} + group: sonar-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/win-build-test.yml b/.github/workflows/win-build-test.yml index 1288984285..7fc33a46f5 100644 --- a/.github/workflows/win-build-test.yml +++ b/.github/workflows/win-build-test.yml @@ -7,7 +7,7 @@ on: permissions: write-all concurrency: - group: win-${{ github.head_ref }} + group: win-${{ github.ref }} cancel-in-progress: true jobs: From 5b1b673cb4b559c1469ea0accfef94f51e9a109a Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Mon, 21 Oct 2024 20:16:47 +0200 Subject: [PATCH 2/5] Added PR comment --- .github/workflows/check-formatting.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index 92661091a4..3f7e3ccd91 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -16,5 +16,19 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Setup java 17 + uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0 + with: + distribution: temurin + java-version: 17 - name: Checking formatting - uses: ./.github/actions/check-formatting \ No newline at end of file + uses: ./.github/actions/check-formatting + - name: Comment + if: failure() && github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@dadb7667129e23f12ca3925c90dc5cd7121ab57e + continue-on-error: true # if we are in a fork, this will fail, but we don't care (tables will be missing) + with: + comment_tag: 'reformat' + mode: 'recreate' + message: | + :exclamation: Please run `./gradlew spotlessApply` on your branch to fix formatting. From 8e5e212fbaef88d485fb25c69cff583137cfa69b Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Mon, 21 Oct 2024 20:18:53 +0200 Subject: [PATCH 3/5] Added more PR comments --- .github/workflows/check-copyright.yml | 11 ++++++++++- .github/workflows/check-version.yml | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-copyright.yml b/.github/workflows/check-copyright.yml index 74e14ec9d1..0869284bdb 100644 --- a/.github/workflows/check-copyright.yml +++ b/.github/workflows/check-copyright.yml @@ -17,4 +17,13 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Check copyright - uses: ./.github/actions/check-copyright \ No newline at end of file + uses: ./.github/actions/check-copyright + - name: Comment + if: failure() && github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@dadb7667129e23f12ca3925c90dc5cd7121ab57e + continue-on-error: true # if we are in a fork, this will fail, but we don't care (tables will be missing) + with: + comment_tag: 'copyright' + mode: 'recreate' + message: | + :exclamation: Please run `./gradlew spotlessApply` on your branch to fix copyright headers. \ No newline at end of file diff --git a/.github/workflows/check-version.yml b/.github/workflows/check-version.yml index ac0484a98a..1546929f98 100644 --- a/.github/workflows/check-version.yml +++ b/.github/workflows/check-version.yml @@ -35,4 +35,13 @@ jobs: if: ${{ steps.new_version.outputs.version == steps.master_version.outputs.version }} run: | echo "New version ${{ steps.new_version.outputs.version }} is NOT OK" - exit 1 \ No newline at end of file + exit 1 + - name: Comment + if: failure() && github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@dadb7667129e23f12ca3925c90dc5cd7121ab57e + continue-on-error: true # if we are in a fork, this will fail, but we don't care (tables will be missing) + with: + comment_tag: 'version' + mode: 'recreate' + message: | + :exclamation: Please modify `build.gradle.kts` to contain a later version than ${{ steps.master_version.outputs.version }}. Current version is ${{ steps.new_version.outputs.version }}. \ No newline at end of file From d655fe082861cbb64fcf3f29c12d0dd81b6a1b2d Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Mon, 21 Oct 2024 20:32:55 +0200 Subject: [PATCH 4/5] Removing comment on fix --- .github/workflows/check-copyright.yml | 10 +++++++++- .github/workflows/check-formatting.yml | 8 ++++++++ .github/workflows/check-version.yml | 10 +++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-copyright.yml b/.github/workflows/check-copyright.yml index 0869284bdb..7eb1f23215 100644 --- a/.github/workflows/check-copyright.yml +++ b/.github/workflows/check-copyright.yml @@ -26,4 +26,12 @@ jobs: comment_tag: 'copyright' mode: 'recreate' message: | - :exclamation: Please run `./gradlew spotlessApply` on your branch to fix copyright headers. \ No newline at end of file + :exclamation: Please run `./gradlew spotlessApply` on your branch to fix copyright headers. + + - name: Delete Comment + if: github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@dadb7667129e23f12ca3925c90dc5cd7121ab57e + continue-on-error: true # if we are in a fork, this will fail, but we don't care (tables will be missing) + with: + comment_tag: 'copyright' + mode: 'delete' \ No newline at end of file diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index 3f7e3ccd91..02647f3a04 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -32,3 +32,11 @@ jobs: mode: 'recreate' message: | :exclamation: Please run `./gradlew spotlessApply` on your branch to fix formatting. + + - name: Delete Comment + if: github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@dadb7667129e23f12ca3925c90dc5cd7121ab57e + continue-on-error: true # if we are in a fork, this will fail, but we don't care (tables will be missing) + with: + comment_tag: 'reformat' + mode: 'delete' \ No newline at end of file diff --git a/.github/workflows/check-version.yml b/.github/workflows/check-version.yml index 1546929f98..83cbf94600 100644 --- a/.github/workflows/check-version.yml +++ b/.github/workflows/check-version.yml @@ -44,4 +44,12 @@ jobs: comment_tag: 'version' mode: 'recreate' message: | - :exclamation: Please modify `build.gradle.kts` to contain a later version than ${{ steps.master_version.outputs.version }}. Current version is ${{ steps.new_version.outputs.version }}. \ No newline at end of file + :exclamation: Please modify `build.gradle.kts` to contain a later version than ${{ steps.master_version.outputs.version }}. Current version is ${{ steps.new_version.outputs.version }}. + + - name: Delete Comment + if: github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@dadb7667129e23f12ca3925c90dc5cd7121ab57e + continue-on-error: true # if we are in a fork, this will fail, but we don't care (tables will be missing) + with: + comment_tag: 'version' + mode: 'delete' \ No newline at end of file From e0868af3e8115ba4dde05203cbbb6abec14f2007 Mon Sep 17 00:00:00 2001 From: "ThetaBotMaintainer[bot]" <139346997+ThetaBotMaintainer[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:48:47 +0000 Subject: [PATCH 5/5] Version bump --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4316bed633..b76fd9f7ff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,7 +29,7 @@ buildscript { allprojects { group = "hu.bme.mit.theta" - version = "6.6.2" + version = "6.6.3" apply(from = rootDir.resolve("gradle/shared-with-buildSrc/mirrors.gradle.kts")) }