diff --git a/.github/workflows/all-build.yml b/.github/workflows/all-build.yml deleted file mode 100644 index b23b98b9b..000000000 --- a/.github/workflows/all-build.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: All Build - -on: [ push, pull_request ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: textbook/git-checkout-submodule-action@2.1.1 - with: - remote: true - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: chmod +x gradlew - run: chmod +x gradlew - - name: Init gradle project - run: ./gradlew clean - - name: Build all - run: ./gradlew assemble - - name: All Tests - run: ./gradlew check diff --git a/.github/workflows/bintray.yml b/.github/workflows/bintray.yml index 4136bd984..e4cfe3365 100644 --- a/.github/workflows/bintray.yml +++ b/.github/workflows/bintray.yml @@ -14,10 +14,12 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - build: + publish-mirai: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + submodules: recursive - name: Check keys run: > diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..4659e827a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: Build + +on: [ push, pull_request ] + +jobs: + build-mirai-core: + + 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 +x gradlew + run: chmod +x gradlew + - name: Init gradle project + run: ./gradlew clean + - name: Build mirai-core series + run: ./gradlew assemble + - name: mirai-core Tests + run: ./gradlew check + + build-all: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: chmod +x gradlew + run: chmod +x gradlew + - name: Init gradle project + run: ./gradlew clean + - name: Build all + run: ./gradlew assemble + - name: All Tests + run: ./gradlew check diff --git a/.github/workflows/cui.yml b/.github/workflows/cui.yml deleted file mode 100644 index 6a76d541a..000000000 --- a/.github/workflows/cui.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CuiCloud Publish - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - release: - types: - - created - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - 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: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Gradle clean - run: ./gradlew clean - - name: Gradle build - run: ./gradlew build # if test's failed, don't publish - - name: Gradle :mirai-core:cuiCloudUpload - run: ./gradlew :mirai-core:cuiCloudUpload -Dcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Pcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Dcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} -Pcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} - - name: Gradle :mirai-core-qqandroid:cuiCloudUpload - run: ./gradlew :mirai-core-qqandroid:cuiCloudUpload -Dcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Pcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Dcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} -Pcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} - - -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# # Artifact name -# name: mirai-core -# # Directory containing files to upload -# path: "mirai-core/build/libs/mirai-core-*-all.jar" -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# # Artifact name -# name: mirai-core-qqandroid-all -# # Directory containing files to upload -# path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar" diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index a2bbfed99..6dcfa02c9 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -12,7 +12,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - build: + mirai-core-docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -37,3 +37,32 @@ jobs: user_email: 'mamoebot@users.noreply.github.com' keep_files: true + # This workflow contains a single job called "build" + mirai-console-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Gradle build + run: ./gradlew clean build # if test's failed, don't publish + - name: Dokka + run: ./gradlew :mirai-console:dokkaHtml + - name: GitHub Pages Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + personal_token: ${{ secrets.MAMOE_TOKEN }} + publish_dir: ./mirai-console/build/dokka + external_repository: project-mirai/mirai-doc + publish_branch: master + user_name: 'mamoebot' + user_email: 'mamoebot@users.noreply.github.com' + keep_files: true + diff --git a/.github/workflows/mirai-core-build.yml b/.github/workflows/mirai-core-build.yml deleted file mode 100644 index 350b35181..000000000 --- a/.github/workflows/mirai-core-build.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: mirai-core Build - -on: [ push, pull_request ] - -jobs: - 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 +x gradlew - run: chmod +x gradlew - - name: Init gradle project - run: ./gradlew clean - - name: Build mirai-core series - run: ./gradlew assemble - - name: mirai-core Tests - run: ./gradlew check diff --git a/.github/workflows/shadow.yml b/.github/workflows/shadow.yml deleted file mode 100644 index f366bae15..000000000 --- a/.github/workflows/shadow.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: mirai-repo Publish - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - release: - types: - - created - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - 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: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Gradle clean - run: ./gradlew clean - - name: Gradle build - run: ./gradlew build # if test's failed, don't publish - - name: Gradle :mirai-core:githubUpload - run: ./gradlew :mirai-core:githubUpload -Dgithub_token=${{ secrets.MAMOE_TOKEN }} -Pgithub_token=${{ secrets.MAMOE_TOKEN }} - - name: Gradle :mirai-core-qqandroid:githubUpload - run: ./gradlew :mirai-core-qqandroid:githubUpload -Dgithub_token=${{ secrets.MAMOE_TOKEN }} -Pgithub_token=${{ secrets.MAMOE_TOKEN }} - - -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# # Artifact name -# name: mirai-core -# # Directory containing files to upload -# path: "mirai-core/build/libs/mirai-core-*-all.jar" -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# # Artifact name -# name: mirai-core-qqandroid-all -# # Directory containing files to upload -# path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar" diff --git a/build.gradle.kts b/build.gradle.kts index 58855aabc..eb80e543d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -205,8 +205,6 @@ fun Project.configureMppShadow() { from(it.output) } - println(project.configurations.joinToString()) - from(project.configurations.getByName("jvmRuntimeClasspath")) this.exclude { file ->