Commit Graph
100 Commits
Author SHA1 Message Date
Vyacheslav Gerasimov ec621137a2 Build: Set MALLOC_ARENA_MAX for test processes to reduce memory overhead
The glibc default number of memory pools on 64bit systems is 8 times the
number of CPU cores. Choosing a value MALLOC_ARENA_MAX is generally a
tradeoff between performance and memory consumption. Not setting
MALLOC_ARENA_MAX gives the best performance, but may mean higher memory
use. Setting MALLOC_ARENA_MAX to “2” or “1” makes glibc use fewer
memory pools and potentially less memory, but this may reduce
performance.

 #KTI-1609
2024-03-19 22:59:44 +00:00
Vyacheslav Gerasimov 069c920a5c Build: Use jdk-release compiler option to build kotlin-stdlib
Use JDK11 with `-Xjdk-release=6` for kotlin-stdlib.
Use JDK11 with `-Xjdk-release=7` for kotlin-stdlib-jdk7.
This allows dropping JDK6 and JDK7 from our build completely and remove
`kotlin.build.isObsoleteJdkOverrideEnabled` #KTI-1220.

 #KT-57808
2024-03-19 12:32:39 +00:00
Vyacheslav Gerasimov 4f4f6393f9 Build: Introduce kotlin.build.test.process.NativeMemoryTracking property
Used to set `-XX:NativeMemoryTracking` for test processes

 #KTI-1609
2024-03-15 11:18:20 +00:00
Vyacheslav Gerasimov 0a60f2924f Build: Introduce limitTestTasksConcurrency build property
Is true by default. It can be used to disable the concurrency limit for
test tasks
2024-03-07 15:53:01 +00:00
Vyacheslav Gerasimov 879aa33a9c Build: Apply ConcurrencyLimitService to all tests tasks in the project
Some project tasks are not created with projectTest helper, but all
tasks should be limited since we can't use `--no-parallel` on CI
2024-03-06 21:45:41 +01:00
Vyacheslav Gerasimov 2e787c50be Build: Create GroupedByGradleVersion Gradle IT test tasks only on CI
All those tasks are displayed in the gutter when running a test making
it very long.
2024-03-05 17:12:31 +00:00
Vyacheslav Gerasimov 679e6f0504 Build: Use junit auto detection for DisabledIfNoArgumentsProvided
#KTI-1596
2024-03-05 17:12:31 +00:00
Vyacheslav Gerasimov 424a5055e2 Build: Group KGP Integration Tests by Gradle version
#KTI-1596

To avoid Gradle daemons pile up during test execution, run each Gradle
version in a separate task. Gradle daemon used for testing will be
terminated at the end of each execution preventing memory exhausting
in a low-memory environment (e.g., build agents).
2024-03-05 17:12:31 +00:00
Vyacheslav Gerasimov 596aab1673 Build: Increase max metaspace size for Codegen Tests
#KTI-1610
2024-03-04 22:12:24 +00:00
Vyacheslav Gerasimov c3ab87f52b Build: Use reservedCodeCacheSizeMb in test process heap size calculation
#KTI-1609
2024-03-04 22:12:24 +00:00
Vyacheslav Gerasimov 93e8b18cde Build: Limit default max metaspace for test processes
Some test proceses grow much bigger than max heap size. Metaspace also
should be limited to avoid OOM Killer events.

 #KTI-1609
