|
| 1 | +on: |
| 2 | + workflow_dispatch: |
| 3 | + pull_request: |
| 4 | + paths: |
| 5 | + - 'native-compression/libblosc2-jna/**' |
| 6 | + - 'native-compression/libblosc2-native/**' |
| 7 | + - 'test-native-compression-blosc2.yml' |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
| 12 | +jobs: |
| 13 | + tests: |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + os: [ |
| 17 | + ubuntu-24.04, |
| 18 | + ubuntu-24.04-arm, |
| 19 | + windows-2022, |
| 20 | + macos-14, |
| 21 | + macos-15, |
| 22 | + macos-15-intel |
| 23 | + ] |
| 24 | + name: netCDF-Java Native Compression Tests (blosc2) |
| 25 | + runs-on: ${{ matrix.os }} |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v6 |
| 28 | + - name: Setup JDK 8, 17 |
| 29 | + if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15-intel' }} |
| 30 | + uses: actions/setup-java@v5 |
| 31 | + with: |
| 32 | + distribution: 'temurin' |
| 33 | + java-version: | |
| 34 | + 8 |
| 35 | + 17 |
| 36 | + - name: Setup JDK 21 |
| 37 | + if: ${{ matrix.os != 'ubuntu-24.04' && matrix.os != 'macos-15-intel' }} |
| 38 | + uses: actions/setup-java@v5 |
| 39 | + with: |
| 40 | + distribution: 'temurin' |
| 41 | + java-version: '21' |
| 42 | + - name: Cache Gradle packages |
| 43 | + uses: actions/cache@v5 |
| 44 | + with: |
| 45 | + path: | |
| 46 | + ~/.gradle/caches |
| 47 | + ~/.gradle/wrapper |
| 48 | + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} |
| 49 | + restore-keys: | |
| 50 | + ${{ runner.os }}-gradle- |
| 51 | + - name: Run libblosc2 JNA tests |
| 52 | + if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15-intel' }} |
| 53 | + run: ./gradlew -Dorg.gradle.java.installations.auto-detect=true clean :libblosc2-jna:test |
| 54 | + env: |
| 55 | + JDK8: /usr/thredds-test-environment/temurin8 |
| 56 | + - name: Run libblosc2 JNA tests (JDK 21 tests) |
| 57 | + if: ${{ matrix.os != 'ubuntu-24.04' && matrix.os != 'macos-15-intel' }} |
| 58 | + run: ./gradlew clean :libblosc2-jna:test21 |
| 59 | + - uses: actions/upload-artifact@v6 |
| 60 | + if: failure() |
| 61 | + with: |
| 62 | + name: NativeCompression_JUnit_Results_${{ github.sha }}_-${{ matrix.os }} |
| 63 | + path: native-compression/libblosc2-jna/build/reports/tests |
0 commit comments