Skip to content

Commit

Permalink
Use JDK 11 for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlatemp committed Dec 18, 2021
1 parent 92465c3 commit 6f55816
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 40 deletions.
36 changes: 5 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,20 @@ name: Build
on: [ push, pull_request ]

jobs:
build-mirai-core:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: chmod -R 777 *
run: chmod -R 777 *

- name: Init gradle project
run: ./gradlew clean --scan

- name: Build mirai-core series
run: ./gradlew assemble --scan

- name: mirai-core Tests
run: >
./gradlew check --scan
-Dmirai.network.show.all.components=true
-Dkotlinx.coroutines.debug=on
-Dmirai.network.show.packet.details=true
build-all:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: 'adopt'
java-version: '11'

- name: chmod -R 777 *
run: chmod -R 777 *
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: 'adopt'
java-version: '11'

- name: chmod -R 777 *
run: chmod -R 777 *
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
- name: Checkout submodules
run: git submodule update --init --recursive

- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: 'adopt'
java-version: '11'

- name: chmod -R 777 *
run: chmod -R 777 *
Expand Down
5 changes: 5 additions & 0 deletions buildSrc/src/main/kotlin/ProjectConfigure.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ fun Project.configureJvmTarget() {
extensions.findByType(JavaPluginExtension::class.java)?.run {
sourceCompatibility = defaultVer
targetCompatibility = defaultVer

if (project.path.endsWith("mirai-console-intellij")) {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

kotlinTargets.orEmpty().filterIsInstance<KotlinJvmTarget>().forEach { target ->
Expand Down

0 comments on commit 6f55816

Please sign in to comment.