Skip to content

Commit 7bd67d6

Browse files
committed
[CI] install Scala CLI using Github Action
try to pin scala in scala-cli more hacking Update VerifyJDK9Classes.scala Update verify-jdk9-classes.sh update
1 parent b731dfd commit 7bd67d6

12 files changed

+27
-65
lines changed

Diff for: .github/workflows/binary-compatibility-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
check-binary-compatibility:
3232
name: Check / Binary Compatibility
3333
runs-on: ubuntu-22.04
34-
if: github.repository == 'apache/pekko'
34+
if: github.repository == 'xapache/pekko'
3535
strategy:
3636
fail-fast: false
3737
env:

Diff for: .github/workflows/build-test-prValidation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
pekko-classic-remoting-tests:
114114
name: Pekko Classic Remoting Tests
115115
runs-on: ubuntu-22.04
116-
if: github.repository == 'apache/pekko'
116+
if: github.repository == 'xapache/pekko'
117117
strategy:
118118
fail-fast: false
119119
matrix:

Diff for: .github/workflows/dependency-graph.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
dependency-graph:
2828
name: Update Dependency Graph
2929
runs-on: ubuntu-latest
30-
if: github.repository == 'apache/pekko'
30+
if: github.repository == 'xapache/pekko'
3131
permissions:
3232
# The API requires write permission on the repository
3333
# to submit dependencies

Diff for: .github/workflows/generate-doc-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
generate-doc-check:
2828
name: Generate doc check
2929
runs-on: ubuntu-22.04
30-
if: github.repository == 'apache/pekko'
30+
if: github.repository == 'xapache/pekko'
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4

Diff for: .github/workflows/link-validator.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
jobs:
1919
validate-links:
2020
runs-on: ubuntu-22.04
21-
if: github.repository == 'apache/pekko'
21+
if: github.repository == 'xapache/pekko'
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4

Diff for: .github/workflows/nightly-1.0-builds.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
pekko-cluster-metrics-sigar:
2020
name: Pekko Cluster Metrics Test with Sigar
2121
runs-on: ubuntu-22.04
22-
if: github.repository == 'apache/pekko'
22+
if: github.repository == 'xapache/pekko'
2323
steps:
2424
- name: Checkout
2525
uses: actions/checkout@v4
@@ -65,7 +65,7 @@ jobs:
6565
pekko-classic-remoting-tests:
6666
name: Pekko Classic Remoting Tests
6767
runs-on: ubuntu-22.04
68-
if: github.repository == 'apache/pekko'
68+
if: github.repository == 'xapache/pekko'
6969
strategy:
7070
fail-fast: false
7171
matrix:
@@ -115,7 +115,7 @@ jobs:
115115
jdk-nightly-build:
116116
name: JDK ${{ matrix.javaVersion }} / Scala ${{ matrix.scalaVersion }}
117117
runs-on: ubuntu-22.04
118-
if: github.repository == 'apache/pekko'
118+
if: github.repository == 'xapache/pekko'
119119
strategy:
120120
fail-fast: false
121121
matrix:

Diff for: .github/workflows/nightly-1.1-builds.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
pekko-cluster-metrics-sigar:
2020
name: Pekko Cluster Metrics Test with Sigar
2121
runs-on: ubuntu-22.04
22-
if: github.repository == 'apache/pekko'
22+
if: github.repository == 'xapache/pekko'
2323
steps:
2424
- name: Checkout
2525
uses: actions/checkout@v4
@@ -66,7 +66,7 @@ jobs:
6666
pekko-classic-remoting-tests:
6767
name: Pekko Classic Remoting Tests
6868
runs-on: ubuntu-22.04
69-
if: github.repository == 'apache/pekko'
69+
if: github.repository == 'xapache/pekko'
7070
strategy:
7171
fail-fast: false
7272
matrix:
@@ -117,7 +117,7 @@ jobs:
117117
jdk-nightly-build:
118118
name: JDK ${{ matrix.javaVersion }} / Scala ${{ matrix.scalaVersion }}
119119
runs-on: ubuntu-22.04
120-
if: github.repository == 'apache/pekko'
120+
if: github.repository == 'xapache/pekko'
121121
strategy:
122122
fail-fast: false
123123
matrix:

Diff for: .github/workflows/nightly-builds-aeron.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
pekko-artery-aeron-tests:
2121
name: Pekko Artery Aeron Tests
2222
runs-on: ubuntu-22.04
23-
if: github.repository == 'apache/pekko'
23+
if: github.repository == 'xapache/pekko'
2424
strategy:
2525
fail-fast: false
2626
matrix:

Diff for: .github/workflows/nightly-builds.yml

+6-44
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Nightly Builds
33
on:
44
schedule:
55
- cron: "0 0 * * *"
6+
pull_request:
67
workflow_dispatch:
78

89
permissions: {}
@@ -11,7 +12,7 @@ jobs:
1112
pekko-cluster-metrics-sigar:
1213
name: Pekko Cluster Metrics Test with Sigar
1314
runs-on: ubuntu-22.04
14-
if: github.repository == 'apache/pekko'
15+
if: github.repository == 'xapache/pekko'
1516
steps:
1617
- name: Checkout
1718
uses: actions/checkout@v4
@@ -67,7 +68,7 @@ jobs:
6768
pekko-classic-remoting-tests:
6869
name: Pekko Classic Remoting Tests
6970
runs-on: ubuntu-22.04
70-
if: github.repository == 'apache/pekko'
71+
if: github.repository == 'xapache/pekko'
7172
strategy:
7273
fail-fast: false
7374
matrix:
@@ -124,8 +125,8 @@ jobs:
124125
# No need to specify the full Scala version. Only the Scala
125126
# binary version is required and Pekko build will set the right
126127
# full version from it.
127-
scalaVersion: ["2.12.x", "2.13.x", "3.3.x"]
128-
javaVersion: [8, 11, 17, 21]
128+
scalaVersion: ["3.3.x"]
129+
javaVersion: [11]
129130
env:
130131
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
131132
steps:
@@ -153,46 +154,6 @@ jobs:
153154
- name: Check if the dependency task in the built correctly
154155
run: sbt dependWalkerCheck
155156

