Skip to content

Commit

Permalink
Merge branch 'main' into update/jsch-0.1.55
Browse files Browse the repository at this point in the history
  • Loading branch information
lefou authored Mar 5, 2024
2 parents a3d9848 + c70bfdf commit 08d89d1
Show file tree
Hide file tree
Showing 19 changed files with 1,511 additions and 125 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"
63 changes: 46 additions & 17 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,84 @@
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:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
- run: ./mill -i unitTest "${{ matrix.scala-binary-version }}"
distribution: temurin
- 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
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
- run: ./mill -i integrationTest ${{ matrix.scala-version }}
distribution: temurin
- 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
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: 8
- run: ./mill -i __[${{ matrix.scala-version }}].__.publishLocal
distribution: temurin
- 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 }}
16 changes: 11 additions & 5 deletions .github/workflows/publishDocs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: Publish Docs
on:
push:
branches:
- main
# push:
# branches:
# - main
workflow_call:
secrets:
DEPLOY_KEY:
required: true

jobs:
publishDocs:
runs-on: ubuntu-latest
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: '8'
distribution: temurin
- name: publish docs
shell: 'script -q -e -c "bash {0}"'
run: echo "Hello World" && ./mill -i publishDocs
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/publishExecutable.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
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
env:
AMMONITE_BOT_AUTH_TOKEN: ${{ secrets.AMMONITE_BOT_AUTH_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: '8'
distribution: temurin
- run: ./mill -i publishExecutable
26 changes: 19 additions & 7 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 All @@ -20,11 +31,12 @@ jobs:
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: '8'
distribution: temurin
- run: test -z "$SONATYPE_PGP_SECRET" || echo "$SONATYPE_PGP_SECRET" | base64 --decode | gpg --import --no-tty --batch --yes
- run: GPG_TTY=$(tty) ./mill -i publishSonatype __.publishArtifacts --shard ${{ matrix.shard }} --divisionCount 5
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 08d89d1

Please sign in to comment.