Skip to content

Commit

Permalink
update build actions
Browse files Browse the repository at this point in the history
  • Loading branch information
icemachined committed Oct 26, 2023
1 parent b413602 commit dd0d0d1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- 'main1'
- 'main'

jobs:
build_and_test_with_code_coverage:
Expand All @@ -15,16 +15,15 @@ jobs:
os: [ ubuntu-20.04, windows-latest, macos-latest ]

steps:
# actions/checkout v1.* is needed for correct codecov upload, see https://github.com/actions/checkout/issues/237 for details
- uses: actions/checkout@v1
# ensure that gradle wrapper files in repository are valid by checking checksums
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 1.11
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Cache konan
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-konan
Expand All @@ -42,15 +41,14 @@ jobs:
if: ${{ runner.os == 'macOS' }}
run: |
brew install librdkafka
- name: Gradle build with remote cache
uses: burrunan/gradle-cache-action@v1
- name: Gradle build
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
cache-disabled: true
arguments: |
build
-x detekt
properties: |
org.gradle.caching=true
gradle-version: wrapper
- name: Upload gradle reports
if: ${{ always() }}
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: cleanup caches by a branch
on:
pull_request:
branches:
- 'main'
types:
- closed

jobs:
cleanup:
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run deteKT

on:
push:
branches: [ main1 ]
branches: [ main ]
pull_request:

jobs:
Expand All @@ -12,18 +12,17 @@ jobs:
GRADLE_OPTS: -Dorg.gradle.daemon=false

steps:
- uses: actions/checkout@v2.3.3
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 1.11
- name: Gradle build with remote cache
uses: burrunan/gradle-cache-action@v1
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Gradle build
uses: gradle/gradle-build-action@v2
with:
arguments: detektAll
properties: |
org.gradle.caching=true
gradle-version: wrapper
# additional files to calculate key for dependency cache
gradle-dependencies-cache-key: |
buildSrc/**/Versions.kt
cache-disabled: true
arguments: detektAll

17 changes: 10 additions & 7 deletions .github/workflows/diktat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run diKTat

on:
push:
branches: [ main1 ]
branches: [ main ]
pull_request:

jobs:
Expand All @@ -12,15 +12,18 @@ jobs:
GRADLE_OPTS: -Dorg.gradle.daemon=false

steps:
- uses: actions/checkout@v2.4.0
- name: Set up JDK 11
uses: actions/setup-java@v2
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- uses: gradle/gradle-build-action@v2
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Gradle build
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
cache-disabled: true
arguments: |
diktatCheck
-Pdiktat.githubActions=true
Expand Down

0 comments on commit dd0d0d1

Please sign in to comment.