Skip to content

Commit

Permalink
Merge branch 'main' into 0.12.6-changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Jan 23, 2025
2 parents 72ee03f + 2b46ae8 commit 80af416
Show file tree
Hide file tree
Showing 143 changed files with 4,345 additions and 2,675 deletions.
2 changes: 1 addition & 1 deletion .config/mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.12.5-150-31d41c-native
0.12.5-173-15dded-native
6 changes: 4 additions & 2 deletions .github/actions/post-build-selective/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ runs:
- run: ./mill -i -k selective.resolve ${{ inputs.millargs }}
shell: ${{ inputs.shell }}

- run: cat out/mill-build/methodCodeHashSignatures.dest/current/spanningInvalidationTree.json
shell: bash
# This generates a lot of logs and slows down the github actions UI like crazy,
# so only uncomment it when really necessary
#- run: cat out/mill-build/methodCodeHashSignatures.dest/current/spanningInvalidationTree.json
# shell: bash

- run: ./mill -i -k selective.resolveTree ${{ inputs.millargs }}
shell: ${{ inputs.shell }}
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/autofix-push.yml

This file was deleted.

25 changes: 6 additions & 19 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
name: 'autofix'
name: 'autofix.ci'
on:
pull_request:
jobs:
build-test:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: ./mill -i mill.scalalib.scalafmt.ScalafmtModule/
- run: git clean -xdf
- run: |
./mill __.fix + mill.javalib.palantirformat.PalantirFormatModule/ + mill.scalalib.scalafmt.ScalafmtModule/ + mill.kotlinlib.ktlint.KtlintModule/
./mill --meta-level 1 mill.scalalib.scalafmt.ScalafmtModule/
- run: git config --global user.email "you@example.com"
- run: git config --global user.name "Your Name"
- run: git commit -am "autofix" --allow-empty

- run: echo "git@github.com:${{ github.event.pull_request.head.repo.full_name }}.git"
- run: echo ${{ github.event.pull_request.head.ref }}
- run: echo -n "git@github.com:${{ github.event.pull_request.head.repo.full_name }}.git" > .autofix-repo
- run: echo -n HEAD:${{ github.event.pull_request.head.ref }} > .autofix-branch


- uses: actions/upload-artifact@v4.5.0
with:
path: .
name: autofix-artifacts
include-hidden-files: true
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
117 changes: 23 additions & 94 deletions .github/workflows/publish-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,88 +15,44 @@ on:
workflow_dispatch:

jobs:
build-artifacts:
# when in master repo, publish all tags and manual runs on main
if: github.repository == 'com-lihaoyi/mill'
runs-on: ubuntu-latest
env:
MILL_STABLE_VERSION: 1
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0}

- uses: coursier/cache-action@v6

- run: "echo temurin:11 > .mill-jvm-version"

- run: ./mill -i __.publishArtifacts

- uses: actions/upload-artifact@v4.6.0
with:
path: .
include-hidden-files: true
name: publish-artifacts

publish-sonatype:
# when in master repo, publish all tags and manual runs on main
if: github.repository == 'com-lihaoyi/mill'
needs: build-artifacts
runs-on: ubuntu-latest

# only run one publish job for the same sha at the same time
# e.g. when a main-branch push is also tagged
concurrency: publish-sonatype-${{ github.sha }}

env:
MILL_STABLE_VERSION: 1
MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MILL_PGP_SECRET_BASE64: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY }}
MILL_PGP_PASSPHRASE: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY_PASSWORD }}
LANG: "en_US.UTF-8"
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"

steps:
- uses: actions/download-artifact@v4
with:
path: .
name: publish-artifacts

- run: ls -la .

# Need to fix cached artifact file permissions because github actions screws it up
# https://github.com/actions/upload-artifact/issues/38
# Best is, we restore any file to avoid any changes
- run: git reset --hard

- uses: coursier/cache-action@v6

- run: "echo temurin:11 > .mill-jvm-version"

- run: ./mill -i mill.scalalib.PublishModule/

publish-sonatype-native:
# when in master repo, publish all tags and manual runs on main
if: github.repository == 'com-lihaoyi/mill'
runs-on: ${{ matrix.os }}

