From 1bc1df97577cccb8120df025a7f0d15adc1dde86 Mon Sep 17 00:00:00 2001 From: Hamza Remmal Date: Mon, 10 Feb 2025 21:27:08 +0100 Subject: [PATCH 1/7] chore: test local cache in the CI --- .github/workflows/build-dotty.yml | 54 +++++++++++++++++++++++++++++++ project/Build.scala | 19 ++++++----- project/plugins.sbt | 2 +- project/scripts/sbt | 2 ++ 4 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build-dotty.yml diff --git a/.github/workflows/build-dotty.yml b/.github/workflows/build-dotty.yml new file mode 100644 index 000000000000..c5ee796eaa5a --- /dev/null +++ b/.github/workflows/build-dotty.yml @@ -0,0 +1,54 @@ +name: Build Dotty + +on: + pull_request: + +jobs: + build-non-bootstrapped: + runs-on: [self-hosted, Linux] + container: + image: lampepfl/dotty:2024-10-18 + options: --cpu-shares 4096 + volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + - ${{ github.workspace }}/../../cache/sbt:/root/.sbt + - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache + - ${{ github.workspace }}/../../cache/general:/root/.cache + steps: + - name: Set JDK 17 as default + run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH + - name: Checkout cleanup script + uses: actions/checkout@v4 + - name: Cleanup + run: .github/workflows/cleanup.sh + - name: Git Checkout + uses: actions/checkout@v4 + - name: Add SBT proxy repositories + run: cp -vf .github/workflows/repositories /root/.sbt/ ; true + - name: Compile Non-Bootstrapped Dotty + run: ./project/scripts/sbt "; clean; compile" + + build-bootstrapped: + needs: build-non-bootstrapped + runs-on: [self-hosted, Linux] + container: + image: lampepfl/dotty:2024-10-18 + options: --cpu-shares 4096 + volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + - ${{ github.workspace }}/../../cache/sbt:/root/.sbt + - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache + - ${{ github.workspace }}/../../cache/general:/root/.cache + steps: + - name: Set JDK 17 as default + run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH + - name: Checkout cleanup script + uses: actions/checkout@v4 + - name: Cleanup + run: .github/workflows/cleanup.sh + - name: Git Checkout + uses: actions/checkout@v4 + - name: Add SBT proxy repositories + run: cp -vf .github/workflows/repositories /root/.sbt/ ; true + - name: Compile Bootstrapped Dotty + run: ./project/scripts/sbt "; clean; scala3-bootstrapped/compile" diff --git a/project/Build.scala b/project/Build.scala index 463abab3f6fd..edaa9f6fc885 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -339,24 +339,27 @@ object Build { buildScan .withPublishing(Publishing.onlyIf(_.authenticated)) .withBackgroundUpload(!isInsideCI) - .tag(if (isInsideCI) "CI" else "Local") + .withTag(if (isInsideCI) "CI" else "Local") .withLinks(buildScan.links ++ GithubEnv.develocityLinks) .withValues(buildScan.values ++ GithubEnv.develocityValues) .withObfuscation(buildScan.obfuscation.withIpAddresses(_.map(_ => "0.0.0.0"))) ) .withBuildCache( buildCache - .withLocal(buildCache.local.withEnabled(false)) - .withRemote(buildCache.remote.withEnabled(false)) + .withLocal(buildCache.local.withEnabled(true).withStoreEnabled(true)) + .withRemote(buildCache.remote.withEnabled(true).withStoreEnabled(isInsideCI)) ) - .withTestRetryConfiguration( - config.testRetryConfiguration + .withTestRetry( + config.testRetry .withFlakyTestPolicy(FlakyTestPolicy.Fail) .withMaxRetries(if (isInsideCI) 1 else 0) .withMaxFailures(10) .withClassesFilter((className, _) => !noRetryTestClasses.contains(className)) ) - } + }, + // Deactivate Develocity's test caching because it caches all tests or nothing. + // Also at the moment, it does not take compilation files as inputs. + Test / develocityBuildCacheClient := None, ) // Settings shared globally (scoped in Global). Used in build.sbt @@ -1015,10 +1018,6 @@ object Build { sjsSources } (Set(scalaJSIRSourcesJar)).toSeq }.taskValue, - - // Develocity's Build Cache does not work with our compilation tests - // at the moment: it does not take compilation files as inputs. - Test / develocityBuildCacheClient := None, ) def insertClasspathInArgs(args: List[String], cp: String): List[String] = { diff --git a/project/plugins.sbt b/project/plugins.sbt index b3e4af1f72e7..ae611d4593c8 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -22,4 +22,4 @@ addSbtPlugin("ch.epfl.scala" % "sbt-tasty-mima" % "1.0.0") addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.0") -addSbtPlugin("com.gradle" % "sbt-develocity" % "1.1.1") +addSbtPlugin("com.gradle" % "sbt-develocity" % "1.1.2") diff --git a/project/scripts/sbt b/project/scripts/sbt index 8c6f5aa1c280..9eeb7567dff0 100755 --- a/project/scripts/sbt +++ b/project/scripts/sbt @@ -10,4 +10,6 @@ CMD="${1:?Missing sbt command}" sbt -J-XX:ReservedCodeCacheSize=512m \ -DSBT_PGP_USE_GPG=false \ -no-colors \ + -Ddevelocity.internal.cache.verbose=true \ + -Ddevelocity.internal.cache.defaultLogLevel=info \ "$CMD" From f7c3a6e849c5270c4c454104fa8583bbbf53b1a5 Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Thu, 20 Feb 2025 09:59:36 +0100 Subject: [PATCH 2/7] Try sbt-develocity 1.2-rc-2 --- project/plugins.sbt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ae611d4593c8..02fe1c39563d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -22,4 +22,7 @@ addSbtPlugin("ch.epfl.scala" % "sbt-tasty-mima" % "1.0.0") addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.0") -addSbtPlugin("com.gradle" % "sbt-develocity" % "1.1.2") +resolvers += + "Develocity Artifactory" at "https://repo.grdev.net/artifactory/public/" + +addSbtPlugin("com.gradle" % "sbt-develocity" % "1.2-rc-2") From cc55158b4cedefe4948131719708e4327765178b Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Thu, 20 Feb 2025 11:31:13 +0100 Subject: [PATCH 3/7] Fix non-canonical path in compiler options --- project/Build.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index edaa9f6fc885..1b93a76c65ed 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1116,7 +1116,7 @@ object Build { libraryDependencies += "org.scala-lang" % "scala-library" % stdlibVersion, (Compile / scalacOptions) ++= Seq( // Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called - "-sourcepath", (Compile / sourceDirectories).value.map(_.getAbsolutePath).distinct.mkString(File.pathSeparator), + "-sourcepath", (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File.pathSeparator), "-Yexplicit-nulls", ), (Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings, From 0e76e5db6fb024ffe1bbb87c7a9c9cb5916f09e4 Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Thu, 20 Feb 2025 14:15:49 +0100 Subject: [PATCH 4/7] Add configuration to cache build --- .sbtopts | 2 ++ project/build.sbt | 18 ++++++++++++++++++ project/project/plugins.sbt | 3 +++ 3 files changed, 23 insertions(+) create mode 100644 .sbtopts create mode 100644 project/project/plugins.sbt diff --git a/.sbtopts b/.sbtopts new file mode 100644 index 000000000000..8ffd2c3d0632 --- /dev/null +++ b/.sbtopts @@ -0,0 +1,2 @@ +# read build from develocity cache +-Ddevelocity.scan.metaBuild diff --git a/project/build.sbt b/project/build.sbt index 188dfa5c6702..5b984b79367c 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -2,3 +2,21 @@ libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "4.11.0.201803080745-r" libraryDependencies += Dependencies.`jackson-databind` + +// Configuration to publish build compilation to local and remote cache +ThisBuild / develocityConfiguration := { + val isInsideCI = insideCI.value + val config = develocityConfiguration.value + val buildScan = config.buildScan + val buildCache = config.buildCache + config + .withProjectId(ProjectId("scala3-build")) + .withServer(config.server.withUrl(Some(url("https://develocity.scala-lang.org")))) + .withBuildScan(buildScan.withPublishing(Publishing.onlyIf(_ => false))) + .withBuildCache( + buildCache + .withLocal(buildCache.local.withEnabled(true).withStoreEnabled(true)) + .withRemote(buildCache.remote.withEnabled(true).withStoreEnabled(isInsideCI)) + .withRequireClean(!isInsideCI) // always cache inside CI + ) +} diff --git a/project/project/plugins.sbt b/project/project/plugins.sbt new file mode 100644 index 000000000000..becbd79d12e5 --- /dev/null +++ b/project/project/plugins.sbt @@ -0,0 +1,3 @@ +resolvers += "Develocity Artifactory" at "https://repo.grdev.net/artifactory/public/" + +addSbtPlugin("com.gradle" % "sbt-develocity" % "1.2-rc-2") From c74549dee3d7d483ee2610d972c2455ffbf86bbf Mon Sep 17 00:00:00 2001 From: Hamza Remmal Date: Fri, 21 Feb 2025 15:38:46 +0100 Subject: [PATCH 5/7] chore: Use more the local cache :-) --- .github/workflows/build-dotty.yml | 54 ------------------------ .github/workflows/ci.yaml | 70 +++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/build-dotty.yml diff --git a/.github/workflows/build-dotty.yml b/.github/workflows/build-dotty.yml deleted file mode 100644 index c5ee796eaa5a..000000000000 --- a/.github/workflows/build-dotty.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Build Dotty - -on: - pull_request: - -jobs: - build-non-bootstrapped: - runs-on: [self-hosted, Linux] - container: - image: lampepfl/dotty:2024-10-18 - options: --cpu-shares 4096 - volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - - ${{ github.workspace }}/../../cache/general:/root/.cache - steps: - - name: Set JDK 17 as default - run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH - - name: Checkout cleanup script - uses: actions/checkout@v4 - - name: Cleanup - run: .github/workflows/cleanup.sh - - name: Git Checkout - uses: actions/checkout@v4 - - name: Add SBT proxy repositories - run: cp -vf .github/workflows/repositories /root/.sbt/ ; true - - name: Compile Non-Bootstrapped Dotty - run: ./project/scripts/sbt "; clean; compile" - - build-bootstrapped: - needs: build-non-bootstrapped - runs-on: [self-hosted, Linux] - container: - image: lampepfl/dotty:2024-10-18 - options: --cpu-shares 4096 - volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - - ${{ github.workspace }}/../../cache/general:/root/.cache - steps: - - name: Set JDK 17 as default - run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH - - name: Checkout cleanup script - uses: actions/checkout@v4 - - name: Cleanup - run: .github/workflows/cleanup.sh - - name: Git Checkout - uses: actions/checkout@v4 - - name: Add SBT proxy repositories - run: cp -vf .github/workflows/repositories /root/.sbt/ ; true - - name: Compile Bootstrapped Dotty - run: ./project/scripts/sbt "; clean; scala3-bootstrapped/compile" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b9fd3b5b864b..42777b80b986 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,12 +53,65 @@ env: # text on stderr and so can break tests which check the output of a program). jobs: + build-non-bootstrapped: + name: Build Non-Bootstrapped Compiler + runs-on: [self-hosted, Linux] + container: + image: lampepfl/dotty:2024-10-18 + options: --cpu-shares 4096 + volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + - ${{ github.workspace }}/../../cache/sbt:/root/.sbt + - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache + - ${{ github.workspace }}/../../cache/general:/root/.cache + steps: + - name: Set JDK 17 as default + run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH + - name: Checkout cleanup script + uses: actions/checkout@v4 + - name: Cleanup + run: .github/workflows/cleanup.sh + - name: Git Checkout + uses: actions/checkout@v4 + - name: Add SBT proxy repositories + run: cp -vf .github/workflows/repositories /root/.sbt/ ; true + - name: Compile Non-Bootstrapped Dotty + run: ./project/scripts/sbt "; clean; compile" + + build-bootstrapped: + name: Build Bootstrapped Compiler + needs: build-non-bootstrapped + runs-on: [self-hosted, Linux] + container: + image: lampepfl/dotty:2024-10-18 + options: --cpu-shares 4096 + volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + - ${{ github.workspace }}/../../cache/sbt:/root/.sbt + - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache + - ${{ github.workspace }}/../../cache/general:/root/.cache + steps: + - name: Set JDK 17 as default + run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH + - name: Checkout cleanup script + uses: actions/checkout@v4 + - name: Cleanup + run: .github/workflows/cleanup.sh + - name: Git Checkout + uses: actions/checkout@v4 + - name: Add SBT proxy repositories + run: cp -vf .github/workflows/repositories /root/.sbt/ ; true + - name: Compile Bootstrapped Dotty + run: ./project/scripts/sbt "; clean; scala3-bootstrapped/compile" + test_non_bootstrapped: + needs: build-non-bootstrapped runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -106,11 +159,13 @@ jobs: ./project/scripts/cmdTests test: + needs: build-bootstrapped runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -166,11 +221,13 @@ jobs: run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty; scala2-library-cc/compile; scala2-library-cc-tasty/compile; scala3-bootstrapped/testCompilation i3" test_scala2_library_tasty: + needs: build-bootstrapped runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -293,11 +350,13 @@ jobs: mima: name: MiMa + needs: build-bootstrapped runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -344,11 +403,13 @@ jobs: ./project/scripts/scala2-library-tasty-mima.sh community_build_a: + needs: build-bootstrapped runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -401,11 +462,13 @@ jobs: run: cat community-build/dotty-community-build-deps || true community_build_b: + needs: build-bootstrapped runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -458,11 +521,13 @@ jobs: run: cat community-build/dotty-community-build-deps || true community_build_c: + needs: build-bootstrapped runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -515,11 +580,13 @@ jobs: run: cat community-build/dotty-community-build-deps || true test_sbt: + needs: build-bootstrapped runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -565,6 +632,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -625,6 +693,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -696,6 +765,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: + - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache From 096f16370764c62be15bc18e824fd73854681bf2 Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Mon, 24 Feb 2025 16:33:11 +0100 Subject: [PATCH 6/7] Try without local cache on NFS --- .github/workflows/ci.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 42777b80b986..df69323a79c9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,10 +26,10 @@ on: - cron: '0 3 * * *' # Every day at 3 AM workflow_dispatch: -# Cancels any in-progress runs within the same group identified by workflow name and GH reference (branch or tag) +# Cancels any in-progress runs within the same group identified by workflow name and GH reference (branch or tag) # For example it would: # - terminate previous PR CI execution after pushing more changes to the same PR branch -# - terminate previous on-push CI run after merging new PR to main +# - terminate previous on-push CI run after merging new PR to main concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} @@ -60,7 +60,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -86,7 +86,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -111,7 +111,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -165,7 +165,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -227,7 +227,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -356,7 +356,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -409,7 +409,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -468,7 +468,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -527,7 +527,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -586,7 +586,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -632,7 +632,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -693,7 +693,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -765,7 +765,7 @@ jobs: image: lampepfl/dotty:2024-10-18 options: --cpu-shares 4096 volumes: - - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache + # - /nfs-cache/.develocity/build-cache:/root/.sbt/1.0/.develocity/build-cache - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - ${{ github.workspace }}/../../cache/general:/root/.cache @@ -925,7 +925,7 @@ jobs: scala3-${{ env.RELEASE_TAG }}*.zip \ scala3-${{ env.RELEASE_TAG }}*.tar.gz \ scala3-${{ env.RELEASE_TAG }}*.sha256 \ - scala3-${{ env.RELEASE_TAG }}.msi + scala3-${{ env.RELEASE_TAG }}.msi - name: Publish Release run: ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleUpload" From bebe954bc32fcb9397891d747783a7e41b1c7824 Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Tue, 25 Feb 2025 09:37:59 +0100 Subject: [PATCH 7/7] Disable requireClean on CI --- project/Build.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/project/Build.scala b/project/Build.scala index 1b93a76c65ed..924488effaba 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -348,6 +348,7 @@ object Build { buildCache .withLocal(buildCache.local.withEnabled(true).withStoreEnabled(true)) .withRemote(buildCache.remote.withEnabled(true).withStoreEnabled(isInsideCI)) + .withRequireClean(!isInsideCI) // always cache in CI ) .withTestRetry( config.testRetry