From dae5d4dc35c0ff0e7ea9617f8b32bdc874feb4fb Mon Sep 17 00:00:00 2001 From: "Andy.Chen" Date: Tue, 4 Jun 2024 18:05:21 +0800 Subject: [PATCH 1/5] chore: optimized matrix ci --- .github/workflows/nightly-1.0-builds.yml | 145 ----------------------- .github/workflows/nightly-builds.yml | 15 ++- 2 files changed, 12 insertions(+), 148 deletions(-) delete mode 100644 .github/workflows/nightly-1.0-builds.yml diff --git a/.github/workflows/nightly-1.0-builds.yml b/.github/workflows/nightly-1.0-builds.yml deleted file mode 100644 index 7fcd1c88af0..00000000000 --- a/.github/workflows/nightly-1.0-builds.yml +++ /dev/null @@ -1,145 +0,0 @@ -name: Nightly Builds (1.0) - -on: - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - -permissions: {} - -jobs: - pekko-cluster-metrics-sigar: - name: Pekko Cluster Metrics Test with Sigar - runs-on: ubuntu-20.04 - if: github.repository == 'apache/pekko' - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - fetch-tags: true - ref: 1.0.x - - - name: Setup Java 11 - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 11 - - - name: Cache Coursier cache - uses: coursier/cache-action@v6 - - - name: Enable jvm-opts - run: cp .jvmopts-ci .jvmopts - - - name: sbt cluster-metrics/test - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - run: |- - sbt \ - -Djava.security.egd=file:/dev/./urandom \ - -Dpekko.test.sigar=true \ - -Dpekko.cluster.assert=on \ - -Dpekko.test.timefactor=2 \ - -Dpekko.actor.testkit.typed.timefactor=2 \ - -Dpekko.test.tags.exclude=gh-exclude,timing \ - -Dpekko.log.timestamps=true \ - -Dmultinode.XX:MetaspaceSize=128M \ - -Dmultinode.Xms256M \ - -Dmultinode.Xmx256M \ - -Dmultinode.Xlog:gc \ - -Dmultinode.XX:+AlwaysActAsServerClassMachine \ - clean cluster-metrics/test - - pekko-classic-remoting-tests: - name: Pekko Classic Remoting Tests - runs-on: ubuntu-20.04 - if: github.repository == 'apache/pekko' - strategy: - fail-fast: false - matrix: - command: - - cluster/test distributed-data/test cluster-tools/test cluster-metrics/test - - cluster-sharding/test - - cluster-typed/test cluster-sharding-typed/test - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves - fetch-depth: 0 - fetch-tags: true - ref: 1.0.x - - - name: Setup Java 11 - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 11 - - - name: Cache Coursier cache - uses: coursier/cache-action@v6 - - - name: Enable jvm-opts - run: cp .jvmopts-ci .jvmopts - - - name: sbt ${{ matrix.command }} - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - # note that this is not running any multi-jvm tests because multi-in-test=false - run: |- - sbt \ - -Djava.security.egd=file:/dev/./urandom \ - -Dpekko.remote.artery.enabled=off \ - -Dpekko.test.timefactor=2 \ - -Dpekko.actor.testkit.typed.timefactor=2 \ - -Dpekko.test.tags.exclude=gh-exclude,timing \ - -Dpekko.test.multi-in-test=false \ - -Dpekko.cluster.assert=on \ - clean ${{ matrix.command }} - - jdk-nightly-build: - name: JDK ${{ matrix.javaVersion }} / Scala ${{ matrix.scalaVersion }} - runs-on: ubuntu-20.04 - if: github.repository == 'apache/pekko' - strategy: - fail-fast: false - matrix: - # No need to specify the full Scala version. Only the Scala - # binary version is required and Pekko build will set the right - # full version from it. - scalaVersion: ["2.12.x", "2.13.x", "3.3.x"] - javaVersion: [8, 11, 17, 21] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - fetch-tags: true - ref: 1.0.x - - - name: Setup Java ${{ matrix.javaVersion }} - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: ${{ matrix.javaVersion }} - - - name: Cache Coursier cache - uses: coursier/cache-action@v6 - - - name: Enable jvm-opts - run: cp .jvmopts-ci .jvmopts - - - name: Compile and Test - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - # note that this is not running any multi-jvm tests because multi-in-test=false - run: |- - sbt \ - -Dpekko.cluster.assert=on \ - -Dpekko.log.timestamps=true \ - -Dpekko.test.timefactor=2 \ - -Dpekko.actor.testkit.typed.timefactor=2 \ - -Dpekko.test.tags.exclude=gh-exclude,timing \ - -Dpekko.test.multi-in-test=false \ - clean "++ ${{ matrix.scalaVersion }} test" checkTestsHaveRun diff --git a/.github/workflows/nightly-builds.yml b/.github/workflows/nightly-builds.yml index f04e9b80e30..36ec307945f 100644 --- a/.github/workflows/nightly-builds.yml +++ b/.github/workflows/nightly-builds.yml @@ -9,15 +9,20 @@ permissions: {} jobs: pekko-cluster-metrics-sigar: - name: Pekko Cluster Metrics Test with Sigar + name: Pekko Cluster Metrics Test with Sigar and Pekko ${{ matrix.pekkoVersion }} runs-on: ubuntu-20.04 if: github.repository == 'apache/pekko' + strategy: + fail-fast: false + matrix: + pekkoVersion: [ "main", "1.0.x" ] steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 fetch-tags: true + ref: ${{ matrix.pekkoVersion }} - name: Setup Java 11 uses: actions/setup-java@v4 @@ -61,7 +66,7 @@ jobs: # skip_publishing: true pekko-classic-remoting-tests: - name: Pekko Classic Remoting Tests + name: Pekko Classic Remoting Tests with Pekko ${{ matrix.pekkoVersion }} runs-on: ubuntu-20.04 if: github.repository == 'apache/pekko' strategy: @@ -71,6 +76,7 @@ jobs: - cluster/test distributed-data/test cluster-tools/test cluster-metrics/test - cluster-sharding/test - cluster-typed/test cluster-sharding-typed/test + pekkoVersion: [ "main", "1.0.x" ] steps: - name: Checkout uses: actions/checkout@v4 @@ -78,6 +84,7 @@ jobs: # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves fetch-depth: 0 fetch-tags: true + ref: ${{ matrix.pekkoVersion }} - name: Setup Java 11 uses: actions/setup-java@v4 @@ -107,7 +114,7 @@ jobs: clean ${{ matrix.command }} jdk-nightly-build: - name: JDK ${{ matrix.javaVersion }} / Scala ${{ matrix.scalaVersion }} + name: JDK ${{ matrix.javaVersion }} / Scala ${{ matrix.scalaVersion }} / Pekko ${{ matrix.pekkoVersion }} runs-on: ubuntu-20.04 if: github.repository == 'apache/pekko' strategy: @@ -118,6 +125,7 @@ jobs: # full version from it. scalaVersion: ["2.12.x", "2.13.x", "3.3.x"] javaVersion: [8, 11, 17, 21] + pekkoVersion: [ "main", "1.0.x" ] env: DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} steps: @@ -126,6 +134,7 @@ jobs: with: fetch-depth: 0 fetch-tags: true + ref: ${{ matrix.pekkoVersion }} - name: Setup Java ${{ matrix.javaVersion }} uses: actions/setup-java@v4 From 9bfa60de6ff575651cd90499d79621d965e132e3 Mon Sep 17 00:00:00 2001 From: "Andy.Chen" Date: Tue, 4 Jun 2024 18:16:40 +0800 Subject: [PATCH 2/5] trigger nightly build run immediately --- .github/workflows/nightly-builds.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly-builds.yml b/.github/workflows/nightly-builds.yml index 36ec307945f..cb845523b46 100644 --- a/.github/workflows/nightly-builds.yml +++ b/.github/workflows/nightly-builds.yml @@ -1,9 +1,8 @@ name: Nightly Builds on: - schedule: - - cron: "0 0 * * *" - workflow_dispatch: + pull_request: + branches: ['**'] permissions: {} From ca45919be6152c1dbd42e7ac3bccb43f8a24b3c3 Mon Sep 17 00:00:00 2001 From: "Andy.Chen" Date: Tue, 4 Jun 2024 18:32:18 +0800 Subject: [PATCH 3/5] disable dependWalkerCheck on 1.0.x --- .github/workflows/nightly-builds.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nightly-builds.yml b/.github/workflows/nightly-builds.yml index cb845523b46..1e760efbd42 100644 --- a/.github/workflows/nightly-builds.yml +++ b/.github/workflows/nightly-builds.yml @@ -148,6 +148,7 @@ jobs: run: cp .jvmopts-ci .jvmopts - name: Check if the dependency task in the built correctly + if: ${{ matrix.pekkoVersion != '1.0.x' }} run: sbt dependWalkerCheck - name: Compile and Test From ae09956d36dfa168d9cc9e9971ec0b621dc94053 Mon Sep 17 00:00:00 2001 From: "Andy.Chen" Date: Tue, 4 Jun 2024 21:24:09 +0800 Subject: [PATCH 4/5] disable jdk9 check too --- .github/workflows/nightly-builds.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-builds.yml b/.github/workflows/nightly-builds.yml index 1e760efbd42..038cb4e7d27 100644 --- a/.github/workflows/nightly-builds.yml +++ b/.github/workflows/nightly-builds.yml @@ -200,7 +200,7 @@ jobs: "++ ${{ matrix.scalaVersion }} ;publishLocal;publishM2" - name: Install scala-cli - if: ${{ matrix.javaVersion == 11 }} + if: ${{ matrix.javaVersion == 11 && matrix.pekkoVersion != '1.0.x'}} run: |- curl -sS "https://virtuslab.github.io/scala-cli-packages/KEY.gpg" | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/scala-cli.gpg 2>/dev/null sudo curl -s --compressed -o /etc/apt/sources.list.d/scala_cli_packages.list "https://virtuslab.github.io/scala-cli-packages/debian/scala_cli_packages.list" @@ -208,7 +208,7 @@ jobs: sudo apt install scala-cli - name: Use Scala-CLI to verify jdk 9 classes - if: ${{ matrix.javaVersion == 11 }} + if: ${{ matrix.javaVersion == 11 && matrix.pekkoVersion != '1.0.x'}} run: |- chmod +x .github/workflows/verify-jdk9-classes.sh .github/workflows/verify-jdk9-classes.sh From 2d2fe79c0748056898b7478b93d1ebae03a0eecf Mon Sep 17 00:00:00 2001 From: "Andy.Chen" Date: Tue, 4 Jun 2024 21:28:05 +0800 Subject: [PATCH 5/5] nightly publish --- .github/workflows/publish-1.0-nightly.yml | 70 ----------------------- .github/workflows/publish-nightly.yml | 12 ++-- 2 files changed, 8 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/publish-1.0-nightly.yml diff --git a/.github/workflows/publish-1.0-nightly.yml b/.github/workflows/publish-1.0-nightly.yml deleted file mode 100644 index 6f2f8ec7d5d..00000000000 --- a/.github/workflows/publish-1.0-nightly.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Based on Apache Arrow's java-nightly workflow -# https://github.com/apache/arrow/blob/master/.github/workflows/java_nightly.yml -name: Publish nightly 1.0 snapshots - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" - -permissions: - contents: read - -jobs: - publish-nightly: - name: Publish 1.0 nightly - runs-on: ubuntu-20.04 - if: github.repository == 'apache/pekko' - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - fetch-tags: true - ref: 1.0.x - - - name: Setup Java 11 - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 11 - - - name: Cache Coursier cache - uses: coursier/cache-action@v6 - - - name: Install Graphviz - run: |- - sudo apt-get install graphviz - - - name: Report MIMA incompatibility issues - run: |- - sbt +mimaReportBinaryIssues - - - name: Publish to Apache Maven repo - env: - NEXUS_USER: ${{ secrets.NEXUS_USER }} - NEXUS_PW: ${{ secrets.NEXUS_PW }} - run: sbt +publish - - - name: Build Documentation - run: |- - sbt -Dpekko.genjavadoc.enabled=true -Dpekko.genlicensereport.enabled=true docs/paradox unidoc diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml index 327147726e8..51a783ace5d 100644 --- a/.github/workflows/publish-nightly.yml +++ b/.github/workflows/publish-nightly.yml @@ -20,18 +20,21 @@ name: Publish nightly snapshots and documentation on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" + pull_request: + branches: ['**'] permissions: contents: read jobs: publish-nightly: - name: Publish nightly + name: Publish nightly on ${{ matrix.pekkoVersion }} runs-on: ubuntu-20.04 if: github.repository == 'apache/pekko' + strategy: + fail-fast: false + matrix: + pekkoVersion: [ "main", "1.0.x" ] env: DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} steps: @@ -40,6 +43,7 @@ jobs: with: fetch-depth: 0 fetch-tags: true + ref: ${{ matrix.pekkoVersion }} - name: Setup Java 11 uses: actions/setup-java@v4