156-
- name: Compile and Test
157-
# note that this is not running any multi-jvm tests because multi-in-test=false
158-
run: |-
159-
sbt \
160-
-Dpekko.cluster.assert=on \
161-
-Dpekko.log.timestamps=true \
162-
-Dpekko.test.timefactor=2 \
163-
-Dpekko.actor.testkit.typed.timefactor=2 \
164-
-Dpekko.test.tags.exclude=gh-exclude,timing \
165-
-Dpekko.test.multi-in-test=false \
166-
-Dio.netty.leakDetection.level=PARANOID \
167-
clean "++ ${{ matrix.scalaVersion }} test" checkTestsHaveRun
168-
169-
# comment out test report until an apache or GitHub published action (action-surefire-report) can be found or added allowlist from INFRA
170-
# - name: Test Reports
171-
# # Makes it easier to spot failures instead of looking at the logs.
172-
# if: ${{ failure() }}
173-
# uses: marcospereira/action-surefire-report@v1
174-
# with:
175-
# report_paths: '**/target/test-reports/TEST-*.xml'
176-
# fail_if_no_tests: false
177-
178-
# # Archive test results so we can do some diagnostics later
179-
# - name: Upload test results
180-
# uses: actions/upload-artifact@v2
181-
# if: success() || failure() # run this step even if previous step failed
182-
# with:
183-
# name: test-results-${{ matrix.javaVersion }}-${{ matrix.scalaVersion }}
184-
# path: '**/target/test-reports/TEST-*.xml'
185-
186-
- name: Docs
187-
# Docs generation requires JDK 11.
188-
if: ${{ matrix.javaVersion == 11 }}
189-
run: |-
190-
sudo apt-get install graphviz
191-
# genjavadoc does not support Scala 3.x
192-
sbt \
193-
-Dpekko.genjavadoc.enabled=${{ !startsWith(matrix.scalaVersion, '3') }} \
194-
"++ ${{ matrix.scalaVersion }} doc"
195-
196157
- name: Publish
197158
# Publish (osgi bundle) not working with JDK 17, issue #31132
198159
if: ${{ matrix.javaVersion == 11 }}
@@ -204,6 +165,7 @@ jobs:
204165
205166
- name: Install scala-cli
206167
if: ${{ matrix.javaVersion == 11 }}
168+
# uses: VirtusLab/scala-cli-setup@v1
207169
run: |-
208170
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
209171
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"

Diff for: .github/workflows/scala3-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
test:
3535
name: Test
3636
runs-on: ubuntu-22.04
37-
if: github.repository == 'apache/pekko'
37+
if: github.repository == 'xapache/pekko'
3838
strategy:
3939
fail-fast: true
4040
steps:

Diff for: .github/workflows/verify-jdk9-classes.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919

20-
echo "Checking Scala CLI version..."
21-
scala-cli --version
22-
2320
echo "Starting verification with Scala-CLI..."
2421

2522
for file in stream/target/scala-cli/*.sc; do
23+
cat $file
2624
echo "Starting verification for with file: $file."
2725
if scala-cli "$file" ; then
2826
echo "Verification successful for $file."

Diff for: project/VerifyJDK9Classes.scala

+7-5
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ object VerifyJDK9Classes {
2929

3030
def generateAndWriteScalaCLIScript(dir: SettingKey[File]): Def.Initialize[Task[Seq[sbt.File]]] =
3131
Def.task[Seq[File]] {
32-
val binaryVersion = scalaBinaryVersion.value
33-
val script = generateScalaCLIScript(version.value, binaryVersion)
34-
val file = dir.value / "scala-cli" / s"VerifyJDK9Classes-${binaryVersion}.sc"
32+
val scalaVer = scalaVersion.value
33+
val script = generateScalaCLIScript(version.value, scalaVer)
34+
val file = dir.value / "scala-cli" / s"VerifyJDK9Classes-${scalaVer}.sc"
3535
val content = script.stripMargin.format(version.value)
3636
if (!file.exists || IO.read(file) != content) IO.write(file, content)
3737
// the generated file is not used.
@@ -40,6 +40,9 @@ object VerifyJDK9Classes {
4040

4141
private def generateScalaCLIScript(version: String, scalaBinaryVersion: String): String =
4242
s"""
43+
|//> using scala ${scalaBinaryVersion}
44+
|//> using dep "org.apache.pekko::pekko-stream:${version}"
45+
|
4346
|/*
4447
| * Licensed to the Apache Software Foundation (ASF) under one or more
4548
| * contributor license agreements. See the NOTICE file distributed with
@@ -56,8 +59,7 @@ object VerifyJDK9Classes {
5659
| * See the License for the specific language governing permissions and
5760
| * limitations under the License.
5861
| */
59-
|//> using scala ${scalaBinaryVersion}
60-
|//> using dep "org.apache.pekko::pekko-stream:${version}"
62+
|
6163
|object VerifyJDK9Classes {
6264
| def main(args: Array[String]): Unit = {
6365
| import org.apache.pekko.actor.ActorSystem

0 commit comments

Comments
 (0)