forked from ZacSweers/redacted-compiler-plugin
-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (30 loc) · 1.36 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: CI
on: [push, pull_request]
jobs:
build:
name: Kotlin ${{ matrix.ci_kotlin_version }} | StringConcat ${{ matrix.ci_string_concat }}
runs-on: ubuntu-latest
strategy:
matrix:
ci_kotlin_version: ['1.5.31']
ci_string_concat: ['inline', 'indy', 'indy-with-constants']
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Install JDK ${{ matrix.ci_java_version }}
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: Build with Gradle
run: ./gradlew clean check --stacktrace -Pkotlin_version=${{ matrix.ci_kotlin_version }} -Pstring_concat=${{ matrix.ci_string_concat }}
- name: Reclaim memory
run: ./gradlew --stop && jps|grep -E 'KotlinCompileDaemon|GradleDaemon'| awk '{print $1}'| xargs kill -9 || true
- name: Upload snapshot (main only)
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SonatypeUsername }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SonatypePassword }}
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && matrix.ci_kotlin_version == '1.6.0-RC' && matrix.ci_string_concat == 'inline'
run: ./publish.sh --snapshot