Release v1.12.2 (#201) #154
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: Producer SDK Java CI with Maven | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
pull_request: | |
branches: | |
- develop | |
- master | |
jobs: | |
build: | |
strategy: | |
# Unit and integration tests are not thread safe as they all use the same stream names. | |
max-parallel: 1 | |
matrix: | |
os: [ macos-14, ubuntu-22.04, windows-2022 ] | |
java: [ 8, 11, 17, 21 ] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'adopt' | |
cache: maven | |
- name: Build with Maven | |
run: mvn clean compile assembly:single | |
- name: Run tests | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
mvn clean test -DargLine="-Daws.accessKeyId=${AWS_ACCESS_KEY_ID} -Daws.secretKey=${AWS_SECRET_ACCESS_KEY} -Daws.sessionToken=${AWS_SESSION_TOKEN} -Djava.library.path=src/main/resources/lib/ubuntu/ -Dlog4j.configurationFile=log4j2.xml" | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
mvn clean test -DargLine="-Daws.accessKeyId=${AWS_ACCESS_KEY_ID} -Daws.secretKey=${AWS_SECRET_ACCESS_KEY} -Daws.sessionToken=${AWS_SESSION_TOKEN} -Djava.library.path=src/main/resources/lib/windows/ -Dlog4j.configurationFile=log4j2.xml" | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
mvn clean test -DargLine="-Daws.accessKeyId=${AWS_ACCESS_KEY_ID} -Daws.secretKey=${AWS_SECRET_ACCESS_KEY} -Daws.sessionToken=${AWS_SESSION_TOKEN} -Djava.library.path=src/main/resources/lib/mac/ -Dlog4j.configurationFile=log4j2.xml" | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
shell: bash |