Continuous Integration (Low Cadence) #1467
This file contains hidden or 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: Continuous Integration (Low Cadence) | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: run-slow-tests | |
| schedule: | |
| - cron: '0 0,12 * * *' | |
| push: | |
| branches: | |
| - master | |
| - 'release/**' | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: | |
| - master | |
| - 'release/**' | |
| concurrency: | |
| group: ci-low-cadence-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name != 'schedule' }} | |
| env: | |
| GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail' | |
| JAVA_VERSION: '17' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Java ${{ matrix.java }} (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 180 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [ '17', '21', '25' ] | |
| os: ['ubuntu-24.04', 'windows-latest', 'macos-15'] | |
| steps: | |
| - name: Use faster temporary storage (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo "TMP=$env:RUNNER_TEMP" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| echo "TEMP=$env:RUNNER_TEMP" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.sha }} | |
| - name: Setup java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: ${{ matrix.java }} | |
| - name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Linux/macOS) | |
| if: runner.os == 'Linux' || runner.os == 'macOS' | |
| run: | | |
| java -Xinternalversion | |
| echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV | |
| echo "BUILD_JAVA_VERSION=${{ matrix.java }}" >> $GITHUB_ENV | |
| - name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| java -Xinternalversion | |
| echo "BUILD_JAVA_HOME=$env:JAVA_HOME" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| echo "BUILD_JAVA_VERSION=${{ matrix.java }}" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Setup java to run Gradle script | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Build with Gradle | |
| run: ./gradlew clean build :agrona-concurrency-tests:concurrencyTests | |
| - name: Copy test logs | |
| id: copy_test_logs | |
| if: failure() | |
| run: | | |
| ${{ runner.os == 'Windows' && 'echo "file=build/distributions/test_logs.tbz2" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append' || 'echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT' }} | |
| ./gradlew tarTestLogs | |
| - name: Upload crash logs | |
| if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: crash-logs-${{ matrix.os }}-java-${{ matrix.java }} | |
| path: ${{ steps.copy_test_logs.outputs.file }} | |
| ea-build: | |
| name: Java ${{ matrix.java }} (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 180 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [ '26-ea', '27-ea' ] | |
| os: ['ubuntu-24.04', 'windows-latest'] | |
| steps: | |
| - name: Use faster temporary storage (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo "TMP=$env:RUNNER_TEMP" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| echo "TEMP=$env:RUNNER_TEMP" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.sha }} | |
| - name: Setup java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| - name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Linux/macOS) | |
| if: runner.os == 'Linux' || runner.os == 'macOS' | |
| run: | | |
| java -Xinternalversion | |
| echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV | |
| echo "BUILD_JAVA_VERSION=${{ matrix.java }}" >> $GITHUB_ENV | |
| - name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| java -Xinternalversion | |
| echo "BUILD_JAVA_HOME=$env:JAVA_HOME" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| echo "BUILD_JAVA_VERSION=${{ matrix.java }}" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Setup java to run Gradle script | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Build with Gradle | |
| run: ./gradlew clean build :agrona-concurrency-tests:concurrencyTests | |
| - name: Copy test logs | |
| id: copy_test_logs | |
| if: failure() | |
| run: | | |
| ${{ runner.os == 'Windows' && 'echo "file=build/distributions/test_logs.tbz2" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append' || 'echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT' }} | |
| ./gradlew tarTestLogs | |
| - name: Upload crash logs | |
| if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: crash-logs-ea-${{ matrix.os }}-java-${{ matrix.java }} | |
| path: ${{ steps.copy_test_logs.outputs.file }} |