diff --git a/.config/mill-version b/.config/mill-version index 971a9a02736..8e07ffc6178 100644 --- a/.config/mill-version +++ b/.config/mill-version @@ -1 +1 @@ -0.12.3-58-4a0046 \ No newline at end of file +0.12.3-66-40e41b \ No newline at end of file diff --git a/.github/actions/post-build-setup/action.yml b/.github/actions/post-build-setup/action.yml index 01376802a51..9f3e8003575 100644 --- a/.github/actions/post-build-setup/action.yml +++ b/.github/actions/post-build-setup/action.yml @@ -23,8 +23,13 @@ runs: # Need to fix cached artifact file permissions because github actions screws it up # https://github.com/actions/upload-artifact/issues/38 - - name: chmod executable - run: "chmod -R +x ." + - run: "chmod -R +x ." shell: bash - uses: coursier/cache-action@v6 + + - run: git config --global user.email "you@example.com" + shell: bash + + - run: git config --global user.name "Your Name" + shell: bash diff --git a/.github/workflows/post-build-selective.yml b/.github/workflows/post-build-selective.yml index 85d1e24f415..f71e906b782 100644 --- a/.github/workflows/post-build-selective.yml +++ b/.github/workflows/post-build-selective.yml @@ -55,13 +55,8 @@ jobs: log-accepted-android-sdk-licenses: false - run: ./mill -i -k selective.resolve ${{ inputs.millargs }} - if: github.event_name == 'pull_request' - run: ./mill -i -k selective.run ${{ inputs.millargs }} - if: github.event_name == 'pull_request' - - - run: ./mill -i -k ${{ inputs.millargs }} - if: github.event_name != 'pull_request' - run: 'taskkill -f -im java* && rm -rf out/mill-server/*' if: startsWith(inputs.os, 'windows') diff --git a/.github/workflows/pre-build.yml b/.github/workflows/pre-build.yml index 5bfaee2c50c..83acad971d1 100644 --- a/.github/workflows/pre-build.yml +++ b/.github/workflows/pre-build.yml @@ -32,7 +32,11 @@ jobs: - run: chmod -R 777 . # normalize permissions before and after upload/download-artifact + - run: mkdir out && touch out/mill-selective-execution.json + shell: bash + - run: ./mill -i -k selective.prepare ${{ inputs.prepareargs }} + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'run-all-tests') }} - uses: actions/upload-artifact@v4.4.3 with: diff --git a/main/src/mill/main/SelectiveExecutionModule.scala b/main/src/mill/main/SelectiveExecutionModule.scala index f61e4d3667a..291836f68b1 100644 --- a/main/src/mill/main/SelectiveExecutionModule.scala +++ b/main/src/mill/main/SelectiveExecutionModule.scala @@ -36,7 +36,20 @@ trait SelectiveExecutionModule extends mill.define.Module { val result = for { resolved <- Resolve.Tasks.resolve(evaluator.rootModule, tasks, SelectMode.Multi) diffed <- SelectiveExecution.diffMetadata(evaluator, tasks) - } yield resolved.map(_.ctx.segments.render).toSet.intersect(diffed).toArray.sorted + resolvedDiffed <- { + if (diffed.isEmpty) Right(Nil) + else Resolve.Segments.resolve( + evaluator.rootModule, + diffed.toSeq, + SelectMode.Multi, + evaluator.allowPositionalCommandArgs + ) + } + } yield { + resolved.map( + _.ctx.segments.render + ).toSet.intersect(resolvedDiffed.map(_.render).toSet).toArray.sorted + } result match { case Left(err) => Result.Failure(err)