2024-03-04 22:12:24 +00:00
Vyacheslav Gerasimov c382b0e2b3 Build: Remove kotlin-compiler from dependencies during Idea import
#KTI-1598
2024-02-27 10:29:59 +00:00
Vyacheslav Gerasimov 8fd3166199 Build: Remove coroutines-core dependency from backend.native:tests
The dependency on kotlinx-coroutines-core seems redundant and always
overridden by another dependency.
2024-02-27 10:29:59 +00:00
Vyacheslav Gerasimov f924de5a2c Build: Remove unused dependencies on :kotlin-compiler project
#KTI-1598
2024-02-27 10:29:59 +00:00
Vyacheslav Gerasimov 6c3b740a05 Build: Remove -xmx for main Gradle daemon
In some cases a lot of memory consumed during IDEA import. To avoid OOMs
when working with IDEA we should limit heap size only for CI builds.
2023-12-12 21:26:35 +00:00
Vyacheslav Gerasimov cf3f63ad33 Build: Set Gradle daemon -Xmx to 2200m 2023-12-01 13:37:26 +01:00
Vyacheslav Gerasimov fbc35975ab Build: Fix kotlinx-serialization-compiler-plugin compat artifacts
To avoid adding unexpected files we should add single file into
artifacts instead of directory.
 #KTI-1394
2023-11-20 14:37:54 +00:00
Vyacheslav Gerasimov 5ee7aa7077 Build: Workaround KT-61766 with implicitDependencies 2023-10-13 09:15:03 +00:00
Vyacheslav Gerasimov 453da6af27 Minor: Fix comment in resolve-dependencies.gradle.kts 2023-10-13 09:15:03 +00:00
Vyacheslav Gerasimov 918cf183c1 Build: Use cache-redirector for Node.js downloads
#KTI-1401
2023-10-11 11:13:13 +00:00
Vyacheslav Gerasimov 8b5f87f15f Build: Fix verification-metadata.xml 2023-10-10 13:53:18 +02:00
Vyacheslav Gerasimov 7d96623c37 Build: Extract toolchain resolve into a separate task
#KTI-72
2023-09-07 10:50:02 +00:00
Vyacheslav Gerasimov 009cda0c60 Build: Make robolectric tests run offline without downloading artifacts
#KTI-1367
2023-09-04 08:57:19 +00:00
Vyacheslav Gerasimov 5ccc302e01 Build: Cleanup verification-metadata.xml
#KTI-1277
2023-08-01 09:18:34 +00:00
Vyacheslav Gerasimov be2875126c Update Dependency verification section in ReadMe.md
#KTI-1277
2023-08-01 09:18:34 +00:00
Vyacheslav Gerasimov be1babeae4 Build: Add protoc to implicitDependencies
#KTI-1277
2023-08-01 09:18:34 +00:00
Vyacheslav Gerasimov 6305d068db Build: Add Android emulators to implicitDependencies
#KTI-1277
2023-08-01 09:18:34 +00:00
Vyacheslav Gerasimov 5be8d63c00 Build: resolve commonCompileClasspath in resolveDependencies task
`commonCompileClasspath` is not resolved during with --write-verification-metadata, only during KGP build

 #KTI-1277
2023-08-01 09:18:34 +00:00
Vyacheslav Gerasimov 58d6e3e57f Build: Download Android x86 emulator image unconditionally
#KTI-1277
2023-08-01 09:18:34 +00:00
Vyacheslav Gerasimov 77e5f077f3 Update Dependency verification section in ReadMe.md 2023-06-16 17:27:32 +00:00
Vyacheslav Gerasimov b06ec464d9 Minor: .idea/dictionaries update 2023-06-16 12:19:01 +00:00
Vyacheslav Gerasimov 61664c6c4d Build: Add webassembly wabt and test suite to cachedDependencies
#KTI-72
2023-06-16 12:19:01 +00:00
Vyacheslav Gerasimov 80758b36e3 Build: Add NodeJs to implicitDependencies
#KTI-72
2023-06-16 12:19:01 +00:00
Vyacheslav Gerasimov 8a6548cd7a Build: Add dokka to implicitDependencies
#KTI-72
2023-06-16 12:19:00 +00:00
Vyacheslav Gerasimov e15a299196 Build: Add Mozilla jshell to implicitDependencies
#KTI-72
2023-06-16 12:19:00 +00:00
Vyacheslav Gerasimov 02489dcd75 Build: Add android sdk to implicitDependencies
#KTI-72
2023-06-16 12:19:00 +00:00
Vyacheslav Gerasimov 01b6af452f Build: Introduce resolveDependencies task
It is used on the build server to pre-download all dependencies and
check that verification-metadata.xml is up-to-date
 #KTI-72
