Skip to content

Commit

Permalink
Merge pull request #2 from alexarchambault/fix-build
Browse files Browse the repository at this point in the history
Switch entirely to Mill
  • Loading branch information
alexarchambault authored Jul 4, 2022
2 parents 7f882c7 + 994767c commit 31a9378
Show file tree
Hide file tree
Showing 19 changed files with 317 additions and 396 deletions.
3 changes: 2 additions & 1 deletion .github/scripts/gpg-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
set -eu

# from https://github.com/coursier/apps/blob/f1d2bf568bf466a98569a85c3f23c5f3a8eb5360/.github/scripts/gpg-setup.sh

Expand Down
84 changes: 72 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ on:
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
name: Test ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -19,26 +24,81 @@ jobs:
- uses: coursier/[email protected]
with:
jvm: 8
- run: ./mill -i __.test
- name: Compile and test
run: ./mill __.test
- name: Compile to native
run: ./mill show nativeImage
- name: Copy JVM launcher
run: ./mill -i ci.copyJvmLauncher artifacts/
if: runner.os == 'Linux'
- name: Copy launcher
run: ./mill -i ci.copyLauncher artifacts/
- uses: actions/upload-artifact@v3
with:
name: launchers
path: artifacts/
if-no-files-found: error
retention-days: 2

format:
runs-on: ubuntu-latest
name: Format
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 8
apps: scalafmt
- name: Check formatting
run: scalafmt --test

publish:
needs: [tests]
needs: [format, test]
runs-on: ubuntu-latest
name: Publish
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 8
- name: GPG setup
run: .github/scripts/gpg-setup.sh
env:
PGP_SECRET: ${{ secrets.PUBLISH_SECRET_KEY }}
- name: Publish
run: ./mill ci.publishSonatype __.publishArtifacts
env:
PGP_PASSWORD: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.PUBLISH_USER }}
SONATYPE_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}

launchers:
needs: [format, test]
name: Upload launchers
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 8
- name: GPG setup
run: .github/scripts/gpg-setup.sh
env:
PGP_SECRET: ${{ secrets.PUBLISH_SECRET_KEY }}
- run: ./mill -i publishSonatype __.publishArtifacts
- uses: actions/download-artifact@v3
with:
name: launchers
path: artifacts/
- run: ./mill -i ci.uploadLaunchers artifacts/
env:
PGP_PASSWORD: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
SONATYPE_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.PUBLISH_USER }}
UPLOAD_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 3 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
maxColumn = 100
docstrings = JavaDoc
docstrings.style = "Asterisk"
assumeStandardLibraryStripMargin = true
align.tokens=[]
align.openParenCallSite = false
align.openParenDefnSite = false
binPack.literalArgumentLists = true
version = "2.7.3"
version = "3.5.8"
runner.dialect = scala213
Binary file removed bin/scalafmt
Binary file not shown.
44 changes: 0 additions & 44 deletions build.sbt

This file was deleted.

Loading

0 comments on commit 31a9378

Please sign in to comment.