-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add binary-compat and spotless, update workflows
- Loading branch information
1 parent
d50d573
commit 083342f
Showing
59 changed files
with
2,932 additions
and
673 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Code Quality | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
file-changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
any: ${{ steps.check.outputs.any_changed }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 0 | ||
- name: Get changed files | ||
id: check | ||
uses: tj-actions/changed-files@v23 | ||
with: | ||
files: | | ||
.github/workflows/code-quality.yml | ||
gradle/libs.versions.toml | ||
gradle/kotlin-js-store/** | ||
**/*.kt | ||
**/*.kts | ||
spotless: | ||
runs-on: ubuntu-latest | ||
needs: [ file-changes ] | ||
if: needs.file-changes.outputs.any == 'true' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Cache Build files | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle | ||
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }} | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Check spotless/ktlint rules | ||
with: | ||
arguments: spotlessCheck | ||
|
||
api-check: | ||
runs-on: ubuntu-latest | ||
needs: [ file-changes ] | ||
if: needs.file-changes.outputs.any == 'true' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Cache Build files | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle | ||
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }} | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Check public api compatibility | ||
with: | ||
arguments: apiCheck |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,24 +10,81 @@ env: | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }} | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypeStagingProfile: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPESTAGINGPROFILE }} | ||
|
||
jobs: | ||
file-changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
any: ${{ steps.check.outputs.any_changed }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 0 | ||
- name: Get changed files | ||
id: check | ||
uses: tj-actions/changed-files@v23 | ||
with: | ||
files: | | ||
.github/workflows/publish.yml | ||
gradle/libs.versions.toml | ||
gradle/kotlin-js-store/** | ||
**/*.kt | ||
**/*.kts | ||
publish: | ||
name: Publish to Maven | ||
runs-on: macos-latest | ||
needs: [ file-changes ] | ||
if: needs.file-changes.outputs.any == 'true' || startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Cache Build files | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.konan | ||
~/.gradle | ||
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }} | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Publish | ||
with: | ||
arguments: clean publish | ||
|
||
publish-docs: | ||
name: Publish KDoc to Github Pages | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Cache Build files | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.konan | ||
~/.gradle | ||
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }} | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Build Docs | ||
with: | ||
arguments: clean dokkaHtmlMultiModule | ||
|
||
- name: Publish Docs | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: docs | ||
folder: build/dokka/html | ||
single-commit: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
file-changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
any: ${{ steps.check.outputs.any_changed }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 0 | ||
- name: Get changed files | ||
id: check | ||
uses: tj-actions/changed-files@v23 | ||
with: | ||
files: | | ||
.github/workflows/tests.yml | ||
gradle/libs.versions.toml | ||
gradle/kotlin-js-store/** | ||
**/*.kt | ||
**/*.kts | ||
tests: | ||
strategy: | ||
matrix: | ||
os: [ macos-latest, ubuntu-latest, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
needs: [ file-changes ] | ||
if: needs.file-changes.outputs.any == 'true' | ||
steps: | ||
- run: sudo apt-get update --fix-missing && sudo apt-get install libcurl4-openssl-dev | ||
name: Install libcurl-dev | ||
if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||
|
||
- run: choco install curl | ||
name: Install curl | ||
if: ${{ startsWith(matrix.os, 'windows') }} | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Cache Build files | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.konan | ||
~/.gradle | ||
%USERPROFILE%\.gradle | ||
%USERPROFILE%\.konan | ||
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }} | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Test Apple Targets | ||
if: startsWith(matrix.os, 'macos') | ||
with: | ||
arguments: macosTest # iosTest tvosTest watchosX86Test | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Test Jvm Target | ||
if: startsWith(matrix.os, 'ubuntu') | ||
with: | ||
arguments: jvmTest | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Test Linux Target | ||
if: startsWith(matrix.os, 'ubuntu') | ||
with: | ||
arguments: linuxX64Test | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Test Js Targets | ||
if: startsWith(matrix.os, 'ubuntu') | ||
with: | ||
arguments: jsTest | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
name: Test Windows Target | ||
if: startsWith(matrix.os, 'windows') | ||
with: | ||
arguments: win64MainKlibrary | ||
|
||
- name: Publish Test Reports | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() | ||
with: | ||
report_paths: 'build/test-results/**/TEST-*.xml' | ||
|
||
- name: Archive test reports | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-reports | ||
path: build/reports/tests/**/** |
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
Oops, something went wrong.