Use JDK 11 for CI

This commit is contained in:
Karlatemp 2021-12-18 16:34:39 +08:00
parent 92465c3213
commit 6f55816b08
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8
4 changed files with 18 additions and 40 deletions

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 ->