Skip to content

java darwin snippets #136

java darwin snippets

java darwin snippets #136

name: java darwin snippets
on:
pull_request:
schedule:
- cron: "15 7 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
java-darwin-snippets:
outputs:
status: ${{ job.status }}
permissions:
contents: read
pull-requests: write
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
java-version: ["17", "21"]
java-distribution: ["temurin"]
steps:
- name: checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
distribution: ${{ matrix.java-distribution }}
java-version: ${{ matrix.java-version }}
- name: install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v3
with:
senzingsdk-repository-path: ${{ secrets.SENZING_OSX_BETA_REPOSITORY }}
- name: configure environment
run: |
SENZING_PATH="${HOME}/senzing"
{
echo "SENZING_PATH=${SENZING_PATH}"
echo "DYLD_LIBRARY_PATH=${SENZING_PATH}/er/lib:${SENZING_PATH}/er/lib/macos"
} >> "$GITHUB_ENV"
- name: build with Maven
run: |
cd "${GITHUB_WORKSPACE}"/java
mvn clean install -Pcheckstyle,spotbugs -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: run java snippets
run: |
cd "${GITHUB_WORKSPACE}"/java
java -jar target/sz-sdk-snippets.jar all
slack-notification:
needs: [java-darwin-snippets]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.java-darwin-snippets.outputs.status ) && github.event_name == 'schedule' }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
with:
job-status: ${{ needs.java-darwin-snippets.outputs.status }}