From 7fb277807247a2ceee1a94af95c34712b37f9ff7 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 16 Dec 2024 15:06:57 +0000 Subject: [PATCH] fix ci --- .github/workflows/build.yml | 14 ++++++-------- .github/workflows/src.main.kts | 23 +++++------------------ 2 files changed, 11 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd5cac6..8a7894b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,9 +28,8 @@ jobs: buildAnitorrentSeparately: false buildIosFramework: false composeResourceTriple: 'windows-x64' - extraGradleArgs: - - '-Pani.android.abis=x86_64' - gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dani.enable.anitorrent=true" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx6g" "--parallel" "-Pani.android.abis=x86_64"' + extraGradleArgs: [ ] + gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dani.enable.anitorrent=true" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "--parallel"' id: 'windows' installNativeDeps: false name: 'Windows x86_64' @@ -52,7 +51,7 @@ jobs: gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g"' id: 'ubuntu-x64' installNativeDeps: true - name: 'Ubuntu x86_64 (Compile only)' + name: 'Ubuntu x86_64' os: 'ubuntu' runTests: false runsOn: @@ -82,9 +81,8 @@ jobs: buildAnitorrentSeparately: true buildIosFramework: false composeResourceTriple: 'macos-arm64' - extraGradleArgs: - - '-Pani.android.abis=arm64-v8a' - gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dani.enable.anitorrent=true" "-DCMAKE_BUILD_TYPE=Release" "-Dorg.gradle.jvmargs=-Xmx6g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "--parallel" "-Pani.android.abis=arm64-v8a"' + extraGradleArgs: [ ] + gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dani.enable.anitorrent=true" "-DCMAKE_BUILD_TYPE=Release" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "--parallel"' id: 'macos-aarch64' installNativeDeps: false name: 'macOS AArch64' @@ -196,7 +194,7 @@ jobs: command: './gradlew ${{ matrix.gradleArgs }}' - id: 'step-12' name: 'Compile Kotlin' - run: './gradlew compileKotlin compileCommonMainKotlinMetadata compileDebugKotlinAndroid compileReleaseKotlinAndroid compileJvmMainKotlinMetadata compileKotlinDesktop compileKotlinMetadata ${{ matrix.gradleArgs }}' + run: './gradlew assemble ${{ matrix.gradleArgs }}' - id: 'step-13' name: 'Check' uses: 'nick-fields/retry@v2' diff --git a/.github/workflows/src.main.kts b/.github/workflows/src.main.kts index fbd48d7..5eafb9f 100755 --- a/.github/workflows/src.main.kts +++ b/.github/workflows/src.main.kts @@ -210,16 +210,13 @@ val matrixInstances = listOf( buildAnitorrent = true, buildAnitorrentSeparately = false, // windows 单线程构建 anitorrent, 要一起跑节约时间 composeResourceTriple = "windows-x64", - gradleHeap = "6g", - kotlinCompilerHeap = "6g", + gradleHeap = "4g", + kotlinCompilerHeap = "4g", gradleParallel = true, - extraGradleArgs = listOf( - "-Pani.android.abis=x86_64", - ), ), MatrixInstance( id = "ubuntu-x64", - name = "Ubuntu x86_64 (Compile only)", + name = "Ubuntu x86_64", runsOn = listOf("ubuntu-20.04"), os = OS.UBUNTU, arch = Arch.X64, @@ -248,7 +245,6 @@ val matrixInstances = listOf( buildIosFramework = false, gradleHeap = "4g", kotlinCompilerHeap = "4g", - extraGradleArgs = listOf(), // build all android ABI ), MatrixInstance( @@ -262,11 +258,8 @@ val matrixInstances = listOf( buildAnitorrent = true, buildAnitorrentSeparately = true, composeResourceTriple = "macos-arm64", - extraGradleArgs = listOf( - "-Pani.android.abis=arm64-v8a", - ), buildIosFramework = false, - gradleHeap = "6g", + gradleHeap = "4g", kotlinCompilerHeap = "4g", gradleParallel = true, ), @@ -640,13 +633,7 @@ fun JobBuilder<*>.compileAndAssemble() { runGradle( name = "Compile Kotlin", tasks = [ - "compileKotlin", - "compileCommonMainKotlinMetadata", - "compileDebugKotlinAndroid", - "compileReleaseKotlinAndroid", - "compileJvmMainKotlinMetadata", - "compileKotlinDesktop", - "compileKotlinMetadata", + "assemble", ], ) }