2023-06-16 12:19:00 +00:00
Vyacheslav Gerasimov 7c1ffc4eb2 Build: Introduce global implicitDependencies configuration
It is used to pre-download all dependencies and check that
verification-metadata.xml is up-to-date
 #KTI-72
2023-06-16 12:19:00 +00:00
Vyacheslav Gerasimov b8c4a4c80a Build: Add missing v8 artifacts to the verification-metadata.xml 2023-06-12 12:48:04 +02:00
Vyacheslav Gerasimov d5831587fb Build: Download jshell using configuration 2023-06-07 10:12:39 +00:00
Vyacheslav Gerasimov 965b00549f Build: Download webassembly wabt and test suite using configuration 2023-06-07 10:12:39 +00:00
Vyacheslav Gerasimov e0a477f16d Build: Refactor sbom configuration & wire it with main publication 2023-06-06 13:27:25 +00:00
Vyacheslav Gerasimov 58dfdd2f77 Build: Sync cache-redirector script with "Table of redirects" 2023-06-02 18:53:01 +00:00
Vyacheslav Gerasimov 5e39bb97a0 Download d8 using configuration to make use of Gradle dependency caching
#KTI-72
2023-06-01 09:28:11 +00:00
Vyacheslav Gerasimov 5996b41443 Build: Workaround deadlock in Gradle
Sometimes Gradle hangs during relocation of compiler plugins because
`compilerDummyJar` configuration is resolved inside ShadowJar's exclude
https://github.com/gradle/gradle/issues/24317
2023-03-20 20:46:58 +01:00
Vyacheslav Gerasimov 3dcac61f7c Build: Update org.gradle.crypto.checksum to 1.4.0 2023-03-20 19:45:40 +00:00
Vyacheslav Gerasimov 98cadcdaaf Build: Update org.jetbrains.kotlinx.benchmark to 0.4.6 2023-03-20 19:45:40 +00:00
Vyacheslav Gerasimov 76c54a8ff3 Build: Fix usages of apis deprecated in Gradle 8 2023-03-20 19:45:39 +00:00
Vyacheslav Gerasimov bd9f096cfd Build: Replace configuration dependencies with extends
Configuration dependencies on configuration are not allowed in Gradle 8
2023-03-20 19:45:38 +00:00
Vyacheslav Gerasimov 499ab48d30 Revert "[Build] Fix compilation of kotlinx-atomicfu-runtime in 1.9.0"
This reverts commit 4ab39b908e.
2023-03-03 15:06:23 +00:00
Vyacheslav Gerasimov 34fcbb32ff Revert "[Build] Fix compilation of kotlin-js(-ir) libraries in 1.9.0 (stdlib and test)"
This reverts commit d39fd9416a.
2023-03-03 15:06:23 +00:00
Vyacheslav Gerasimov a51ae33e4d Build: Add -Xmx3g to kotlin.daemon.jvmargs in settings-conventions
To avoid spawning multiple daemons `kotlin.daemon.jvmargs` should be
the same as root gradle.properties and buildSrc
 #KTI-1142
2023-03-01 11:38:35 +00:00
Vyacheslav Gerasimov 9b3c77de8b Revert "[Gradle, JS] Fix pom.xml publication to OSS sonatype"
This reverts commit 332ce81408.
2023-02-28 22:32:39 +01:00
Vyacheslav Gerasimov ff2db23c11 Build: Set kotlin.daemon.jvmargs in buildSrc to the same value as in the root project
#KTI-915

