Skip to content

Commit

Permalink
Run -PkotlinDev build as a separate workflow job in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski committed Jul 16, 2023
1 parent 664af9e commit 414b307
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/pull-request-with-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,44 @@ env:
ORG_GRADLE_PROJECT_signingKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
CLI_TEST_MAX_DURATION_IN_SECONDS: 10

# Note that all "jobs" (build, tests) including "jobs.build.runs-on" should be kept in sync with "pull-request-without-code"
# Note that all "jobs" (build, tests) including "jobs.*.runs-on" should be kept in sync with "pull-request-without-code"
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: "[build] OS: ${{ matrix.os }}"
name: "[build] OS=${{ matrix.os }} Kotlin=stable"
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/setup-gradle-build

- name: Build with release Kotlin version
run: ./gradlew build ktlintCheck --no-configuration-cache
run: ./gradlew ktlintCheck build

build-dev:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: "[build] OS=${{ matrix.os }}, Kotlin=dev"
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/setup-gradle-build

- name: Build with assemble Kotlin version
run: ./gradlew -PkotlinDev build ktlintCheck --no-configuration-cache
run: ./gradlew -PkotlinDev ktlintCheck build

tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
jdk: [ 8, 11, 17 ] # list of Java versions to run tests against (excluding `java-compilation` version for which tests already have run during `build` job)
jdk: [8, 11, 17] # list of Java versions to run tests against (excluding `java-compilation` version for which tests already have run during `build` job)
runs-on: ${{ matrix.os }}
name: "[tests] OS: ${{ matrix.os }}, Java: ${{ matrix.jdk }}"
name: "[tests] OS=${{ matrix.os }}, Java=${{ matrix.jdk }}"
steps:
- uses: actions/checkout@v3

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/pull-request-without-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@ on:
- '!**/*.toml'

# Add a dummy job that return true so that a PR not containing any code can be merged to master
# Note that all "jobs" (build, tests) including "jobs.build.runs-on" should be kept in sync with "pull-request-with-code"
# Note that all "jobs" (build, tests) including "jobs.*.runs-on" should be kept in sync with "pull-request-with-code"
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: "[build] OS: ${{ matrix.os }}"
name: "[build] OS=${{ matrix.os }} Kotlin=stable"
steps:
- run: 'echo "No build required"'

build-dev:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: "[build] OS=${{ matrix.os }}, Kotlin=dev"
steps:
- run: 'echo "No build required"'

Expand All @@ -36,6 +45,6 @@ jobs:
os: [ubuntu-latest, windows-latest]
jdk: [ 8, 11, 17 ]
runs-on: ${{ matrix.os }}
name: "[tests] OS: ${{ matrix.os }}, Java: ${{ matrix.jdk }}"
name: "[tests] OS=${{ matrix.os }}, Java=${{ matrix.jdk }}"
steps:
- run: 'echo "No build required"'

0 comments on commit 414b307

Please sign in to comment.