mirai/.github/workflows/build.yml

47 lines
1.2 KiB
YAML
Raw Normal View History

2021-01-28 10:39:18 +08:00
name: Build
on: [ push, pull_request ]
jobs:
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
- 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
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
run: ./gradlew clean --scan
2021-01-30 20:49:19 +08:00
2021-01-28 10:39:18 +08:00
- name: Build all
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: >
./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"
- 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