Skip to content

Commit 509b18e

Browse files
authored
add job to publish 2.0 docs and add note about agrona (#2567)
1 parent 2968fc6 commit 509b18e

File tree

2 files changed

+104
-1
lines changed

2 files changed

+104
-1
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Based on Apache Arrow's java-nightly workflow
19+
# https://github.com/apache/arrow/blob/master/.github/workflows/java_nightly.yml
20+
name: Publish 2.0 documentation
21+
22+
on:
23+
workflow_dispatch:
24+
25+
permissions:
26+
contents: read
27+
28+
jobs:
29+
publish:
30+
name: Publish 2.0 docs
31+
runs-on: ubuntu-22.04
32+
if: github.repository == 'apache/pekko'
33+
steps:
34+
# TODO we will need to change to use a release tag in future
35+
- name: Checkout
36+
uses: actions/[email protected]
37+
with:
38+
fetch-depth: 0
39+
fetch-tags: true
40+
persist-credentials: false
41+
42+
- name: Setup Java 11
43+
uses: actions/setup-java@v5
44+
with:
45+
distribution: temurin
46+
java-version: 11
47+
48+
- name: Install sbt
49+
uses: sbt/setup-sbt@3e125ece5c3e5248e18da9ed8d2cce3d335ec8dd # v1.1.14
50+
51+
- name: Cache Coursier cache
52+
uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433 # 6.4.8
53+
54+
- name: Install Graphviz
55+
run: |-
56+
sudo apt-get install graphviz
57+
58+
# TODO come up with a better way to control the version, possibly based on git tags
59+
- name: Build Documentation
60+
env:
61+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
62+
run: |-
63+
sbt -Dpekko.genjavadoc.enabled=true "set ThisBuild / version := \"2.0.0-M1\"; docs/paradox; unidoc"
64+
65+
# Create directory structure upfront since rsync does not create intermediate directories otherwise
66+
- name: Create directory structure
67+
run: |-
68+
mkdir -p target/nightly-docs/docs/pekko/2.0.0-M1/
69+
mkdir -p target/nightly-docs/docs/pekko/2.0/
70+
cp -r docs/target/paradox/site/main/ target/nightly-docs/docs/pekko/2.0.0-M1/docs
71+
cp -r docs/target/paradox/site/main/ target/nightly-docs/docs/pekko/2.0/docs
72+
rm -r docs/target/paradox/site/main/
73+
cp -r target/scala-2.13/unidoc target/nightly-docs/docs/pekko/2.0.0-M1/api
74+
cp -r target/scala-2.13/unidoc target/nightly-docs/docs/pekko/2.0/api
75+
rm -r target/scala-2.13/unidoc
76+
cp -r target/javaunidoc target/nightly-docs/docs/pekko/2.0.0-M1/japi
77+
cp -r target/javaunidoc target/nightly-docs/docs/pekko/2.0/japi
78+
rm -r target/javaunidoc
79+
80+
- name: Upload docs patch version
81+
uses: ./.github/actions/sync-nightlies
82+
with:
83+
upload: true
84+
switches: --archive --compress --update --delete --progress --relative
85+
local_path: target/nightly-docs/./docs/pekko/2.0.0-M1 # The intermediate dot is to show `--relative` which paths to operate on
86+
remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/pekko
87+
remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
88+
remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
89+
remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
90+
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
91+
92+
- name: Upload docs api version
93+
uses: ./.github/actions/sync-nightlies
94+
with:
95+
upload: true
96+
switches: --archive --compress --update --delete --progress --relative
97+
local_path: target/nightly-docs/./docs/pekko/2.0 # The intermediate dot is to show `--relative` which paths to operate on
98+
remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/pekko
99+
remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
100+
remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
101+
remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
102+
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}

project/JdkOptions.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ object JdkOptions extends AutoPlugin {
2626
val targetJavaVersion = "17"
2727

2828
lazy val versionSpecificJavaOptions =
29-
// for virtual threads
29+
// for Agrona UnsafeApi and virtual threads
3030
"--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED" ::
31+
// for virtual threads
3132
"--add-opens=java.base/java.lang=ALL-UNNAMED" ::
3233
// for aeron
3334
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED" ::

0 commit comments

Comments
 (0)