Skip to content

Commit

Permalink
Actually generate javadoc on latest JDK version (#1442)
Browse files Browse the repository at this point in the history
We need to pass `-Pcom.ibm.wala.jdk-version` in the
`generate-latest-docs.sh` script.

Attempted to test locally, but the real test will be when this lands.
  • Loading branch information
msridhar authored Sep 19, 2024
1 parent 81149df commit 1ed4799
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,20 @@ jobs:
needs: build_gradle
if: github.event_name == 'push' && github.repository == 'wala/WALA' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
env:
JDK_VERSION: 23
steps:
- name: 'Check out repository'
uses: actions/checkout@v4
- name: Cache Goomph
uses: actions/cache@v4
with:
path: ~/.goomph
key: ${{ runner.os }}-goomph-${{ hashFiles('build.gradle') }}
restore-keys: ${{ runner.os }}-goomph-
- name: 'Set up JDK 21'
- name: 'Set up JDK'
uses: actions/setup-java@v4
with:
java-version: 21
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: 'Generate latest docs'
env:
GITHUB_TOKEN: ${{ secrets.WALA_BOT_GH_TOKEN }}
run: ./generate-latest-docs.sh
run: ./generate-latest-docs.sh ${{ env.JDK_VERSION }}

9 changes: 8 additions & 1 deletion generate-latest-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@

echo -e "Publishing docs...\n"

if [ $# -eq 0 ]; then
echo "No JDK version provided. Usage: $0 <JDK_VERSION>"
exit 1
fi

JDK_VERSION=$1

JAVADOC_DIR=$HOME/wala-javadoc

git clone --quiet --filter=tree:0 https://x-access-token:"${GITHUB_TOKEN}"@github.com/wala/javadoc "$JAVADOC_DIR" > /dev/null
Expand All @@ -26,7 +33,7 @@ git clone --quiet --filter=tree:0 https://x-access-token:"${GITHUB_TOKEN}"@githu
rm -rf ./*
)

./gradlew aggregatedJavadocs --no-configuration-cache
./gradlew aggregatedJavadocs --no-configuration-cache "-Pcom.ibm.wala.jdk-version=$JDK_VERSION"
rsync -a build/docs/javadoc/ "${JAVADOC_DIR}"

cd "$JAVADOC_DIR"
Expand Down

0 comments on commit 1ed4799

Please sign in to comment.