mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 07:59:21 +08:00
* Update to KSP 1.0.1 and use new jvm modifiers resolver API
This allows us to fully support transient across compilation boundaries
* Copy in KSP-supported KCT for now
* Update CI refs
* Move up transient check to the right place
Wasn't actually looking at the added annotation later 🤧
* Try regular RC?
* Skip that matrix for now
59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
name: 'Kotlin ${{ matrix.kotlin-version }} | Test Mode ${{ matrix.kotlin-test-mode }}'
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
kotlin-version: [ '1.5.31', '1.6.0-RC' ]
|
|
# TODO add back KSP 1.6.0-1.0.1 once it's out
|
|
ksp-version: [ '1.5.31-1.0.1' ]
|
|
kotlin-test-mode: [ 'REFLECT', 'KSP', 'KAPT' ]
|
|
exclude:
|
|
# - kotlin-version: '1.5.31'
|
|
# ksp-version: '1.6.0-RC-1.0.1-RC'
|
|
- kotlin-version: '1.6.0-RC'
|
|
ksp-version: '1.5.31-1.0.1'
|
|
|
|
env:
|
|
MOSHI_KOTLIN_VERSION: '${{ matrix.kotlin-version }}'
|
|
MOSHI_KSP_VERSION: '${{ matrix.ksp-version }}'
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Validate Gradle Wrapper
|
|
uses: gradle/wrapper-validation-action@v1
|
|
|
|
- name: Generate cache key
|
|
run: ./.github/workflows/checksum.sh checksum.txt
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Configure JDK
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
|
|
- name: Test
|
|
run: ./gradlew build check --stacktrace -PkotlinTestMode=${{ matrix.kotlin-test-mode }} -PkotlinVersion=${{ matrix.kotlin-version }}
|
|
|
|
- name: Publish (default branch only)
|
|
if: github.repository == 'square/moshi' && github.ref == 'refs/heads/master' && matrix.kotlin-version == '1.5.31' && matrix.kotlin-test-mode == 'reflect'
|
|
run: ./gradlew publish
|
|
env:
|
|
ORG_GRADLE_PROJECT_mavenCentralUsername: '${{ secrets.SONATYPE_NEXUS_USERNAME }}'
|
|
ORG_GRADLE_PROJECT_mavenCentralPassword: '${{ secrets.SONATYPE_NEXUS_PASSWORD }}'
|