Skip to content

Commit

Permalink
Added more OSes to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hnaderi committed Jan 10, 2023
1 parent 19d03ce commit 92f522d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,22 @@ jobs:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
os:
- ubuntu-20.04
- ubuntu-22.04
- macos-11
- macos-12
- windows-2022
scala: [2.13.10, 3.2.1]
java: [temurin@8]
project: [rootJVM, rootNative]
runs-on: ${{ matrix.os }}
steps:
- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
shell: bash
run: git config --global core.autocrlf false

- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -67,33 +77,41 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
shell: bash
run: sbt githubWorkflowCheck

- name: Check headers and formatting
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-20.04'
shell: bash
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck

- name: nativeLink
if: matrix.project == 'rootNative'
shell: bash
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink

- name: Test
shell: bash
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

- name: Check binary compatibility
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-20.04'
shell: bash
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues

- name: Generate API documentation
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-20.04'
shell: bash
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
shell: bash
run: mkdir -p lib/native/target target .js/target .jvm/target .native/target example/.native/target example/.jvm/target lib/jvm/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
shell: bash
run: tar cf targets.tar lib/native/target target .js/target .jvm/target .native/target example/.native/target example/.jvm/target lib/jvm/target project/target

- name: Upload target directories
Expand All @@ -109,11 +127,15 @@ jobs:
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-20.04]
scala: [2.13.10]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
run: git config --global core.autocrlf false

- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ThisBuild / tlSonatypeUseLegacyHost := false
val Scala213 = "2.13.10"
ThisBuild / crossScalaVersions := Seq(Scala213, "3.2.1")
ThisBuild / scalaVersion := Scala213
ThisBuild / githubWorkflowOSes :=
Seq("ubuntu-20.04", "ubuntu-22.04", "macos-11", "macos-12", "windows-2022")

lazy val root = tlCrossRootProject.aggregate(lib, example)

Expand Down

0 comments on commit 92f522d

Please sign in to comment.