Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop -> Main #31

Merged
merged 16 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://EditorConfig.org
# EditorConfig is awesome: https://EditorConfig.org

root = true

Expand All @@ -18,6 +18,12 @@ ij_kotlin_name_count_to_use_star_import_for_members = 99999
ij_java_names_count_to_use_import_on_demand = 99999

ktlint_code_style = ktlint_official
ktlint_experimental = disabled
ktlint_standard_filename = disabled

ktlint_standard_annotation = disabled
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_function_signature_body_expression_wrapping = default
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_string-template-indent = disabled
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 4

42 changes: 0 additions & 42 deletions .github/workflows/CI.yaml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Linux

on:
workflow_call:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"

steps:
- uses: actions/checkout@v4

- name: JDK setup
uses: actions/setup-java@v4
with:
java-version: 17
distribution: corretto

- name: Cache
uses: actions/cache@v4
with:
path: |
./build
./.gradle
~/.gradle/caches
~/.gradle/wrapper
~/.m2/repository
~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Tests
run: ./gradlew allTest --parallel --no-daemon --stacktrace

- name: Lint and Static analysis
run: ./gradlew detekt ktlintCheck --no-daemon --stacktrace

- name: Validate api compatibility
run: ./gradlew apiCheck --no-daemon --stacktrace

- name: Build Artifacts
run: ./gradlew publishToMavenLocal

58 changes: 58 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build macOS

on:
workflow_call:
workflow_dispatch:

jobs:
build:
runs-on: macos-latest

env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"

steps:
- uses: actions/checkout@v4

- name: JDK setup
uses: actions/setup-java@v4
with:
java-version: 17
distribution: corretto

- name: Cache
uses: actions/cache@v4
with:
path: |
./build
./.gradle
~/.gradle/caches
~/.gradle/wrapper
~/.m2/repository
~/.konan

key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Tests
run: ./gradlew allTests -x tvosSimulatorArm64Test -x watchosSimulatorArm64Test

- name: Validate api compatibility
run: ./gradlew apiCheck --no-daemon --stacktrace

- name: Mac build
run: |
./gradlew \
publishIosArm64PublicationToMavenLocal \
publishIosSimulatorArm64PublicationToMavenLocal \
publishIosX64PublicationToMavenLocal \
publishMacosX64PublicationToMavenLocal \
publishMacosArm64PublicationToMavenLocal \
publishWatchosArm64PublicationToMavenLocal \
publishWatchosArm32PublicationToMavenLocal \
publishWatchosSimulatorArm64PublicationToMavenLocal \
publishTvosArm64PublicationToMavenLocal \
publishTvosSimulatorArm64PublicationToMavenLocal \
publishTvosX64PublicationToMavenLocal \
--no-daemon --stacktrace
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
push:
branches: [ "main", "develop" ]
paths-ignore:
- "**/*.md"
pull_request:
branches: [ "main", "develop" ]
paths-ignore:
- "**/*.md"
workflow_call:

permissions:
contents: read

jobs:
build-linux:
name: Build Linux
uses: ./.github/workflows/build-linux.yml

build-macos:
name: Build macOS
uses: ./.github/workflows/build-macos.yml

36 changes: 19 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@ jobs:
matrix:
os: [ 'macos-latest' ]
runs-on: ${{ matrix.os }}
env:
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}

outputs:
VERSION_NAME: ${{ steps.extract_version_name.outputs.VERSION_NAME }}

steps:
- uses: actions/checkout@v3

- name: "Setup: Buildless"
uses: buildless/[email protected]

- name: Set up JDK 17
uses: actions/setup-java@v3
- name: JDK setup
uses: actions/setup-java@v4
with:
java-version: |
11
17
distribution: 'temurin'
cache: gradle
java-version: 17
distribution: corretto

- name: Setup Gradle
uses: gradle/[email protected]

- name: Checkout Gradle Build Cache
uses: actions/cache@v3
- name: Cache
uses: actions/cache@v4
with:
path: |
./build
./.gradle
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
~/.m2/repository
~/.konan

key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Validate api compatibility
run: ./gradlew apiCheck --no-daemon --stacktrace

- name: Get version name
id: extract_version_name
run: |
Expand All @@ -68,15 +68,17 @@ jobs:
needs: [ release_artifacts ]
name: Create Release
runs-on: ubuntu-latest
if: ${{ !endsWith(needs.release_artifacts.outputs.VERSION_NAME,'SNAPSHOT') }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Extract release notes
id: release_notes
uses: ffurrer2/extract-release-notes@v1
with:
prerelease: ${{ contains(needs.release_artifacts.outputs.VERSION_NAME,'alpha') || contains(needs.release_artifacts.outputs.VERSION_NAME,'beta') }}

- name: Create release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(needs.release_artifacts.outputs.VERSION_NAME,'alpha') || contains(needs.release_artifacts.outputs.VERSION_NAME,'beta') }}
body: ${{ steps.release_notes.outputs.release_notes }}
Loading