# only run one publish job for the same sha at the same time
# e.g. when a main-branch push is also tagged
concurrency: publish-sonatype-native-${{ matrix.os }}-${{ github.sha }}
concurrency: publish-sonatype-${{ matrix.os }}-${{ github.sha }}
strategy:
matrix:
include:
- os: ubuntu-latest
coursierarchive: ""
publishartifacts: __.publishArtifacts
uploadgithub: true

- os: ubuntu-24.04-arm
coursierarchive: ""
publishartifacts: dist.native.publishArtifacts
uploadgithub: false

- os: macos-13
coursierarchive: ""
publishartifacts: dist.native.publishArtifacts
uploadgithub: false

- os: macos-latest
coursierarchive: ""
publishartifacts: dist.native.publishArtifacts
uploadgithub: false

- os: windows-latest
coursierarchive: C:/coursier-arc
# Skip this because the main publishing job handles it
# - os: ubuntu-latest
publishartifacts: dist.native.publishArtifacts
uploadgithub: false

# No windows-arm support becaues Graal native image doesn't support it
# https://github.com/oracle/graal/issues/9215
env:
MILL_STABLE_VERSION: 1
MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Expand All @@ -107,6 +63,7 @@ jobs:
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
COURSIER_ARCHIVE_CACHE: ${{ matrix.coursierarchive }}
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
steps:
- uses: actions/setup-java@v4
with:
Expand All @@ -118,35 +75,7 @@ jobs:

- run: "echo temurin:11 > .mill-jvm-version"

- run: "echo 0.12.5-144-22bb1b > .mill-version"

- run: ./mill -i mill.scalalib.PublishModule/ --publishArtifacts dist.native.publishArtifacts

release-github:
# when in master repo, publish all tags and manual runs on main
if: github.repository == 'com-lihaoyi/mill'
needs: publish-sonatype
runs-on: ubuntu-latest

env:
MILL_STABLE_VERSION: 1
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}

steps:
- uses: actions/download-artifact@v4
with:
path: .
name: publish-artifacts

- run: ls -la .

# Need to fix cached artifact file permissions because github actions screws it up
# https://github.com/actions/upload-artifact/issues/38
# Best is, we restore any file to avoid any changes
- run: git reset --hard

- uses: coursier/cache-action@v6

- run: "echo temurin:11 > .mill-jvm-version"
- run: ./mill -i mill.scalalib.PublishModule/ --publishArtifacts ${{ matrix.publishartifacts }}

- run: ./mill -i dist.uploadToGithub --authKey $REPO_ACCESS_TOKEN
if: ${{ matrix.uploadgithub }}
29 changes: 21 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,15 @@ jobs:
# Run these with Mill native launcher as a smoketest
include:
- os: ubuntu-24.04-arm
millargs: example.kotlinlib.__.native.server.test
millargs: "'example.thirdparty[fansi].native.server.test'"
java-version: 17

- os: macos-latest
millargs: example.scalalib.__.native.server.test
millargs: "'example.thirdparty[acyclic].native.server.test'"
java-version: 11

- os: macos-13
millargs: "'example.thirdparty[jimfs].native.server.test'"
java-version: 11
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -135,7 +140,15 @@ jobs:
install-android-sdk: false

- java-version: 17
millargs: "'example.javalib.__.local.server.test'"
millargs: "example.javalib.__.local.server.test"
install-android-sdk: false

- java-version: 17
millargs: "example.kotlinlib.__.native.server.test"
install-android-sdk: false

- java-version: 17
millargs: "example.scalalib.__.native.server.test"
install-android-sdk: false

- java-version: 17
Expand All @@ -147,11 +160,11 @@ jobs:
install-android-sdk: false

- java-version: 11
millargs: "'example.thirdparty[{mockito,acyclic,commons-io}].local.server.test'"
millargs: "'example.thirdparty[{mockito,commons-io}].local.server.test'"
install-android-sdk: false

- java-version: 17
millargs: "'example.thirdparty[{fansi,jimfs,netty,gatling}].local.server.test'"
millargs: "'example.thirdparty[{netty,gatling}].local.server.test'"
install-android-sdk: false

