Skip to content

Commit

Permalink
Revert to ubuntu and enable config cache
Browse files Browse the repository at this point in the history
  • Loading branch information
romtsn committed Feb 5, 2025
1 parent 3120632 commit b756b53
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
build:
name: Build Job ubuntu-latest - Java 17
runs-on: macos-15
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
analyze:
name: Analyze
runs-on: macos-15
runs-on: ubuntu-latest

strategy:
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
jobs:
test:
name: Benchmarks
runs-on: macos-15
runs-on: ubuntu-latest

# we copy the secret to the env variable in order to access it in the workflow
env:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
config-file: .sauce/sentry-uitest-android-benchmark-lite.yml

app-metrics:
runs-on: macos-15
runs-on: ubuntu-latest

# we copy the secret to the env variable in order to access it in the workflow
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests-ui-critical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
jobs:
build:
name: Build
runs-on: macos-15
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
run-maestro-tests:
name: Run Tests for API Level ${{ matrix.api-level }}
needs: build
runs-on: macos-15
runs-on: ubuntu-latest
strategy:
# we want that the matrix keeps running, default is to cancel them if it fails.
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
test:
name: Ui tests
runs-on: macos-15
runs-on: ubuntu-latest

# we copy the secret to the env variable in order to access it in the workflow
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
jobs:
release:
name: Build release artifacts
runs-on: macos-15
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish: clean dryRelease

# deep clean
clean:
./gradlew clean
./gradlew clean --no-configuration-cache
rm -rf distributions

# build and run tests
Expand All @@ -20,7 +20,7 @@ javadocs:

# do a dry release (like a local deploy)
dryRelease:
./gradlew aggregateJavadocs distZip --no-build-cache
./gradlew aggregateJavadocs distZip --no-build-cache --no-configuration-cache

# check for dependencies update
update:
Expand Down
76 changes: 37 additions & 39 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -250,48 +250,46 @@ spotless {
}
}

gradle.projectsEvaluated {
tasks.create("aggregateJavadocs", Javadoc::class.java) {
setDestinationDir(project.layout.buildDirectory.file("docs/javadoc").get().asFile)
title = "${project.name} $version API"
val opts = options as StandardJavadocDocletOptions
opts.quiet()
opts.encoding = "UTF-8"
opts.memberLevel = JavadocMemberLevel.PROTECTED
opts.stylesheetFile(file("$projectDir/docs/stylesheet.css"))
opts.links = listOf(
"https://docs.oracle.com/javase/8/docs/api/",
"https://docs.spring.io/spring-framework/docs/current/javadoc-api/",
"https://docs.spring.io/spring-boot/docs/current/api/"
)
subprojects
.filter { !it.name.contains("sample") && !it.name.contains("integration-tests") }
.forEach { proj ->
proj.tasks.withType<Javadoc>().forEach { javadocTask ->
source += javadocTask.source
classpath += javadocTask.classpath
excludes += javadocTask.excludes
includes += javadocTask.includes
}
tasks.register("aggregateJavadocs", Javadoc::class.java) {
setDestinationDir(project.layout.buildDirectory.file("docs/javadoc").get().asFile)
title = "${project.name} $version API"
val opts = options as StandardJavadocDocletOptions
opts.quiet()
opts.encoding = "UTF-8"
opts.memberLevel = JavadocMemberLevel.PROTECTED
opts.stylesheetFile(file("$projectDir/docs/stylesheet.css"))
opts.links = listOf(
"https://docs.oracle.com/javase/8/docs/api/",
"https://docs.spring.io/spring-framework/docs/current/javadoc-api/",
"https://docs.spring.io/spring-boot/docs/current/api/"
)
subprojects
.filter { !it.name.contains("sample") && !it.name.contains("integration-tests") }
.forEach { proj ->
proj.tasks.withType<Javadoc>().forEach { javadocTask ->
source += javadocTask.source
classpath += javadocTask.classpath
excludes += javadocTask.excludes
includes += javadocTask.includes
}
}
}
}

tasks.create("buildForCodeQL") {
subprojects
.filter {
!it.displayName.contains("sample") &&
!it.displayName.contains("integration-tests") &&
!it.displayName.contains("bom") &&
it.name != "sentry-opentelemetry"
}
.forEach { proj ->
if (proj.plugins.hasPlugin("com.android.library")) {
this.dependsOn(proj.tasks.findByName("compileReleaseUnitTestSources"))
} else {
this.dependsOn(proj.tasks.findByName("testClasses"))
}
tasks.register("buildForCodeQL") {
subprojects
.filter {
!it.displayName.contains("sample") &&
!it.displayName.contains("integration-tests") &&
!it.displayName.contains("bom") &&
it.name != "sentry-opentelemetry"
}
.forEach { proj ->
if (proj.plugins.hasPlugin("com.android.library")) {
this.dependsOn(proj.tasks.findByName("compileReleaseUnitTestSources"))
} else {
this.dependsOn(proj.tasks.findByName("testClasses"))
}
}
}
}

// Workaround for https://youtrack.jetbrains.com/issue/IDEA-316081/Gradle-8-toolchain-error-Toolchain-from-executable-property-does-not-match-toolchain-from-javaLauncher-property-when-different
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
org.gradle.jvmargs=-Xmx12g -XX:MaxMetaspaceSize=4g -XX:+CrashOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.configuration-cache=true

# Daemons workers
org.gradle.workers.max=2
Expand Down

0 comments on commit b756b53

Please sign in to comment.