Skip to content

Commit

Permalink
CI: build javadoc in gitlab ci
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Feb 19, 2024
1 parent b90d6fd commit d3cf350
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,42 @@ test:ant:
- merge_requests
- tags

test:javadoc:
stage: test
image: debian:unstable-slim
variables:
SCALA: https://downloads.lightbend.com/scala/2.12.13/scala-2.12.13.deb
LIBPREFIX: /usr/share/scala/lib
LIB_SCALATEST: https://repo1.maven.org/maven2/org/scalatest/scalatest_2.12/3.0.4/scalatest_2.12-3.0.4.jar
LIB_SCALACTIC: https://repo1.maven.org/maven2/org/scalactic/scalactic_2.12/3.0.4/scalactic_2.12-3.0.4.jar
before_script:
# Fix bug installing openjdk-11-jdk-headless's manuals
- mkdir -p /usr/share/man/man1/
- apt-get update -q
- apt-get install -y wget gettext
ant openjdk-21-jdk-headless
libmockito-java libhamcrest-java junit4
# Install specific version of scala
- wget -qO scala.deb "${SCALA}"
- dpkg -i scala.deb
# link to the scala libs with the name `ant test` expects
- ln -s "${LIBPREFIX}/scala-xml_2.12-1.0.6.jar" "${LIBPREFIX}/scala-xml.jar"
# Download required scala libs
- wget -qO "${LIBPREFIX}/scalactic.jar" "${LIB_SCALACTIC}"
- wget -qO "${LIBPREFIX}/scalatest.jar" "${LIB_SCALATEST}"
# Point ant to the right directories
- echo scalatest.libs=/usr/share/scala/lib > override.properties
- echo junit.home=/usr/share/java >> override.properties
- echo hamcrest.home=/usr/share/java >> override.properties
- echo mockito.home=/usr/share/java >> override.properties
- echo build.built-by=GitHub Actions >> override.properties
script:
- ant javadoc
only:
- master
- merge_requests
- tags

# Make sure we can build a docker image
# It's cached for later jobs
build_docker:
Expand Down

0 comments on commit d3cf350

Please sign in to comment.