- java-version: '17'
Expand All @@ -161,11 +174,11 @@ jobs:
- java-version: 11
millargs: "'example.{cli,fundamentals,depth,extending}.__.local.server.test'"
install-android-sdk: false
# Most of these integration tests should not depend on which mode they
# are run in, so just run them in `local`
- java-version: '17'

- java-version: 11
millargs: "'integration.{failure,feature,ide}.__.packaged.server.test'"
install-android-sdk: false

# These invalidation tests need to be exercised in both execution modes
# to make sure they work with and without -i/--no-server being passed
- java-version: 17
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.8.4-RC1"
version = "3.8.5"

align.openParenCallSite = false
align.preset = none
Expand Down
2 changes: 1 addition & 1 deletion blog/modules/ROOT/pages/4-flaky-tests.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::header[]

# How To Manage Flaky Tests
# How To Manage Flaky Tests in your CI Workflows


:author: Li Haoyi
Expand Down
21 changes: 9 additions & 12 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ object Deps {
val testng = ivy"org.testng:testng:7.5.1"
val sbtTestInterface = ivy"org.scala-sbt:test-interface:1.0"
def scalaCompiler(scalaVersion: String) = ivy"org.scala-lang:scala-compiler:${scalaVersion}"
val scalafmtDynamic = ivy"org.scalameta::scalafmt-dynamic:3.8.3"
val scalafmtDynamic = ivy"org.scalameta::scalafmt-dynamic:3.8.5"
def scalap(scalaVersion: String) = ivy"org.scala-lang:scalap:${scalaVersion}"
def scalaReflect(scalaVersion: String) = ivy"org.scala-lang:scala-reflect:${scalaVersion}"
val scoverage2Version = "2.2.1"
Expand Down Expand Up @@ -202,6 +202,7 @@ object Deps {
val mavenResolverTransportWagon =
ivy"org.apache.maven.resolver:maven-resolver-transport-wagon:$mavenResolverVersion"
val coursierJvmIndexVersion = "0.0.4-70-51469f"
val gradleApi = ivy"dev.gradleplugins:gradle-api:8.11.1"

object RuntimeDeps {
val dokkaVersion = "2.0.0"
Expand Down Expand Up @@ -281,6 +282,13 @@ def millLastTag: T[String] = Task {
} else "SNAPSHOT"
}

def millDownloadPrefix = Task {
s"https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/"
}
def millDownloadUrl = Task {
s"https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/${millLastTag()}"
}

def millBinPlatform: T[String] = Task {
// val tag = millLastTag()
// if (tag.contains("-M")) tag
Expand Down Expand Up @@ -439,9 +447,6 @@ trait MillPublishJavaModule extends MillJavaModule with PublishModule {
* Some custom scala settings and test convenience
*/
trait MillScalaModule extends ScalaModule with MillJavaModule with ScalafixModule { outer =>
def fix(args: String*) = Task.Command[Unit] {
/*https://github.com/com-lihaoyi/mill/issues/4353*/
}
def scalaVersion = Deps.scalaVersion
def scalafixScalaBinaryVersion = ZincWorkerUtil.scalaBinaryVersion(scalaVersion())
def semanticDbVersion = Deps.semanticDBscala.version
Expand Down Expand Up @@ -596,14 +601,6 @@ trait MillStableScalaModule extends MillPublishScalaModule with Mima {
"mill.main.MainModule.mill$define$BaseModule0$_setter_$evalWatchedValues_="
),

// Overrides added for new methods, ought to be safe
ProblemFilter.exclude[ReversedMissingMethodProblem](
"mill.scalalib.JavaModule.mill$scalalib$JavaModule$$super$internalRepositories"
),
ProblemFilter.exclude[ReversedMissingMethodProblem](
"mill.scalanativelib.ScalaNativeModule.mill$scalanativelib$ScalaNativeModule$$super$coursierProject"
),

// https://github.com/com-lihaoyi/mill/pull/3503
ProblemFilter.exclude[ReversedMissingMethodProblem](
"mill.scalalib.ScalaModule#ScalaTests.mill$scalalib$ScalaModule$ScalaTests$$super$mandatoryScalacOptions"
Expand Down
20 changes: 0 additions & 20 deletions ci/push-autofix.sh

This file was deleted.

Loading

0 comments on commit 80af416

Please sign in to comment.