Skip to content

Commit

Permalink
regenerate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pk044 committed Aug 10, 2023
1 parent 4728271 commit 39b9e27
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 29 deletions.
87 changes: 81 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ name: Continuous Integration

on:
pull_request:
branches: ['**']
branches: ['**', '!update/**', '!pr/**']
push:
branches: ['**']
branches: ['**', '!update/**', '!pr/**']
tags: [v*]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -29,6 +30,14 @@ jobs:
os: [ubuntu-latest]
scala: [2.13, 3]
java: [temurin@11, temurin@17]
project: [rootJS, rootJVM, rootNative]
exclude:
- scala: 2.13
java: temurin@17
- project: rootJS
java: temurin@17
- project: rootNative
java: temurin@17
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand All @@ -48,7 +57,7 @@ jobs:

- name: sbt update
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update
run: sbt +update

- name: Setup Java (temurin@17)
id: setup-java-temurin-17
Expand All @@ -61,10 +70,76 @@ jobs:

- name: sbt update
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update
run: sbt +update

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

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

- name: scalaJSLink
if: matrix.project == 'rootJS'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult

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

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

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

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

dependency-submission:
name: Submit Dependencies
if: github.event_name != 'pull_request'
strategy:
matrix:
os: [ubuntu-latest]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
run: sbt +update

- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
modules-ignore: rootjs_2.13 rootjs_3 rootjvm_2.13 rootjvm_3 rootnative_2.13 rootnative_3
configs-ignore: test scala-tool scala-doc-tool test-internal
22 changes: 3 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sbt.url

val scala_2_13 = "2.13.10"
val scala_3 = "3.3.0"
Expand All @@ -7,8 +6,10 @@ val supportedScalaVersions = Seq(scala_2_13, scala_3)

ThisBuild / crossScalaVersions := supportedScalaVersions
ThisBuild / scalaVersion := mainScalaVersion

ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"), JavaSpec.temurin("17"))
ThisBuild / githubWorkflowPublishTargetBranches := Seq()
ThisBuild / tlBaseVersion := "0.1"
lazy val noPublishSettings =
Seq(
publishArtifact := false,
Expand All @@ -19,7 +20,6 @@ lazy val baseSettings = Seq(
organization := "pl.iterators",
organizationName := "Iterators",
organizationHomepage := Some(url("https://www.iteratorshq.com")),
version := "0.0.1-SNAPSHOT",
pomIncludeRepository := const(true),
scalacOptions ++= {
Seq(
Expand Down Expand Up @@ -126,20 +126,4 @@ lazy val examples = project
)
.dependsOn(core.jvm, testkit.jvm % Test)

lazy val stir = project
.in(file("."))
.aggregate(
core.jvm,
core.js,
core.native,
testkit.jvm,
testkit.js,
testkit.native,
examples,
coreTests
)
.settings(baseSettings: _*)
.settings(
name := "stir",
description := "Pekko HTTP-style (Akka HTTP-style) DSL for http4s"
)
lazy val root = tlCrossRootProject.aggregate(core, testkit, examples, coreTests)
10 changes: 6 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
//addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.1")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.14")
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.5.0-RC10")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0-RC11")
//addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.5.0-RC11")

0 comments on commit 39b9e27

Please sign in to comment.