Skip to content

Commit

Permalink
tweak gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Sep 11, 2024
1 parent f749a73 commit 821e466
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 67 deletions.
Original file line number Diff line number Diff line change
@@ -1,76 +1,14 @@
name: ci
name: Publish Artifacts

on:
push:
branches:
- main
pull_request:
branches:
- main
tags:
- '**'
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/')
if: github.repository == 'com-lihaoyi/os-lib'
needs: test
runs-on: ubuntu-latest
env:
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Run Tests

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

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

0 comments on commit 821e466

Please sign in to comment.