|
| 1 | +name: "Lib: sentry-kotlin-multiplatform" |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + - release/** |
| 7 | + pull_request: |
| 8 | + paths-ignore: |
| 9 | + - "**/*.md" |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + build-apple: |
| 17 | + runs-on: macos-latest-large |
| 18 | + |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: JDK setup |
| 23 | + uses: actions/setup-java@v3 |
| 24 | + with: |
| 25 | + java-version: 17 |
| 26 | + distribution: temurin |
| 27 | + |
| 28 | + - name: Cached Konan |
| 29 | + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 #v3 |
| 30 | + with: |
| 31 | + path: ~/.konan |
| 32 | + key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} |
| 33 | + restore-keys: ${{ runner.os }}-konan- |
| 34 | + |
| 35 | + - name: Cached Gradle |
| 36 | + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a |
| 37 | + |
| 38 | + - name: Apple build |
| 39 | + run: | |
| 40 | + ./scripts/build-apple.sh sentry-kotlin-multiplatform |
| 41 | + env: |
| 42 | + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
| 43 | + |
| 44 | + build-apple-samples: |
| 45 | + runs-on: macos-latest-large |
| 46 | + |
| 47 | + steps: |
| 48 | + - uses: actions/checkout@v4 |
| 49 | + |
| 50 | + - name: JDK setup |
| 51 | + uses: actions/setup-java@v3 |
| 52 | + with: |
| 53 | + java-version: 17 |
| 54 | + distribution: temurin |
| 55 | + |
| 56 | + - name: Cached Konan |
| 57 | + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 #v3 |
| 58 | + with: |
| 59 | + path: ~/.konan |
| 60 | + key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} |
| 61 | + restore-keys: ${{ runner.os }}-konan- |
| 62 | + |
| 63 | + - name: Cached Gradle |
| 64 | + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a |
| 65 | + |
| 66 | + - name: Apple build |
| 67 | + run: | |
| 68 | + make buildAppleSamples |
| 69 | +
|
| 70 | + build-jvm: |
| 71 | + runs-on: ubuntu-latest |
| 72 | + |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v4 |
| 75 | + |
| 76 | + - name: JDK setup |
| 77 | + uses: actions/setup-java@v3 |
| 78 | + with: |
| 79 | + java-version: 17 |
| 80 | + distribution: temurin |
| 81 | + |
| 82 | + - name: Cached Gradle |
| 83 | + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a |
| 84 | + |
| 85 | + - name: JVM build |
| 86 | + run: | |
| 87 | + ./scripts/build-jvm.sh sentry-kotlin-multiplatform |
| 88 | + make createCoverageReports |
| 89 | + env: |
| 90 | + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
| 91 | + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g" |
| 92 | + |
| 93 | + # Kover coverage currently only works for JVM |
| 94 | + - name: Upload coverage to Codecov |
| 95 | + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@v3 |
| 96 | + with: |
| 97 | + name: sentry-kotlin-multiplatform |
| 98 | + |
| 99 | + archive-distribution: |
| 100 | + runs-on: macos-latest-large |
| 101 | + |
| 102 | + steps: |
| 103 | + - uses: actions/checkout@v4 |
| 104 | + |
| 105 | + - name: JDK setup |
| 106 | + uses: actions/setup-java@v3 |
| 107 | + with: |
| 108 | + java-version: 17 |
| 109 | + distribution: temurin |
| 110 | + |
| 111 | + - name: Cached Gradle |
| 112 | + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a |
| 113 | + |
| 114 | + - name: DistZip |
| 115 | + run: | |
| 116 | + ./scripts/build-distribution.sh sentry-kotlin-multiplatform |
| 117 | +
|
| 118 | + - name: Archive packages |
| 119 | + uses: actions/upload-artifact@v3 |
| 120 | + with: |
| 121 | + name: ${{ github.sha }} |
| 122 | + if-no-files-found: error |
| 123 | + path: | |
| 124 | + ./*/build/distributions/*.zip |
0 commit comments