Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Oct 21, 2024
2 parents acb78f0 + 84ca9e3 commit 4ee7437
Show file tree
Hide file tree
Showing 35 changed files with 2,472 additions and 823 deletions.
Original file line number Diff line number Diff line change
@@ -1,79 +1,14 @@
name: ci
name: Publish Artifacts

on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- main
- '**'
workflow_dispatch:

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
java-version: [8, 17]
include:
- os: macos-latest
java-version: 17
- os: macos-latest
java-version: 11

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: Fetch millw launcher (Windows)
run: curl -Lo mill.bat "https://raw.githubusercontent.com/lefou/millw/main/millw.bat"
if: matrix.os == 'windows-latest'

- run: ./mill -i -k __.test
if: matrix.os != 'windows-latest'
- run: ./mill.bat -i -k __.jvm.__.test
if: matrix.os == 'windows-latest'

check-bin-compat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8

- run: ./mill -i -k __.mimaReportBinaryIssues

check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- run: ./mill -i mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources

publish-sonatype:
if: github.repository == 'com-lihaoyi/os-lib' && contains(github.ref, 'refs/tags/')
needs: test
if: github.repository == 'com-lihaoyi/os-lib'
runs-on: ubuntu-latest
env:
SONATYPE_PGP_PRIVATE_KEY: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY }}
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Run Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
java-version: [11, 17]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: Fetch millw launcher (Windows)
run: curl -Lo mill.bat "https://raw.githubusercontent.com/lefou/millw/main/millw.bat"
if: matrix.os == 'windows-latest'

- run: ./mill -i -k __.test
if: matrix.os != 'windows-latest'
- run: ./mill.bat -i -k __.jvm.__.test
if: matrix.os == 'windows-latest'

check-bin-compat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8

- run: ./mill -i -k __.mimaReportBinaryIssues

check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- run: ./mill -i mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources
3 changes: 3 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ newlines.source = keep

runner.dialect = scala213

project.excludePaths = [
"glob:**/src-3/**"
]
Loading

0 comments on commit 4ee7437

Please sign in to comment.