Skip to content

Commit

Permalink
Merge branch 'main' into update/interface-1.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
lefou authored Mar 5, 2024
2 parents 79e76a4 + 95b58dc commit ff991de
Show file tree
Hide file tree
Showing 19 changed files with 1,487 additions and 107 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
48 changes: 37 additions & 11 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Tests
name: CI
on:
push:
branches:
- main
- 2.x
pull_request:
branches:
- main
- 2.x

# cancel older runs of a pull request;
# this will not cancel anything for normal git pushes
concurrency:
group: cancel-old-pr-runs-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
strategy:
fail-fast: false
matrix:
java-version: [8, 11]
java-version: [8, 11, 17]
scala-binary-version: [2.12, 2.13, 3]
runs-on: ubuntu-latest
steps:
Expand All @@ -23,13 +27,14 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- run: ./mill -i unitTest "${{ matrix.scala-binary-version }}"
- run: ./mill -i -k unitTest "${{ matrix.scala-binary-version }}"

itest:
strategy:
fail-fast: false
matrix:
java-version: [8, 11]
scala-version: [2.12.18, 2.13.12, 3.2.2, 3.3.1]
java-version: [8, 11, 17]
scala-version: [2.12, 2.13, 3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -38,12 +43,13 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- run: ./mill -i integrationTest ${{ matrix.scala-version }}
- run: ./mill -i -k integrationTest ${{ matrix.scala-version }}

publishLocal:
strategy:
fail-fast: false
matrix:
scala-version: [2.12.18, 2.13.12, 3.2.2]
scala-version: [2.12.19, 2.13.13, 3.3.3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -52,4 +58,24 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 8
- run: ./mill -i __[${{ matrix.scala-version }}].__.publishLocal
- run: ./mill -i -k __[${{ matrix.scala-version }}].__.publishLocal

release:
if: github.repository == 'com-lihaoyi/Ammonite' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.x')
needs: [ test, itest, publishLocal ]
uses: ./.github/workflows/release.yml
secrets: inherit

publishDosc:
if: github.repository == 'com-lihaoyi/Ammonite' && github.ref == 'refs/heads/main'
needs: [ test, itest ]
uses: ./.github/workflows/publishDocs.yml
secrets:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}

publishExecutable:
if: github.repository == 'com-lihaoyi/Ammonite' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.x')
needs: [ test, itest ]
uses: ./.github/workflows/publishExecutable.yml
secrets:
AMMONITE_BOT_AUTH_TOKEN: ${{ secrets.AMMONITE_BOT_AUTH_TOKEN }}
11 changes: 8 additions & 3 deletions .github/workflows/publishDocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Publish Docs
on:
push:
branches:
- main
# push:
# branches:
# - main
workflow_call:
secrets:
DEPLOY_KEY:
required: true

jobs:
publishDocs:
runs-on: ubuntu-latest
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/publishExecutable.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Publish Executable
on:
push:
branches:
- main
- 2.x
# push:
# branches:
# - main
# - 2.x
workflow_call:
secrets:
AMMONITE_BOT_AUTH_TOKEN:
required: true

jobs:
publishExecutable:
runs-on: ubuntu-latest
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: Release
on:
push:
branches:
- main
- 2.x
# push:
# branches:
# - main
# - 2.x
workflow_call:
secrets:
SONATYPE_PGP_SECRET:
required: true
SONATYPE_DEPLOY_USER:
required: true
SONATYPE_DEPLOY_PASSWORD:
required: true
SONATYPE_PGP_PASSWORD:
required: true

jobs:
release:
strategy:
matrix:
shard: [1, 2, 3, 4, 5]
shard: [ 1, 2, 3, 4, 5 ]
fail-fast: false
runs-on: ubuntu-latest
env:
Expand Down
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.13
0.10.15
24 changes: 24 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Newer versions won't work with Java 8!
version = "3.7.15"

align.openParenCallSite = false
align.preset = none
align.stripMargin = true

assumeStandardLibraryStripMargin = true

continuationIndent.callSite = 2
continuationIndent.defnSite = 4

docstrings.oneline = keep
docstrings.style = Asterisk
docstrings.wrap = no

maxColumn = 100

newlines.source = keep

project.git = true

runner.dialect = scala213

Loading

0 comments on commit ff991de

Please sign in to comment.