Update Multik version to 0.3.0 (#303) #46
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: Build & Test | |
| on: | |
| push: | |
| branches: [ develop ] | |
| pull_request: | |
| branches: [ develop ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: read | |
| jobs: | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect multik-openblas changes | |
| uses: dorny/paths-filter@v3 | |
| id: changes | |
| if: github.event_name != 'workflow_dispatch' | |
| with: | |
| filters: | | |
| openblas: | |
| - 'multik-openblas/**' | |
| - 'buildSrc/src/main/kotlin/multik.cmake-build.gradle.kts' | |
| - name: Setup JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| # ── Full build (openblas changed or manual trigger) ── | |
| - name: Cache OpenBLAS native build | |
| if: steps.changes.outputs.openblas == 'true' || github.event_name == 'workflow_dispatch' | |
| uses: actions/cache@v5 | |
| with: | |
| path: multik-openblas/build/cmake-build | |
| key: openblas-${{ runner.os }}-${{ hashFiles('multik-openblas/multik_jni/CMakeLists.txt', 'multik-openblas/multik_jni/src/**') }} | |
| restore-keys: | | |
| openblas-${{ runner.os }}-${{ hashFiles('multik-openblas/multik_jni/CMakeLists.txt') }} | |
| openblas-${{ runner.os }}- | |
| - name: Build OpenBLAS native library | |
| if: steps.changes.outputs.openblas == 'true' || github.event_name == 'workflow_dispatch' | |
| run: ./gradlew :multik-openblas:build_cmake | |
| - name: Assemble all modules | |
| if: steps.changes.outputs.openblas == 'true' || github.event_name == 'workflow_dispatch' | |
| run: ./gradlew assemble | |
| - name: Run all tests | |
| if: steps.changes.outputs.openblas == 'true' || github.event_name == 'workflow_dispatch' | |
| run: ./gradlew check | |
| # ── Partial build (openblas unchanged) ── | |
| - name: Build and test multik-core and multik-kotlin | |
| if: steps.changes.outputs.openblas == 'false' | |
| run: ./gradlew :multik-core:build :multik-kotlin:build | |
| - name: Build multik-openblas and multik-default (JVM only) | |
| if: steps.changes.outputs.openblas == 'false' | |
| run: > | |
| ./gradlew | |
| :multik-openblas:compileKotlinJvm | |
| :multik-default:compileKotlinJvm | |
| -x :multik-openblas:copyNativeLibs | |
| -x :multik-openblas:build_cmake | |
| -x :multik-openblas:compileCmake | |
| -x :multik-openblas:configureCmake | |
| -x :multik-openblas:createBuildDir | |
| # ── Reports ── | |
| - name: Test report | |
| if: always() | |
| uses: mikepenz/action-junit-report@v5 | |
| with: | |
| report_paths: '**/build/test-results/**/TEST-*.xml' | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-reports | |
| path: '**/build/reports/tests/' | |
| retention-days: 14 |