2021-01-28 10:39:18 +08:00
name : Build
on : [ push, pull_request ]
jobs :
2021-12-19 01:29:37 +08:00
build-mirai :
runs-on : ${{ matrix.os }}
strategy :
fail-fast : false
matrix :
2021-12-22 02:59:29 +08:00
os : # mirai build requires a minimum system memory of 8 GB, while Windows and Ubuntu VMs provides only 7 GB. See https://github.com/mamoe/mirai/actions/runs/1608172113 for details.
# - windows-latest
2021-12-19 01:29:37 +08:00
- macos-11
2021-12-22 02:59:29 +08:00
# - ubuntu-latest
2021-01-28 10:39:18 +08:00
steps :
- uses : actions/checkout@v2
2021-01-30 20:34:55 +08:00
- name : Checkout submodules
2021-02-27 14:44:46 +08:00
run : git submodule update --init --recursive
2021-01-30 20:34:55 +08:00
2021-12-18 16:34:39 +08:00
- name : Setup JDK 11
uses : actions/setup-java@v2
2021-01-28 10:39:18 +08:00
with :
2021-12-18 16:34:39 +08:00
distribution : 'adopt'
java-version : '11'
2021-01-30 20:49:19 +08:00
- name : chmod -R 777 *
run : chmod -R 777 *
2021-01-28 10:39:18 +08:00
- name : Init gradle project
2021-02-09 21:58:27 +08:00
run : ./gradlew clean --scan
2021-01-30 20:49:19 +08:00
2021-01-28 10:39:18 +08:00
- name : Build all
2021-06-19 23:58:27 +08:00
run : ./gradlew assemble --scan
2021-01-30 20:49:19 +08:00
2021-01-28 10:39:18 +08:00
- name : All Tests
2021-05-31 16:14:51 +08:00
run : >
2021-06-19 23:58:27 +08:00
./gradlew check --scan
2021-12-19 02:06:35 +08:00
"-Dmirai.network.show.all.components=true"
"-Dkotlinx.coroutines.debug=on"
"-Dmirai.network.show.packet.details=true"
2021-12-04 23:43:09 +08:00
- name : Ensure KDoc valid
run : ./gradlew dokkaHtmlMultiModule
2022-03-22 23:28:38 +08:00
- name : Upload build artifacts
uses : ./.github/actions/upload-build-artifacts