Merge-request: KT-MR-8589
Merged-by: Vyacheslav Gerasimov <Vyacheslav.Gerasimov@jetbrains.com>
2023-01-31 13:57:27 +00:00
Vyacheslav Gerasimov b4071e1bbe Build: Add a separate task for K2 native codegen box tests 2023-01-17 14:25:14 +01:00
Vyacheslav Gerasimov 417fef0d58 Build: Change node directory in :js:js.tests project to build/node
#KTI-1087
2023-01-11 11:58:40 +00:00
Vyacheslav Gerasimov 1fa7c7119b Build: Fix caching of some ShadowJar tasks in the project
To be cacheable relocated shadow jars should not include manifest with
build number. Instead, we repack relocated shadow jar in default jar
task with proper manifest.
2023-01-04 16:31:48 +00:00
Vyacheslav Gerasimov 719cdce609 Build: Make mochaTest a VerificationTask to allow skipping it with flag
#KTI-1076
2022-12-22 18:45:41 +01:00
Vyacheslav Gerasimov 7348e34fd0 Build: Run only jsTests before mocha tests
Only js tests produce mocha tests to run
2022-12-22 18:45:40 +01:00
Vyacheslav Gerasimov fce26aa536 Build: Introduce incrementalCompilationTest root task 2022-12-22 14:37:28 +00:00
Vyacheslav Gerasimov 9ca24b6965 Build: Remove parcelize tests from compilerPluginTest root task 2022-12-18 13:51:23 +01:00
Vyacheslav Gerasimov bfbeb2763f Build: Run only js tests with jsCompilerTest root task 2022-12-18 13:51:23 +01:00
Vyacheslav Gerasimov 4ae12bf270 Build: Introduce jsFirCompilerTest & jsIrCompilerTest root tasks 2022-12-14 15:13:09 +01:00
Vyacheslav Gerasimov 4c4a92be44 Build: Introduce parcelizeTests root task 2022-12-14 15:13:08 +01:00
Vyacheslav Gerasimov ba81bd052f Build: Include missing tests in jsTest, jsIrTest, jsFirTest tasks
Some tests were included only in common :js:js.tests:test task and
 missing in specialized test tasks (jsTest, jsIrTest, jsFirTest)
2022-12-09 20:42:08 +01:00
Vyacheslav Gerasimov 7d0935a8c5 Build: Refactor :js:js.tests:runMocha task
Introduce separate mochaTest task without dependency on test task
2022-12-09 20:42:07 +01:00
Vyacheslav Gerasimov 50ad5027fe Build: Fix kotlin-annotation-processing pom dependencies
#KTI-878
2022-12-01 15:50:38 +01:00
Vyacheslav Gerasimov ec09d3c1e4 Build: Prioritize gradle.integration.tests.split.tasks property
To allow disabling task splitting on TeamCity
2022-09-22 15:49:24 +02:00
Vyacheslav Gerasimov 15d797b5b5 Build: Use protobuf from kotlin-dependencies repo
#KTI-892
2022-09-01 19:28:16 +02:00
Vyacheslav Gerasimov 46bc1d5b09 Build: Increase heap size for kotlin daemon to 3g
#KTI-915
2022-09-01 19:28:16 +02:00
Vyacheslav Gerasimov 7360dff0da Build: Fix test forks and memory calculations for low memory cases 2022-05-30 21:43:23 +03:00
Vyacheslav Gerasimov 6a0fbce76a Build: Fix assemble task of :kotlin-native:runtime 2022-05-26 10:49:24 +00:00
Vyacheslav Gerasimov 6bb36bc5e1 Fix flaky android robolectric tests
#KTI-842
2022-05-10 23:42:55 +04:00
Vyacheslav Gerasimov e9346a7f2c Build: fix disable.verification.tasks property 2022-05-10 15:07:31 +04:00
Vyacheslav Gerasimov 7157a54155 Fix unnecessary usages of Locale.getDefault() 2022-05-06 22:08:25 +00:00
Vyacheslav Gerasimov dcd17e41a4 Fix capitalization related deprecation warnings 2022-05-04 19:15:01 +00:00
Vyacheslav Gerasimov c8f2872a07 Fix flaky FIR tests
failing with 'Jar with annotations does not exist. Please run
:plugins:fir-plugin-prototype:plugin-annotations:jar'
2022-04-20 12:54:08 +03:00
Vyacheslav Gerasimov bfe8306f62 Don't finalize gradle tests with cleanTestKitCacheTask on Teamcity
It may fail on Windows because of locked files and not really necessary
because TeamCity can clean up checkout directories when space needed
2022-04-19 11:45:23 +00:00
Vyacheslav Gerasimov 202347865d Move gradle testKit cache to the build directory 2022-04-19 11:45:23 +00:00
Vyacheslav Gerasimov d9e8f0c180 Build: Rework test workers calculation with respect to available memory
#KTI-787
2022-04-19 11:45:23 +00:00
Vyacheslav Gerasimov 5e09c3176f Build: Set kotlin.build.cache.push to false by default
#KTI-793
2022-03-13 20:29:12 +00:00
Vyacheslav Gerasimov f8f1b3fd41 Build: Remove allowUntrustedServer & allowInsecureProtocol
#KTI-791
2022-02-28 15:56:31 +03:00
Vyacheslav Gerasimov 8a20df1a97 Build: Remove allowUntrustedServer & allowInsecureProtocol
#KTI-791
2022-02-24 19:54:00 +03:00
Vyacheslav Gerasimov 649f246cef Build: Normalize line separators in components.xml
of kotlin-scripting-dependencies-maven-all jar to produce same binaries
on linux and windows

 #KTI-782
