From 7ba202b81af261d2e1f9be2e42316e69583770ed Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 7 Mar 2024 18:22:53 -0500 Subject: [PATCH] run codeql on main at midnight, collect gradle args into env Signed-off-by: Justin Florentine --- .github/workflows/artifacts.yml | 4 +++- .github/workflows/codeql.yml | 6 ++++-- .github/workflows/develop.yml | 4 +++- .github/workflows/docker.yml | 1 - .github/workflows/integration-tests.yml | 4 ++-- .github/workflows/reference-tests.yml | 4 ++-- gradle.properties | 1 - 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 38f20b8f663..060fcd735d2 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -5,6 +5,8 @@ on: release: types: - prereleased +env: + GRADLE_OPTS: "-Dorg.gradle.parallel=true -Dorg.gradle.caching=true" jobs: artifacts: @@ -23,7 +25,7 @@ jobs: uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: assemble release run: - ./gradlew -Prelease.releaseVersion=${{github.ref_name}} -Pversion=${{github.ref_name}} assemble -Dorg.gradle.parallel=true -Dorg.gradle.caching=true + ./gradlew -Prelease.releaseVersion=${{github.ref_name}} -Pversion=${{github.ref_name}} assemble - name: hashes id: hashes run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 821310ef13f..55a2a9b2feb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,8 +13,10 @@ name: "CodeQL" on: workflow_dispatch: - push: - branches: [ main ] + schedule: + # * is a special character in YAML so you have to quote this string + # expression evaluates to midnight every night + - cron: '0 0 * * *' jobs: analyze: diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 2cbaaca0a0a..fa432caa41c 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -5,6 +5,8 @@ on: push: -branches: - main +env: + GRADLE_OPTS: "-Dorg.gradle.parallel=true -Dorg.gradle.caching=true" jobs: artifacts: @@ -23,7 +25,7 @@ jobs: uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: assemble release run: - ./gradlew assemble -Dorg.gradle.parallel=true -Dorg.gradle.caching=true + ./gradlew assemble - name: upload tarball uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 with: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index db347248b0a..8889b0dc7ad 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,6 +1,5 @@ name: docker on: - workflow_dispatch: release: types: - prereleased diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 169c4ef7c5a..a0ba6c0c802 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true env: - GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" + GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true -Dorg.gradle.caching=true" jobs: integration-tests: @@ -33,7 +33,7 @@ jobs: - name: setup gradle uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: run integration tests - run: ./gradlew integrationTest compileJmh -Dorg.gradle.parallel=true -Dorg.gradle.caching=true + run: ./gradlew integrationTest compileJmh - name: Publish Test Report uses: mikepenz/action-junit-report@5f47764eec0e1c1f19f40c8e60a5ba47e47015c5 if: (success() || failure()) diff --git a/.github/workflows/reference-tests.yml b/.github/workflows/reference-tests.yml index 59d429d4488..36fe41a3b53 100644 --- a/.github/workflows/reference-tests.yml +++ b/.github/workflows/reference-tests.yml @@ -7,7 +7,7 @@ on: - release-* env: - GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" + GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true -Dorg.gradle.caching=true" total-runners: 10 concurrency: @@ -54,7 +54,7 @@ jobs: - name: refTestArgs.txt run: cat refTestArgs.txt - name: run reference tests - run: ./gradlew ethereum:referenceTests:referenceTests `cat refTestArgs.txt` -Dorg.gradle.parallel=true -Dorg.gradle.caching=true + run: ./gradlew ethereum:referenceTests:referenceTests `cat refTestArgs.txt` - name: Upload Test Report uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 if: always() # always run even if the previous step fails diff --git a/gradle.properties b/gradle.properties index 684efa87413..cc51c2b730f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,6 @@ version=24.2.0-SNAPSHOT org.gradle.welcome=never # Set exports/opens flags required by Google Java Format and ErrorProne plugins. (JEP-396) org.gradle.jvmargs=-Xmx4g \ --XX:MaxMetaspaceSize=256m \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \