remove javahome-env-javadoc maven profile (#138) #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PostGIS Java CI | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-codebase: | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
jdk_version: [8.0.422-zulu, 11.0.24-zulu, 17.0.12-zulu, 21.0.4-zulu] | |
maven_version: [3.9.8] | |
include: | |
- os: ubuntu-24.04 | |
jdk_version: 8.0.422-zulu | |
zulu_version: 8.80.0.17 | |
maven_version: 3.9.8 | |
maven_deploy: true | |
docker_build: true | |
maven_docker_container_image_repo: luminositylabs | |
maven_docker_container_image_name: maven | |
maven_docker_container_image_tag: 3.9.8_openjdk-8u422_zulu-alpine-8.80.0.17 | |
name: Build on OS ${{ matrix.os }} with Maven ${{ matrix.maven_version }} using JDK ${{ matrix.jdk_version }} | |
runs-on: ${{ matrix.os }} | |
env: | |
MAVEN_PROPS: -Djavadoc.path=`which javadoc` | |
PROFILES: gpg,release-sign-artifacts,sonatype-deployment,sonatype-snapshots,sonatype-staging,sonatype-releases | |
SETTINGS: .github/settings.xml | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Install GPG and generate test key | |
run: .github/install-gpg.sh | |
- name: Install SDKMAN and java environment | |
run: | | |
.github/install-sdkman.sh ${{ matrix.jdk_version }} ${{ matrix.maven_version }} | |
echo "SDKMAN_DIR=${HOME}/.sdkman" >> $GITHUB_ENV | |
- name: Add SDKMAN candidate environment variables | |
run: | | |
echo "JAVA_HOME=${SDKMAN_DIR}/candidates/java/current" >> $GITHUB_ENV | |
echo "MAVEN_HOME=${SDKMAN_DIR}/candidates/maven/current" >> $GITHUB_ENV | |
- name: Add SDKMAN candidate paths to system path | |
run: | | |
echo "${JAVA_HOME}/bin" >> $GITHUB_PATH | |
echo "${MAVEN_HOME}/bin" >> $GITHUB_PATH | |
- name: Setup Maven repository cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: m2repo | |
with: | |
path: ~/.m2/repository | |
key: ${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ env.cache-name }}- | |
- name: Log github.ref | |
run: echo "${{ github.ref }}" | |
- name: List Maven repositories | |
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} dependency:list-repositories | |
- name: Show Maven dependency tree | |
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} dependency:tree | |
- name: Show Maven active profiles | |
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} help:active-profiles | |
- name: Show Maven effective POM | |
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} help:effective-pom | |
- name: Maven build/test | |
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} clean install | |
- name: Maven generate site | |
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} site site:stage | |
- name: Maven deploy | |
if: ${{ matrix.maven_deploy && (github.ref == 'refs/heads/main') && (github.event_name != 'pull_request') }} | |
env: | |
OSSRHU: ${{ secrets.OSSRHU }} | |
OSSRHT: ${{ secrets.OSSRHT }} | |
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} deploy | |
- name: Docker maven build | |
if: ${{ matrix.docker_build }} | |
env: | |
CBD: /usr/src/build | |
P: luminositylabs-oss | |
run: docker container run --rm -i -v "$(pwd)":"${CBD}" -v ${HOME}/.gnupg:/root/.gnupg -v ${P}-${{ matrix.maven_docker_container_image_tag }}-mvn-repo:/root/.m2 -w "${CBD}" ${{ matrix.maven_docker_container_image_repo }}/${{ matrix.maven_docker_container_image_name }}:${{ matrix.maven_docker_container_image_tag }} mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} -Djavadoc.path=/usr/bin/javadoc -Dmaven.integration.test.skip=true dependency:list-repositories dependency:tree help:active-profiles clean install site site:stage |