2022-02-14 18:59:06 +03:00
Vyacheslav Gerasimov 96cee0f917 Use internal docker repo for space dev environment image 2022-02-04 17:32:42 +03:00
Vyacheslav Gerasimov 63153a0beb Schedule space dev env warmup job at 5 am GMT +3 2022-02-04 15:24:47 +03:00
Vyacheslav Gerasimov 260e6fc369 Enable kotlin-native in space dev environment 2022-02-04 15:24:47 +03:00
Vyacheslav Gerasimov 87d813d780 Add space warmup job for gateway and fleet
#KTI-776
2022-02-03 11:53:00 +03:00
Vyacheslav Gerasimov c7a165e6f7 Add Dockerfile for jb-gateway and fleet dev environment
#KTI-776
2022-02-03 11:53:00 +03:00
Vyacheslav Gerasimov 03a3e7c68e Build: Workaround java-rt loading into Gradle daemon
Fixes IDEA diff for tests not showing diff transfer buttons in the
 "Click to see difference" window for a failed test
2021-12-22 16:23:08 +03:00
Vyacheslav Gerasimov 5369813acc Fix "IdeaWin64.dll not found" error when running tests on Windows 2021-12-17 21:28:10 +03:00
Vyacheslav Gerasimov 84469d0c68 Build: Fix test runtime for kapt tests 2021-12-16 21:48:29 +03:00
Vyacheslav Gerasimov 4d87843925 Build: Set versions.trove4j to the version used in IDEA 203.8084.24 2021-12-16 21:48:27 +03:00
Vyacheslav Gerasimov 41902e69f5 Build: Move libraries versions from root project to versions.properties
and cleanup unused versions
2021-12-16 21:48:25 +03:00
Vyacheslav Gerasimov 443cbcbc3c Minor: Reformat and fix warnings in dependencies.kt 2021-12-16 21:48:24 +03:00
Vyacheslav Gerasimov 944c7990a1 Build: Use fake ideaHome for tests with intellij build number only
#KTI-82
2021-12-16 21:48:24 +03:00
Vyacheslav Gerasimov 516e54a434 Build: Drop Idea run configurations from jps.gradle.kts 2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov 9f725da7f7 Build: Stop building ivy repo from full Idea during buildSrc build
#KTI-82
2021-12-16 21:48:22 +03:00
Vyacheslav Gerasimov 318e001d1b Fix parcelize test dependencies on android plugin layoutlib
#KTI-82
2021-12-16 21:48:22 +03:00