Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd940bc0 authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Update jobs, dependencies, speed up with configuration cache

parent 285af62f
Loading
Loading
Loading
Loading
+24 −11
Original line number Diff line number Diff line
@@ -2,25 +2,38 @@ name: Build KDoc
on:
  push:
    branches: [main]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  build:
    name: Build and publish KDoc
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v2
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: 17
      - uses: gradle/gradle-build-action@v2

      - name: Build KDoc
        run: ./gradlew --no-daemon dokkaHtml
      - name: Publish KDoc
        if: success()
        uses: crazy-max/ghaction-github-pages@v2
        run: ./gradlew --no-daemon --no-configuration-cache dokkaHtml

      - uses: actions/upload-pages-artifact@v1
        with:
          target_branch: gh-pages
          build_dir: build/dokka/html
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          path: build/dokka/html

  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1
+2 −14
Original line number Diff line number Diff line
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
@@ -37,12 +26,11 @@ jobs:
    steps:
    - name: Checkout repository
      uses: actions/checkout@v3
    - uses: actions/setup-java@v2
    - uses: actions/setup-java@v3
      with:
        distribution: temurin
        java-version: 17
        cache: gradle
    - uses: gradle/wrapper-validation-action@v1
    - uses: gradle/gradle-build-action@v2

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v2
+6 −4
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@ jobs:
    name: Tests without emulator
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v2
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: 17
@@ -16,6 +16,7 @@ jobs:
        run: ./gradlew --no-daemon check
      - name: Archive results
        uses: actions/upload-artifact@v2
        if: always()
        with:
          name: test-results
          path: |
@@ -29,8 +30,8 @@ jobs:
      matrix:
        api-level: [ 31 ]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v2
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: 17
@@ -74,6 +75,7 @@ jobs:

      - name: Archive results
        uses: actions/upload-artifact@v2
        if: always()
        with:
          name: test-results
          path: |
+2 −2
Original line number Diff line number Diff line
buildscript {
    ext.versions = [
        kotlin: '1.8.20',
        kotlin: '1.8.21',
        dokka: '1.8.10',
        // latest Apache Commons versions that don't require Java 8 (Android 7)
        commonsIO: '2.6',
@@ -13,7 +13,7 @@ buildscript {
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.0.0'
        classpath 'com.android.tools.build:gradle:8.0.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
        classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
    }
+9 −1
Original line number Diff line number Diff line
org.gradle.jvmargs=-Xmx1536M
# [https://developer.android.com/build/optimize-your-build#optimize]
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=512m
org.gradle.parallel=true

# configuration cache [https://developer.android.com/build/optimize-your-build#use-the-configuration-cache-experimental]
org.gradle.unsafe.configuration-cache=true
org.gradle.unsafe.configuration-cache-problems=warn

# Android
android.useAndroidX=true
Loading