Simplify thrifty-gradle-plugin config DSL (#11) #123
This file contains 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: Pre-merge checks | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build and test (OS ${{ matrix.os }}, JDK ${{ matrix.jvm-version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
jvm-version: [21] | |
os: [ubuntu-latest, macos-latest] | |
env: | |
JDK_VERSION: ${{ matrix.jvm-version }} | |
GRADLE_OPTS: -Dorg.gradle.daemon=false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 # set to a value > 1 to support codecov.io SHA detection | |
- name: Cache Gradle folders | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.konan/ | |
key: cache-gradle-${{ matrix.os }}-${{ matrix.jvm-version }}-${{ hashFiles('settings.gradle') }}-${{ hashFiles('**/build.gradle') }} | |
restore-keys: | | |
cache-gradle-${{ matrix.os }}-${{ matrix.jvm-version }}-${{ hashFiles('settings.gradle') }} | |
cache-gradle-${{ matrix.os }}-${{ matrix.jvm-version }} | |
- name: Ensure all code files have license headers | |
if: matrix.os == 'ubuntu-latest' && matrix.jvm-version == '21' | |
shell: bash | |
run: | | |
./script/ensure_license_headers.sh | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.jvm-version }} | |
distribution: zulu | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
# Only save Gradle User Home state for builds on the 'master' branch. | |
cache-read-only: ${{ github.ref != 'refs/heads/master' }} | |
# Don't reuse cache entries from any other Job. | |
gradle-home-cache-strict-match: true | |
- name: Build and test | |
shell: bash | |
run: ./gradlew check codeCoverageReport --parallel --no-daemon | |
# - name: Boot simulator | |
# if: matrix.os == 'macos-13' | |
# shell: bash | |
# run: xcrun simctl boot 'iPhone 14 Pro Max' || true | |
# | |
# - name: Run simulator tests | |
# if: matrix.os == 'macos-13' | |
# shell: bash | |
# run: ./gradlew iosTest | |
- name: Upload coverage stats | |
if: success() && matrix.os == 'ubuntu-latest' && matrix.jvm-version == '17' | |
uses: codecov/codecov-action@v3 |